generated/google/apis/firebaserules_v1/classes.rb in google-api-client-0.12.0 vs generated/google/apis/firebaserules_v1/classes.rb in google-api-client-0.13.0
- old
+ new
@@ -20,10 +20,315 @@
module Google
module Apis
module FirebaserulesV1
+ # Possible result values from the function mock invocation.
+ class Result
+ include Google::Apis::Core::Hashable
+
+ # The result is an actual value. The type of the value must match that
+ # of the type declared by the service.
+ # Corresponds to the JSON property `value`
+ # @return [Object]
+ attr_accessor :value
+
+ # A generic empty message that you can re-use to avoid defining duplicated
+ # empty messages in your APIs. A typical example is to use it as the request
+ # or the response type of an API method. For instance:
+ # service Foo `
+ # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
+ # `
+ # The JSON representation for `Empty` is empty JSON object ````.
+ # Corresponds to the JSON property `undefined`
+ # @return [Google::Apis::FirebaserulesV1::Empty]
+ attr_accessor :undefined
+
+ def initialize(**args)
+ update!(**args)
+ end
+
+ # Update properties of this object
+ def update!(**args)
+ @value = args[:value] if args.key?(:value)
+ @undefined = args[:undefined] if args.key?(:undefined)
+ end
+ end
+
+ # Position in the `Source` content including its line, column number, and an
+ # index of the `File` in the `Source` message. Used for debug purposes.
+ class SourcePosition
+ include Google::Apis::Core::Hashable
+
+ # Line number of the source fragment. 1-based.
+ # Corresponds to the JSON property `line`
+ # @return [Fixnum]
+ attr_accessor :line
+
+ # First column on the source line associated with the source fragment.
+ # Corresponds to the JSON property `column`
+ # @return [Fixnum]
+ attr_accessor :column
+
+ # Name of the `File`.
+ # Corresponds to the JSON property `fileName`
+ # @return [String]
+ attr_accessor :file_name
+
+ def initialize(**args)
+ update!(**args)
+ end
+
+ # Update properties of this object
+ def update!(**args)
+ @line = args[:line] if args.key?(:line)
+ @column = args[:column] if args.key?(:column)
+ @file_name = args[:file_name] if args.key?(:file_name)
+ end
+ end
+
+ # `TestCase` messages provide the request context and an expectation as to
+ # whether the given context will be allowed or denied. Test cases may specify
+ # the `request`, `resource`, and `function_mocks` to mock a function call to
+ # a service-provided function.
+ # The `request` object represents context present at request-time.
+ # The `resource` is the value of the target resource as it appears in
+ # persistent storage before the request is executed.
+ class TestCase
+ include Google::Apis::Core::Hashable
+
+ # Optional resource value as it appears in persistent storage before the
+ # request is fulfilled.
+ # The resource type depends on the `request.path` value.
+ # Corresponds to the JSON property `resource`
+ # @return [Object]
+ attr_accessor :resource
+
+ # Optional function mocks for service-defined functions. If not set, any
+ # service defined function is expected to return an error, which may or may
+ # not influence the test outcome.
+ # Corresponds to the JSON property `functionMocks`
+ # @return [Array<Google::Apis::FirebaserulesV1::FunctionMock>]
+ attr_accessor :function_mocks
+
+ # Test expectation.
+ # Corresponds to the JSON property `expectation`
+ # @return [String]
+ attr_accessor :expectation
+
+ # Request context.
+ # The exact format of the request context is service-dependent. See the
+ # appropriate service documentation for information about the supported
+ # fields and types on the request. Minimally, all services support the
+ # following fields and types:
+ # Request field | Type
+ # ---------------|-----------------
+ # auth.uid | `string`
+ # auth.token | `map<string, string>`
+ # headers | `map<string, string>`
+ # method | `string`
+ # params | `map<string, string>`
+ # path | `string`
+ # time | `google.protobuf.Timestamp`
+ # If the request value is not well-formed for the service, the request will
+ # be rejected as an invalid argument.
+ # Corresponds to the JSON property `request`
+ # @return [Object]
+ attr_accessor :request
+
+ def initialize(**args)
+ update!(**args)
+ end
+
+ # Update properties of this object
+ def update!(**args)
+ @resource = args[:resource] if args.key?(:resource)
+ @function_mocks = args[:function_mocks] if args.key?(:function_mocks)
+ @expectation = args[:expectation] if args.key?(:expectation)
+ @request = args[:request] if args.key?(:request)
+ end
+ end
+
+ # `Ruleset` is an immutable copy of `Source` with a globally unique identifier
+ # and a creation time.
+ class Ruleset
+ include Google::Apis::Core::Hashable
+
+ # `Source` is one or more `File` messages comprising a logical set of rules.
+ # Corresponds to the JSON property `source`
+ # @return [Google::Apis::FirebaserulesV1::Source]
+ attr_accessor :source
+
+ # Time the `Ruleset` was created.
+ # Output only.
+ # Corresponds to the JSON property `createTime`
+ # @return [String]
+ attr_accessor :create_time
+
+ # Name of the `Ruleset`. The ruleset_id is auto generated by the service.
+ # Format: `projects/`project_id`/rulesets/`ruleset_id``
+ # Output only.
+ # Corresponds to the JSON property `name`
+ # @return [String]
+ attr_accessor :name
+
+ def initialize(**args)
+ update!(**args)
+ end
+
+ # Update properties of this object
+ def update!(**args)
+ @source = args[:source] if args.key?(:source)
+ @create_time = args[:create_time] if args.key?(:create_time)
+ @name = args[:name] if args.key?(:name)
+ end
+ end
+
+ # The request for FirebaseRulesService.TestRuleset.
+ class TestRulesetRequest
+ include Google::Apis::Core::Hashable
+
+ # `Source` is one or more `File` messages comprising a logical set of rules.
+ # Corresponds to the JSON property `source`
+ # @return [Google::Apis::FirebaserulesV1::Source]
+ attr_accessor :source
+
+ # `TestSuite` is a collection of `TestCase` instances that validate the logical
+ # correctness of a `Ruleset`. The `TestSuite` may be referenced in-line within
+ # a `TestRuleset` invocation or as part of a `Release` object as a pre-release
+ # check.
+ # Corresponds to the JSON property `testSuite`
+ # @return [Google::Apis::FirebaserulesV1::TestSuite]
+ attr_accessor :test_suite
+
+ def initialize(**args)
+ update!(**args)
+ end
+
+ # Update properties of this object
+ def update!(**args)
+ @source = args[:source] if args.key?(:source)
+ @test_suite = args[:test_suite] if args.key?(:test_suite)
+ end
+ end
+
+ # Issues include warnings, errors, and deprecation notices.
+ class Issue
+ include Google::Apis::Core::Hashable
+
+ # Short error description.
+ # Corresponds to the JSON property `description`
+ # @return [String]
+ attr_accessor :description
+
+ # Position in the `Source` content including its line, column number, and an
+ # index of the `File` in the `Source` message. Used for debug purposes.
+ # Corresponds to the JSON property `sourcePosition`
+ # @return [Google::Apis::FirebaserulesV1::SourcePosition]
+ attr_accessor :source_position
+
+ # The severity of the issue.
+ # Corresponds to the JSON property `severity`
+ # @return [String]
+ attr_accessor :severity
+
+ def initialize(**args)
+ update!(**args)
+ end
+
+ # Update properties of this object
+ def update!(**args)
+ @description = args[:description] if args.key?(:description)
+ @source_position = args[:source_position] if args.key?(:source_position)
+ @severity = args[:severity] if args.key?(:severity)
+ end
+ end
+
+ # The response for FirebaseRulesService.ListReleases.
+ class ListReleasesResponse
+ include Google::Apis::Core::Hashable
+
+ # List of `Release` instances.
+ # Corresponds to the JSON property `releases`
+ # @return [Array<Google::Apis::FirebaserulesV1::Release>]
+ attr_accessor :releases
+
+ # The pagination token to retrieve the next page of results. If the value is
+ # empty, no further results remain.
+ # Corresponds to the JSON property `nextPageToken`
+ # @return [String]
+ attr_accessor :next_page_token
+
+ def initialize(**args)
+ update!(**args)
+ end
+
+ # Update properties of this object
+ def update!(**args)
+ @releases = args[:releases] if args.key?(:releases)
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
+ end
+ end
+
+ # `File` containing source content.
+ class File
+ include Google::Apis::Core::Hashable
+
+ # File name.
+ # Corresponds to the JSON property `name`
+ # @return [String]
+ attr_accessor :name
+
+ # Textual Content.
+ # Corresponds to the JSON property `content`
+ # @return [String]
+ attr_accessor :content
+
+ # Fingerprint (e.g. github sha) associated with the `File`.
+ # Corresponds to the JSON property `fingerprint`
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
+ # @return [String]
+ attr_accessor :fingerprint
+
+ def initialize(**args)
+ update!(**args)
+ end
+
+ # Update properties of this object
+ def update!(**args)
+ @name = args[:name] if args.key?(:name)
+ @content = args[:content] if args.key?(:content)
+ @fingerprint = args[:fingerprint] if args.key?(:fingerprint)
+ end
+ end
+
+ # Represents a service-defined function call that was invoked during test
+ # execution.
+ class FunctionCall
+ include Google::Apis::Core::Hashable
+
+ # The arguments that were provided to the function.
+ # Corresponds to the JSON property `args`
+ # @return [Array<Object>]
+ attr_accessor :args
+
+ # Name of the function invoked.
+ # Corresponds to the JSON property `function`
+ # @return [String]
+ attr_accessor :function
+
+ def initialize(**args)
+ update!(**args)
+ end
+
+ # Update properties of this object
+ def update!(**args)
+ @args = args[:args] if args.key?(:args)
+ @function = args[:function] if args.key?(:function)
+ end
+ end
+
# `Release` is a named reference to a `Ruleset`. Once a `Release` refers to a
# `Ruleset`, rules-enabled services will be able to enforce the `Ruleset`.
class Release
include Google::Apis::Core::Hashable
@@ -112,16 +417,10 @@
# Test result message containing the state of the test as well as a
# description and source position for test failures.
class TestResult
include Google::Apis::Core::Hashable
- # Position in the `Source` content including its line, column number, and an
- # index of the `File` in the `Source` message. Used for debug purposes.
- # Corresponds to the JSON property `errorPosition`
- # @return [Google::Apis::FirebaserulesV1::SourcePosition]
- attr_accessor :error_position
-
# The set of function calls made to service-defined methods.
# Function calls are included in the order in which they are encountered
# during evaluation, are provided for both mocked and unmocked functions,
# and included on the response regardless of the test `state`.
# Corresponds to the JSON property `functionCalls`
@@ -140,20 +439,26 @@
# For example: ```Unable to read variable [name: "resource"]```
# Corresponds to the JSON property `debugMessages`
# @return [Array<String>]
attr_accessor :debug_messages
+ # Position in the `Source` content including its line, column number, and an
+ # index of the `File` in the `Source` message. Used for debug purposes.
+ # Corresponds to the JSON property `errorPosition`
+ # @return [Google::Apis::FirebaserulesV1::SourcePosition]
+ attr_accessor :error_position
+
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
- @error_position = args[:error_position] if args.key?(:error_position)
@function_calls = args[:function_calls] if args.key?(:function_calls)
@state = args[:state] if args.key?(:state)
@debug_messages = args[:debug_messages] if args.key?(:debug_messages)
+ @error_position = args[:error_position] if args.key?(:error_position)
end
end
# The response for FirebaseRulesService.ListRulesets.
class ListRulesetsResponse
@@ -262,17 +567,10 @@
# long as the `Arg` matchers are distinct. There may be only one function
# for a given overload where all `Arg` values are `Arg.any_value`.
class FunctionMock
include Google::Apis::Core::Hashable
- # The list of `Arg` values to match. The order in which the arguments are
- # provided is the order in which they must appear in the function
- # invocation.
- # Corresponds to the JSON property `args`
- # @return [Array<Google::Apis::FirebaserulesV1::Arg>]
- attr_accessor :args
-
# The name of the function.
# The function name must match one provided by a service declaration.
# Corresponds to the JSON property `function`
# @return [String]
attr_accessor :function
@@ -280,19 +578,26 @@
# Possible result values from the function mock invocation.
# Corresponds to the JSON property `result`
# @return [Google::Apis::FirebaserulesV1::Result]
attr_accessor :result
+ # The list of `Arg` values to match. The order in which the arguments are
+ # provided is the order in which they must appear in the function
+ # invocation.
+ # Corresponds to the JSON property `args`
+ # @return [Array<Google::Apis::FirebaserulesV1::Arg>]
+ attr_accessor :args
+
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
- @args = args[:args] if args.key?(:args)
@function = args[:function] if args.key?(:function)
@result = args[:result] if args.key?(:result)
+ @args = args[:args] if args.key?(:args)
end
end
# `Source` is one or more `File` messages comprising a logical set of rules.
class Source
@@ -308,314 +613,9 @@
end
# Update properties of this object
def update!(**args)
@files = args[:files] if args.key?(:files)
- end
- end
-
- # Possible result values from the function mock invocation.
- class Result
- include Google::Apis::Core::Hashable
-
- # The result is an actual value. The type of the value must match that
- # of the type declared by the service.
- # Corresponds to the JSON property `value`
- # @return [Object]
- attr_accessor :value
-
- # A generic empty message that you can re-use to avoid defining duplicated
- # empty messages in your APIs. A typical example is to use it as the request
- # or the response type of an API method. For instance:
- # service Foo `
- # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
- # `
- # The JSON representation for `Empty` is empty JSON object ````.
- # Corresponds to the JSON property `undefined`
- # @return [Google::Apis::FirebaserulesV1::Empty]
- attr_accessor :undefined
-
- def initialize(**args)
- update!(**args)
- end
-
- # Update properties of this object
- def update!(**args)
- @value = args[:value] if args.key?(:value)
- @undefined = args[:undefined] if args.key?(:undefined)
- end
- end
-
- # Position in the `Source` content including its line, column number, and an
- # index of the `File` in the `Source` message. Used for debug purposes.
- class SourcePosition
- include Google::Apis::Core::Hashable
-
- # Line number of the source fragment. 1-based.
- # Corresponds to the JSON property `line`
- # @return [Fixnum]
- attr_accessor :line
-
- # First column on the source line associated with the source fragment.
- # Corresponds to the JSON property `column`
- # @return [Fixnum]
- attr_accessor :column
-
- # Name of the `File`.
- # Corresponds to the JSON property `fileName`
- # @return [String]
- attr_accessor :file_name
-
- def initialize(**args)
- update!(**args)
- end
-
- # Update properties of this object
- def update!(**args)
- @line = args[:line] if args.key?(:line)
- @column = args[:column] if args.key?(:column)
- @file_name = args[:file_name] if args.key?(:file_name)
- end
- end
-
- # `TestCase` messages provide the request context and an expectation as to
- # whether the given context will be allowed or denied. Test cases may specify
- # the `request`, `resource`, and `function_mocks` to mock a function call to
- # a service-provided function.
- # The `request` object represents context present at request-time.
- # The `resource` is the value of the target resource as it appears in
- # persistent storage before the request is executed.
- class TestCase
- include Google::Apis::Core::Hashable
-
- # Optional resource value as it appears in persistent storage before the
- # request is fulfilled.
- # The resource type depends on the `request.path` value.
- # Corresponds to the JSON property `resource`
- # @return [Object]
- attr_accessor :resource
-
- # Optional function mocks for service-defined functions. If not set, any
- # service defined function is expected to return an error, which may or may
- # not influence the test outcome.
- # Corresponds to the JSON property `functionMocks`
- # @return [Array<Google::Apis::FirebaserulesV1::FunctionMock>]
- attr_accessor :function_mocks
-
- # Test expectation.
- # Corresponds to the JSON property `expectation`
- # @return [String]
- attr_accessor :expectation
-
- # Request context.
- # The exact format of the request context is service-dependent. See the
- # appropriate service documentation for information about the supported
- # fields and types on the request. Minimally, all services support the
- # following fields and types:
- # Request field | Type
- # ---------------|-----------------
- # auth.uid | `string`
- # auth.token | `map<string, string>`
- # headers | `map<string, string>`
- # method | `string`
- # params | `map<string, string>`
- # path | `string`
- # time | `google.protobuf.Timestamp`
- # If the request value is not well-formed for the service, the request will
- # be rejected as an invalid argument.
- # Corresponds to the JSON property `request`
- # @return [Object]
- attr_accessor :request
-
- def initialize(**args)
- update!(**args)
- end
-
- # Update properties of this object
- def update!(**args)
- @resource = args[:resource] if args.key?(:resource)
- @function_mocks = args[:function_mocks] if args.key?(:function_mocks)
- @expectation = args[:expectation] if args.key?(:expectation)
- @request = args[:request] if args.key?(:request)
- end
- end
-
- # `Ruleset` is an immutable copy of `Source` with a globally unique identifier
- # and a creation time.
- class Ruleset
- include Google::Apis::Core::Hashable
-
- # Name of the `Ruleset`. The ruleset_id is auto generated by the service.
- # Format: `projects/`project_id`/rulesets/`ruleset_id``
- # Output only.
- # Corresponds to the JSON property `name`
- # @return [String]
- attr_accessor :name
-
- # `Source` is one or more `File` messages comprising a logical set of rules.
- # Corresponds to the JSON property `source`
- # @return [Google::Apis::FirebaserulesV1::Source]
- attr_accessor :source
-
- # Time the `Ruleset` was created.
- # Output only.
- # Corresponds to the JSON property `createTime`
- # @return [String]
- attr_accessor :create_time
-
- def initialize(**args)
- update!(**args)
- end
-
- # Update properties of this object
- def update!(**args)
- @name = args[:name] if args.key?(:name)
- @source = args[:source] if args.key?(:source)
- @create_time = args[:create_time] if args.key?(:create_time)
- end
- end
-
- # The request for FirebaseRulesService.TestRuleset.
- class TestRulesetRequest
- include Google::Apis::Core::Hashable
-
- # `Source` is one or more `File` messages comprising a logical set of rules.
- # Corresponds to the JSON property `source`
- # @return [Google::Apis::FirebaserulesV1::Source]
- attr_accessor :source
-
- # `TestSuite` is a collection of `TestCase` instances that validate the logical
- # correctness of a `Ruleset`. The `TestSuite` may be referenced in-line within
- # a `TestRuleset` invocation or as part of a `Release` object as a pre-release
- # check.
- # Corresponds to the JSON property `testSuite`
- # @return [Google::Apis::FirebaserulesV1::TestSuite]
- attr_accessor :test_suite
-
- def initialize(**args)
- update!(**args)
- end
-
- # Update properties of this object
- def update!(**args)
- @source = args[:source] if args.key?(:source)
- @test_suite = args[:test_suite] if args.key?(:test_suite)
- end
- end
-
- # Issues include warnings, errors, and deprecation notices.
- class Issue
- include Google::Apis::Core::Hashable
-
- # Position in the `Source` content including its line, column number, and an
- # index of the `File` in the `Source` message. Used for debug purposes.
- # Corresponds to the JSON property `sourcePosition`
- # @return [Google::Apis::FirebaserulesV1::SourcePosition]
- attr_accessor :source_position
-
- # The severity of the issue.
- # Corresponds to the JSON property `severity`
- # @return [String]
- attr_accessor :severity
-
- # Short error description.
- # Corresponds to the JSON property `description`
- # @return [String]
- attr_accessor :description
-
- def initialize(**args)
- update!(**args)
- end
-
- # Update properties of this object
- def update!(**args)
- @source_position = args[:source_position] if args.key?(:source_position)
- @severity = args[:severity] if args.key?(:severity)
- @description = args[:description] if args.key?(:description)
- end
- end
-
- # The response for FirebaseRulesService.ListReleases.
- class ListReleasesResponse
- include Google::Apis::Core::Hashable
-
- # The pagination token to retrieve the next page of results. If the value is
- # empty, no further results remain.
- # Corresponds to the JSON property `nextPageToken`
- # @return [String]
- attr_accessor :next_page_token
-
- # List of `Release` instances.
- # Corresponds to the JSON property `releases`
- # @return [Array<Google::Apis::FirebaserulesV1::Release>]
- attr_accessor :releases
-
- def initialize(**args)
- update!(**args)
- end
-
- # Update properties of this object
- def update!(**args)
- @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
- @releases = args[:releases] if args.key?(:releases)
- end
- end
-
- # Represents a service-defined function call that was invoked during test
- # execution.
- class FunctionCall
- include Google::Apis::Core::Hashable
-
- # Name of the function invoked.
- # Corresponds to the JSON property `function`
- # @return [String]
- attr_accessor :function
-
- # The arguments that were provided to the function.
- # Corresponds to the JSON property `args`
- # @return [Array<Object>]
- attr_accessor :args
-
- def initialize(**args)
- update!(**args)
- end
-
- # Update properties of this object
- def update!(**args)
- @function = args[:function] if args.key?(:function)
- @args = args[:args] if args.key?(:args)
- end
- end
-
- # `File` containing source content.
- class File
- include Google::Apis::Core::Hashable
-
- # Fingerprint (e.g. github sha) associated with the `File`.
- # Corresponds to the JSON property `fingerprint`
- # NOTE: Values are automatically base64 encoded/decoded in the client library.
- # @return [String]
- attr_accessor :fingerprint
-
- # File name.
- # Corresponds to the JSON property `name`
- # @return [String]
- attr_accessor :name
-
- # Textual Content.
- # Corresponds to the JSON property `content`
- # @return [String]
- attr_accessor :content
-
- def initialize(**args)
- update!(**args)
- end
-
- # Update properties of this object
- def update!(**args)
- @fingerprint = args[:fingerprint] if args.key?(:fingerprint)
- @name = args[:name] if args.key?(:name)
- @content = args[:content] if args.key?(:content)
end
end
end
end
end