diff --git a/generated/google/apis/artifactregistry_v1beta1.rb b/generated/google/apis/artifactregistry_v1beta1.rb new file mode 100644 index 000000000..87116c564 --- /dev/null +++ b/generated/google/apis/artifactregistry_v1beta1.rb @@ -0,0 +1,38 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'google/apis/artifactregistry_v1beta1/service.rb' +require 'google/apis/artifactregistry_v1beta1/classes.rb' +require 'google/apis/artifactregistry_v1beta1/representations.rb' + +module Google + module Apis + # Artifact Registry API + # + # Store and manage build artifacts in a scalable and integrated service built on + # Google infrastructure. + # + # @see https://cloud.google.com/artifacts/docs/ + module ArtifactregistryV1beta1 + VERSION = 'V1beta1' + REVISION = '20200508' + + # View and manage your data across Google Cloud Platform services + AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' + + # View your data across Google Cloud Platform services + AUTH_CLOUD_PLATFORM_READ_ONLY = 'https://www.googleapis.com/auth/cloud-platform.read-only' + end + end +end diff --git a/generated/google/apis/artifactregistry_v1beta1/classes.rb b/generated/google/apis/artifactregistry_v1beta1/classes.rb new file mode 100644 index 000000000..2d3e90747 --- /dev/null +++ b/generated/google/apis/artifactregistry_v1beta1/classes.rb @@ -0,0 +1,1010 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'date' +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module ArtifactregistryV1beta1 + + # Associates `members` with a `role`. + class Binding + include Google::Apis::Core::Hashable + + # Represents a textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # Example (Comparison): + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # Example (Equality): + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # Example (Logic): + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # Example (Data Manipulation): + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + # Corresponds to the JSON property `condition` + # @return [Google::Apis::ArtifactregistryV1beta1::Expr] + attr_accessor :condition + + # Specifies the identities requesting access for a Cloud Platform resource. + # `members` can have the following values: + # * `allUsers`: A special identifier that represents anyone who is + # on the internet; with or without a Google account. + # * `allAuthenticatedUsers`: A special identifier that represents anyone + # who is authenticated with a Google account or a service account. + # * `user:`emailid``: An email address that represents a specific Google + # account. For example, `alice@example.com` . + # * `serviceAccount:`emailid``: An email address that represents a service + # account. For example, `my-other-app@appspot.gserviceaccount.com`. + # * `group:`emailid``: An email address that represents a Google group. + # For example, `admins@example.com`. + # * `deleted:user:`emailid`?uid=`uniqueid``: An email address (plus unique + # identifier) representing a user that has been recently deleted. For + # example, `alice@example.com?uid=123456789012345678901`. If the user is + # recovered, this value reverts to `user:`emailid`` and the recovered user + # retains the role in the binding. + # * `deleted:serviceAccount:`emailid`?uid=`uniqueid``: An email address (plus + # unique identifier) representing a service account that has been recently + # deleted. For example, + # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. + # If the service account is undeleted, this value reverts to + # `serviceAccount:`emailid`` and the undeleted service account retains the + # role in the binding. + # * `deleted:group:`emailid`?uid=`uniqueid``: An email address (plus unique + # identifier) representing a Google group that has been recently + # deleted. For example, `admins@example.com?uid=123456789012345678901`. If + # the group is recovered, this value reverts to `group:`emailid`` and the + # recovered group retains the role in the binding. + # * `domain:`domain``: The G Suite domain (primary) that represents all the + # users of that domain. For example, `google.com` or `example.com`. + # Corresponds to the JSON property `members` + # @return [Array] + attr_accessor :members + + # Role that is assigned to `members`. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # Corresponds to the JSON property `role` + # @return [String] + attr_accessor :role + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @condition = args[:condition] if args.key?(:condition) + @members = args[:members] if args.key?(:members) + @role = args[:role] if args.key?(:role) + end + end + + # 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 ````. + class Empty + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Represents a textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # Example (Comparison): + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # Example (Equality): + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # Example (Logic): + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # Example (Data Manipulation): + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + class Expr + include Google::Apis::Core::Hashable + + # Optional. Description of the expression. This is a longer text which + # describes the expression, e.g. when hovered over it in a UI. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # Textual representation of an expression in Common Expression Language + # syntax. + # Corresponds to the JSON property `expression` + # @return [String] + attr_accessor :expression + + # Optional. String indicating the location of the expression for error + # reporting, e.g. a file name and a position in the file. + # Corresponds to the JSON property `location` + # @return [String] + attr_accessor :location + + # Optional. Title for the expression, i.e. a short string describing + # its purpose. This can be used e.g. in UIs which allow to enter the + # expression. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @description = args[:description] if args.key?(:description) + @expression = args[:expression] if args.key?(:expression) + @location = args[:location] if args.key?(:location) + @title = args[:title] if args.key?(:title) + end + end + + # Files store content that is potentially associated with Packages or Versions. + class File + include Google::Apis::Core::Hashable + + # The time when the File was created. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # The hashes of the file content. + # Corresponds to the JSON property `hashes` + # @return [Array] + attr_accessor :hashes + + # The name of the file, for example: + # "projects/p1/locations/us-central1/repositories/repo1/files/a/b/c.txt". + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The name of the Package or Version that owns this file, if any. + # Corresponds to the JSON property `owner` + # @return [String] + attr_accessor :owner + + # The size of the File in bytes. + # Corresponds to the JSON property `sizeBytes` + # @return [Fixnum] + attr_accessor :size_bytes + + # The time when the File was last updated. + # Corresponds to the JSON property `updateTime` + # @return [String] + attr_accessor :update_time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @create_time = args[:create_time] if args.key?(:create_time) + @hashes = args[:hashes] if args.key?(:hashes) + @name = args[:name] if args.key?(:name) + @owner = args[:owner] if args.key?(:owner) + @size_bytes = args[:size_bytes] if args.key?(:size_bytes) + @update_time = args[:update_time] if args.key?(:update_time) + end + end + + # A hash of file content. + class HashProp + include Google::Apis::Core::Hashable + + # The algorithm used to compute the hash value. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # The hash value. + # Corresponds to the JSON property `value` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :value + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @type = args[:type] if args.key?(:type) + @value = args[:value] if args.key?(:value) + end + end + + # The response from listing files. + class ListFilesResponse + include Google::Apis::Core::Hashable + + # The files returned. + # Corresponds to the JSON property `files` + # @return [Array] + attr_accessor :files + + # The token to retrieve the next page of files, or empty if there are no + # more files to return. + # 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) + @files = args[:files] if args.key?(:files) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # The response message for Locations.ListLocations. + class ListLocationsResponse + include Google::Apis::Core::Hashable + + # A list of locations that matches the specified filter in the request. + # Corresponds to the JSON property `locations` + # @return [Array] + attr_accessor :locations + + # The standard List next-page token. + # 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) + @locations = args[:locations] if args.key?(:locations) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # The response message for Operations.ListOperations. + class ListOperationsResponse + include Google::Apis::Core::Hashable + + # The standard List next-page token. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # A list of operations that matches the specified filter in the request. + # Corresponds to the JSON property `operations` + # @return [Array] + attr_accessor :operations + + 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) + @operations = args[:operations] if args.key?(:operations) + end + end + + # The response from listing packages. + class ListPackagesResponse + include Google::Apis::Core::Hashable + + # The token to retrieve the next page of packages, or empty if there are no + # more packages to return. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The packages returned. + # Corresponds to the JSON property `packages` + # @return [Array] + attr_accessor :packages + + 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) + @packages = args[:packages] if args.key?(:packages) + end + end + + # The response from listing repositories. + class ListRepositoriesResponse + include Google::Apis::Core::Hashable + + # The token to retrieve the next page of repositories, or empty if there are + # no more repositories to return. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The repositories returned. + # Corresponds to the JSON property `repositories` + # @return [Array] + attr_accessor :repositories + + 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) + @repositories = args[:repositories] if args.key?(:repositories) + end + end + + # The response from listing tags. + class ListTagsResponse + include Google::Apis::Core::Hashable + + # The token to retrieve the next page of tags, or empty if there are no + # more tags to return. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The tags returned. + # Corresponds to the JSON property `tags` + # @return [Array] + attr_accessor :tags + + 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) + @tags = args[:tags] if args.key?(:tags) + end + end + + # The response from listing versions. + class ListVersionsResponse + include Google::Apis::Core::Hashable + + # The token to retrieve the next page of versions, or empty if there are no + # more versions to return. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The versions returned. + # Corresponds to the JSON property `versions` + # @return [Array] + attr_accessor :versions + + 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) + @versions = args[:versions] if args.key?(:versions) + end + end + + # A resource that represents Google Cloud Platform location. + class Location + include Google::Apis::Core::Hashable + + # The friendly name for this location, typically a nearby city name. + # For example, "Tokyo". + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # Cross-service attributes for the location. For example + # `"cloud.googleapis.com/region": "us-east1"` + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # The canonical id for this location. For example: `"us-east1"`. + # Corresponds to the JSON property `locationId` + # @return [String] + attr_accessor :location_id + + # Service-specific metadata. For example the available capacity at the given + # location. + # Corresponds to the JSON property `metadata` + # @return [Hash] + attr_accessor :metadata + + # Resource name for the location, which may vary between implementations. + # For example: `"projects/example-project/locations/us-east1"` + # 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) + @display_name = args[:display_name] if args.key?(:display_name) + @labels = args[:labels] if args.key?(:labels) + @location_id = args[:location_id] if args.key?(:location_id) + @metadata = args[:metadata] if args.key?(:metadata) + @name = args[:name] if args.key?(:name) + end + end + + # This resource represents a long-running operation that is the result of a + # network API call. + class Operation + include Google::Apis::Core::Hashable + + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # Corresponds to the JSON property `done` + # @return [Boolean] + attr_accessor :done + alias_method :done?, :done + + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # Corresponds to the JSON property `error` + # @return [Google::Apis::ArtifactregistryV1beta1::Status] + attr_accessor :error + + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # Corresponds to the JSON property `metadata` + # @return [Hash] + attr_accessor :metadata + + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/`unique_id``. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The normal response of the operation in case of success. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # Corresponds to the JSON property `response` + # @return [Hash] + attr_accessor :response + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @done = args[:done] if args.key?(:done) + @error = args[:error] if args.key?(:error) + @metadata = args[:metadata] if args.key?(:metadata) + @name = args[:name] if args.key?(:name) + @response = args[:response] if args.key?(:response) + end + end + + # Packages are named collections of versions. + class Package + include Google::Apis::Core::Hashable + + # The time when the package was created. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # The display name of the package. + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # The name of the package, for example: + # "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1". + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The time when the package was last updated. This includes publishing a new + # version of the package. + # Corresponds to the JSON property `updateTime` + # @return [String] + attr_accessor :update_time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @create_time = args[:create_time] if args.key?(:create_time) + @display_name = args[:display_name] if args.key?(:display_name) + @name = args[:name] if args.key?(:name) + @update_time = args[:update_time] if args.key?(:update_time) + end + end + + # An Identity and Access Management (IAM) policy, which specifies access + # controls for Google Cloud resources. + # A `Policy` is a collection of `bindings`. A `binding` binds one or more + # `members` to a single `role`. Members can be user accounts, service accounts, + # Google groups, and domains (such as G Suite). A `role` is a named list of + # permissions; each `role` can be an IAM predefined role or a user-created + # custom role. + # For some types of Google Cloud resources, a `binding` can also specify a + # `condition`, which is a logical expression that allows access to a resource + # only if the expression evaluates to `true`. A condition can add constraints + # based on attributes of the request, the resource, or both. To learn which + # resources support conditions in their IAM policies, see the + # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource- + # policies). + # **JSON example:** + # ` + # "bindings": [ + # ` + # "role": "roles/resourcemanager.organizationAdmin", + # "members": [ + # "user:mike@example.com", + # "group:admins@example.com", + # "domain:google.com", + # "serviceAccount:my-project-id@appspot.gserviceaccount.com" + # ] + # `, + # ` + # "role": "roles/resourcemanager.organizationViewer", + # "members": [ + # "user:eve@example.com" + # ], + # "condition": ` + # "title": "expirable access", + # "description": "Does not grant access after Sep 2020", + # "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z') + # ", + # ` + # ` + # ], + # "etag": "BwWWja0YfJA=", + # "version": 3 + # ` + # **YAML example:** + # bindings: + # - members: + # - user:mike@example.com + # - group:admins@example.com + # - domain:google.com + # - serviceAccount:my-project-id@appspot.gserviceaccount.com + # role: roles/resourcemanager.organizationAdmin + # - members: + # - user:eve@example.com + # role: roles/resourcemanager.organizationViewer + # condition: + # title: expirable access + # description: Does not grant access after Sep 2020 + # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + # - etag: BwWWja0YfJA= + # - version: 3 + # For a description of IAM and its features, see the + # [IAM documentation](https://cloud.google.com/iam/docs/). + class Policy + include Google::Apis::Core::Hashable + + # Associates a list of `members` to a `role`. Optionally, may specify a + # `condition` that determines how and when the `bindings` are applied. Each + # of the `bindings` must contain at least one member. + # Corresponds to the JSON property `bindings` + # @return [Array] + attr_accessor :bindings + + # `etag` is used for optimistic concurrency control as a way to help + # prevent simultaneous updates of a policy from overwriting each other. + # It is strongly suggested that systems make use of the `etag` in the + # read-modify-write cycle to perform policy updates in order to avoid race + # conditions: An `etag` is returned in the response to `getIamPolicy`, and + # systems are expected to put that etag in the request to `setIamPolicy` to + # ensure that their change will be applied to the same version of the policy. + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + # Corresponds to the JSON property `etag` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :etag + + # Specifies the format of the policy. + # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value + # are rejected. + # Any operation that affects conditional role bindings must specify version + # `3`. This requirement applies to the following operations: + # * Getting a policy that includes a conditional role binding + # * Adding a conditional role binding to a policy + # * Changing a conditional role binding in a policy + # * Removing any role binding, with or without a condition, from a policy + # that includes conditions + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + # If a policy does not include any conditions, operations on that policy may + # specify any valid version or leave the field unset. + # To learn which resources support conditions in their IAM policies, see the + # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource- + # policies). + # Corresponds to the JSON property `version` + # @return [Fixnum] + attr_accessor :version + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @bindings = args[:bindings] if args.key?(:bindings) + @etag = args[:etag] if args.key?(:etag) + @version = args[:version] if args.key?(:version) + end + end + + # A Repository for storing artifacts with a specific format. + class Repository + include Google::Apis::Core::Hashable + + # The time when the repository was created. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # The user-provided description of the repository. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # The format of packages that are stored in the repository. + # Corresponds to the JSON property `format` + # @return [String] + attr_accessor :format + + # Labels with user-defined metadata. + # This field may contain up to 64 entries. Label keys and values may be no + # longer than 63 characters. Label keys must begin with a lowercase letter + # and may only contain lowercase letters, numeric characters, underscores, + # and dashes. + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # The name of the repository, for example: + # "projects/p1/locations/us-central1/repositories/repo1". + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The time when the repository was last updated. + # Corresponds to the JSON property `updateTime` + # @return [String] + attr_accessor :update_time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @create_time = args[:create_time] if args.key?(:create_time) + @description = args[:description] if args.key?(:description) + @format = args[:format] if args.key?(:format) + @labels = args[:labels] if args.key?(:labels) + @name = args[:name] if args.key?(:name) + @update_time = args[:update_time] if args.key?(:update_time) + end + end + + # Request message for `SetIamPolicy` method. + class SetIamPolicyRequest + include Google::Apis::Core::Hashable + + # An Identity and Access Management (IAM) policy, which specifies access + # controls for Google Cloud resources. + # A `Policy` is a collection of `bindings`. A `binding` binds one or more + # `members` to a single `role`. Members can be user accounts, service accounts, + # Google groups, and domains (such as G Suite). A `role` is a named list of + # permissions; each `role` can be an IAM predefined role or a user-created + # custom role. + # For some types of Google Cloud resources, a `binding` can also specify a + # `condition`, which is a logical expression that allows access to a resource + # only if the expression evaluates to `true`. A condition can add constraints + # based on attributes of the request, the resource, or both. To learn which + # resources support conditions in their IAM policies, see the + # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource- + # policies). + # **JSON example:** + # ` + # "bindings": [ + # ` + # "role": "roles/resourcemanager.organizationAdmin", + # "members": [ + # "user:mike@example.com", + # "group:admins@example.com", + # "domain:google.com", + # "serviceAccount:my-project-id@appspot.gserviceaccount.com" + # ] + # `, + # ` + # "role": "roles/resourcemanager.organizationViewer", + # "members": [ + # "user:eve@example.com" + # ], + # "condition": ` + # "title": "expirable access", + # "description": "Does not grant access after Sep 2020", + # "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z') + # ", + # ` + # ` + # ], + # "etag": "BwWWja0YfJA=", + # "version": 3 + # ` + # **YAML example:** + # bindings: + # - members: + # - user:mike@example.com + # - group:admins@example.com + # - domain:google.com + # - serviceAccount:my-project-id@appspot.gserviceaccount.com + # role: roles/resourcemanager.organizationAdmin + # - members: + # - user:eve@example.com + # role: roles/resourcemanager.organizationViewer + # condition: + # title: expirable access + # description: Does not grant access after Sep 2020 + # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + # - etag: BwWWja0YfJA= + # - version: 3 + # For a description of IAM and its features, see the + # [IAM documentation](https://cloud.google.com/iam/docs/). + # Corresponds to the JSON property `policy` + # @return [Google::Apis::ArtifactregistryV1beta1::Policy] + attr_accessor :policy + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @policy = args[:policy] if args.key?(:policy) + end + end + + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + class Status + include Google::Apis::Core::Hashable + + # The status code, which should be an enum value of google.rpc.Code. + # Corresponds to the JSON property `code` + # @return [Fixnum] + attr_accessor :code + + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + # Corresponds to the JSON property `details` + # @return [Array>] + attr_accessor :details + + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # google.rpc.Status.details field, or localized by the client. + # Corresponds to the JSON property `message` + # @return [String] + attr_accessor :message + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @code = args[:code] if args.key?(:code) + @details = args[:details] if args.key?(:details) + @message = args[:message] if args.key?(:message) + end + end + + # Tags point to a version and represent an alternative name that can be used + # to access the version. + class Tag + include Google::Apis::Core::Hashable + + # The name of the tag, for example: + # "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/tag1". + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The name of the version the tag refers to, for example: + # "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/ + # sha256:5243811" + # Corresponds to the JSON property `version` + # @return [String] + attr_accessor :version + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @name = args[:name] if args.key?(:name) + @version = args[:version] if args.key?(:version) + end + end + + # Request message for `TestIamPermissions` method. + class TestIamPermissionsRequest + include Google::Apis::Core::Hashable + + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # Corresponds to the JSON property `permissions` + # @return [Array] + attr_accessor :permissions + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @permissions = args[:permissions] if args.key?(:permissions) + end + end + + # Response message for `TestIamPermissions` method. + class TestIamPermissionsResponse + include Google::Apis::Core::Hashable + + # A subset of `TestPermissionsRequest.permissions` that the caller is + # allowed. + # Corresponds to the JSON property `permissions` + # @return [Array] + attr_accessor :permissions + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @permissions = args[:permissions] if args.key?(:permissions) + end + end + + # The body of a version resource. A version resource represents a + # collection of components, such as files and other data. This may correspond + # to a version in many package management schemes. + class Version + include Google::Apis::Core::Hashable + + # The time when the version was created. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # Optional. Description of the version, as specified in its metadata. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # The name of the version, for example: + # "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/ + # art1". + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Output only. A list of related tags. Will contain up to 100 tags that + # reference this version. + # Corresponds to the JSON property `relatedTags` + # @return [Array] + attr_accessor :related_tags + + # The time when the version was last updated. + # Corresponds to the JSON property `updateTime` + # @return [String] + attr_accessor :update_time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @create_time = args[:create_time] if args.key?(:create_time) + @description = args[:description] if args.key?(:description) + @name = args[:name] if args.key?(:name) + @related_tags = args[:related_tags] if args.key?(:related_tags) + @update_time = args[:update_time] if args.key?(:update_time) + end + end + end + end +end diff --git a/generated/google/apis/artifactregistry_v1beta1/representations.rb b/generated/google/apis/artifactregistry_v1beta1/representations.rb new file mode 100644 index 000000000..be8ae69c0 --- /dev/null +++ b/generated/google/apis/artifactregistry_v1beta1/representations.rb @@ -0,0 +1,380 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'date' +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module ArtifactregistryV1beta1 + + class Binding + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Empty + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Expr + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class File + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class HashProp + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListFilesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListLocationsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListOperationsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListPackagesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListRepositoriesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListTagsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListVersionsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Location + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Operation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Package + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Policy + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Repository + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SetIamPolicyRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Status + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Tag + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TestIamPermissionsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TestIamPermissionsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Version + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Binding + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :condition, as: 'condition', class: Google::Apis::ArtifactregistryV1beta1::Expr, decorator: Google::Apis::ArtifactregistryV1beta1::Expr::Representation + + collection :members, as: 'members' + property :role, as: 'role' + end + end + + class Empty + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class Expr + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :description, as: 'description' + property :expression, as: 'expression' + property :location, as: 'location' + property :title, as: 'title' + end + end + + class File + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :create_time, as: 'createTime' + collection :hashes, as: 'hashes', class: Google::Apis::ArtifactregistryV1beta1::HashProp, decorator: Google::Apis::ArtifactregistryV1beta1::HashProp::Representation + + property :name, as: 'name' + property :owner, as: 'owner' + property :size_bytes, :numeric_string => true, as: 'sizeBytes' + property :update_time, as: 'updateTime' + end + end + + class HashProp + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :type, as: 'type' + property :value, :base64 => true, as: 'value' + end + end + + class ListFilesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :files, as: 'files', class: Google::Apis::ArtifactregistryV1beta1::File, decorator: Google::Apis::ArtifactregistryV1beta1::File::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class ListLocationsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :locations, as: 'locations', class: Google::Apis::ArtifactregistryV1beta1::Location, decorator: Google::Apis::ArtifactregistryV1beta1::Location::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class ListOperationsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :operations, as: 'operations', class: Google::Apis::ArtifactregistryV1beta1::Operation, decorator: Google::Apis::ArtifactregistryV1beta1::Operation::Representation + + end + end + + class ListPackagesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :packages, as: 'packages', class: Google::Apis::ArtifactregistryV1beta1::Package, decorator: Google::Apis::ArtifactregistryV1beta1::Package::Representation + + end + end + + class ListRepositoriesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :repositories, as: 'repositories', class: Google::Apis::ArtifactregistryV1beta1::Repository, decorator: Google::Apis::ArtifactregistryV1beta1::Repository::Representation + + end + end + + class ListTagsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :tags, as: 'tags', class: Google::Apis::ArtifactregistryV1beta1::Tag, decorator: Google::Apis::ArtifactregistryV1beta1::Tag::Representation + + end + end + + class ListVersionsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :versions, as: 'versions', class: Google::Apis::ArtifactregistryV1beta1::Version, decorator: Google::Apis::ArtifactregistryV1beta1::Version::Representation + + end + end + + class Location + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :display_name, as: 'displayName' + hash :labels, as: 'labels' + property :location_id, as: 'locationId' + hash :metadata, as: 'metadata' + property :name, as: 'name' + end + end + + class Operation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :done, as: 'done' + property :error, as: 'error', class: Google::Apis::ArtifactregistryV1beta1::Status, decorator: Google::Apis::ArtifactregistryV1beta1::Status::Representation + + hash :metadata, as: 'metadata' + property :name, as: 'name' + hash :response, as: 'response' + end + end + + class Package + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :create_time, as: 'createTime' + property :display_name, as: 'displayName' + property :name, as: 'name' + property :update_time, as: 'updateTime' + end + end + + class Policy + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :bindings, as: 'bindings', class: Google::Apis::ArtifactregistryV1beta1::Binding, decorator: Google::Apis::ArtifactregistryV1beta1::Binding::Representation + + property :etag, :base64 => true, as: 'etag' + property :version, as: 'version' + end + end + + class Repository + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :create_time, as: 'createTime' + property :description, as: 'description' + property :format, as: 'format' + hash :labels, as: 'labels' + property :name, as: 'name' + property :update_time, as: 'updateTime' + end + end + + class SetIamPolicyRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :policy, as: 'policy', class: Google::Apis::ArtifactregistryV1beta1::Policy, decorator: Google::Apis::ArtifactregistryV1beta1::Policy::Representation + + end + end + + class Status + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :code, as: 'code' + collection :details, as: 'details' + property :message, as: 'message' + end + end + + class Tag + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :name, as: 'name' + property :version, as: 'version' + end + end + + class TestIamPermissionsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :permissions, as: 'permissions' + end + end + + class TestIamPermissionsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :permissions, as: 'permissions' + end + end + + class Version + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :create_time, as: 'createTime' + property :description, as: 'description' + property :name, as: 'name' + collection :related_tags, as: 'relatedTags', class: Google::Apis::ArtifactregistryV1beta1::Tag, decorator: Google::Apis::ArtifactregistryV1beta1::Tag::Representation + + property :update_time, as: 'updateTime' + end + end + end + end +end diff --git a/generated/google/apis/artifactregistry_v1beta1/service.rb b/generated/google/apis/artifactregistry_v1beta1/service.rb new file mode 100644 index 000000000..c62bc2f5f --- /dev/null +++ b/generated/google/apis/artifactregistry_v1beta1/service.rb @@ -0,0 +1,957 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module ArtifactregistryV1beta1 + # Artifact Registry API + # + # Store and manage build artifacts in a scalable and integrated service built on + # Google infrastructure. + # + # @example + # require 'google/apis/artifactregistry_v1beta1' + # + # Artifactregistry = Google::Apis::ArtifactregistryV1beta1 # Alias the module + # service = Artifactregistry::ArtifactRegistryService.new + # + # @see https://cloud.google.com/artifacts/docs/ + class ArtifactRegistryService < Google::Apis::Core::BaseService + # @return [String] + # API key. Your API key identifies your project and provides you with API access, + # quota, and reports. Required unless you provide an OAuth 2.0 token. + attr_accessor :key + + # @return [String] + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + attr_accessor :quota_user + + def initialize + super('https://artifactregistry.googleapis.com/', '') + @batch_path = 'batch' + end + + # Gets information about a location. + # @param [String] name + # Resource name for the location. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ArtifactregistryV1beta1::Location] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ArtifactregistryV1beta1::Location] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+name}', options) + command.response_representation = Google::Apis::ArtifactregistryV1beta1::Location::Representation + command.response_class = Google::Apis::ArtifactregistryV1beta1::Location + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists information about the supported locations for this service. + # @param [String] name + # The resource that owns the locations collection, if applicable. + # @param [String] filter + # The standard list filter. + # @param [Fixnum] page_size + # The standard list page size. + # @param [String] page_token + # The standard list page token. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ArtifactregistryV1beta1::ListLocationsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ArtifactregistryV1beta1::ListLocationsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_locations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+name}/locations', options) + command.response_representation = Google::Apis::ArtifactregistryV1beta1::ListLocationsResponse::Representation + command.response_class = Google::Apis::ArtifactregistryV1beta1::ListLocationsResponse + command.params['name'] = name unless name.nil? + command.query['filter'] = filter unless filter.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # @param [String] name + # The name of the operation resource. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ArtifactregistryV1beta1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ArtifactregistryV1beta1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+name}', options) + command.response_representation = Google::Apis::ArtifactregistryV1beta1::Operation::Representation + command.response_class = Google::Apis::ArtifactregistryV1beta1::Operation + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # NOTE: the `name` binding allows API services to override the binding + # to use different resource name schemes, such as `users/*/operations`. To + # override the binding, API services can add a binding such as + # `"/v1/`name=users/*`/operations"` to their service configuration. + # For backwards compatibility, the default name includes the operations + # collection id, however overriding users must ensure the name binding + # is the parent resource, without the operations collection id. + # @param [String] name + # The name of the operation's parent resource. + # @param [String] filter + # The standard list filter. + # @param [Fixnum] page_size + # The standard list page size. + # @param [String] page_token + # The standard list page token. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ArtifactregistryV1beta1::ListOperationsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ArtifactregistryV1beta1::ListOperationsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+name}/operations', options) + command.response_representation = Google::Apis::ArtifactregistryV1beta1::ListOperationsResponse::Representation + command.response_class = Google::Apis::ArtifactregistryV1beta1::ListOperationsResponse + command.params['name'] = name unless name.nil? + command.query['filter'] = filter unless filter.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a repository. The returned Operation will finish once the + # repository has been created. Its response will be the created Repository. + # @param [String] parent + # The name of the parent resource where the repository will be created. + # @param [Google::Apis::ArtifactregistryV1beta1::Repository] repository_object + # @param [String] repository_id + # The repository id to use for this repository. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ArtifactregistryV1beta1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ArtifactregistryV1beta1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_project_location_repository(parent, repository_object = nil, repository_id: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+parent}/repositories', options) + command.request_representation = Google::Apis::ArtifactregistryV1beta1::Repository::Representation + command.request_object = repository_object + command.response_representation = Google::Apis::ArtifactregistryV1beta1::Operation::Representation + command.response_class = Google::Apis::ArtifactregistryV1beta1::Operation + command.params['parent'] = parent unless parent.nil? + command.query['repositoryId'] = repository_id unless repository_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a repository and all of its contents. The returned Operation will + # finish once the repository has been deleted. It will not have any Operation + # metadata and will return a google.protobuf.Empty response. + # @param [String] name + # The name of the repository to delete. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ArtifactregistryV1beta1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ArtifactregistryV1beta1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_project_location_repository(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1beta1/{+name}', options) + command.response_representation = Google::Apis::ArtifactregistryV1beta1::Operation::Representation + command.response_class = Google::Apis::ArtifactregistryV1beta1::Operation + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a repository. + # @param [String] name + # The name of the repository to retrieve. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ArtifactregistryV1beta1::Repository] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ArtifactregistryV1beta1::Repository] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location_repository(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+name}', options) + command.response_representation = Google::Apis::ArtifactregistryV1beta1::Repository::Representation + command.response_class = Google::Apis::ArtifactregistryV1beta1::Repository + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets the IAM policy for a given resource. + # @param [String] resource + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param [Fixnum] options_requested_policy_version + # Optional. The policy format version to be returned. + # Valid values are 0, 1, and 3. Requests specifying an invalid value will be + # rejected. + # Requests for policies with any conditional bindings must specify version 3. + # Policies without any conditional bindings may specify any valid value or + # leave the field unset. + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ArtifactregistryV1beta1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ArtifactregistryV1beta1::Policy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location_repository_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+resource}:getIamPolicy', options) + command.response_representation = Google::Apis::ArtifactregistryV1beta1::Policy::Representation + command.response_class = Google::Apis::ArtifactregistryV1beta1::Policy + command.params['resource'] = resource unless resource.nil? + command.query['options.requestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists repositories. + # @param [String] parent + # The name of the parent resource whose repositories will be listed. + # @param [Fixnum] page_size + # The maximum number of repositories to return. + # @param [String] page_token + # The next_page_token value returned from a previous list request, if any. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ArtifactregistryV1beta1::ListRepositoriesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ArtifactregistryV1beta1::ListRepositoriesResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_location_repositories(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+parent}/repositories', options) + command.response_representation = Google::Apis::ArtifactregistryV1beta1::ListRepositoriesResponse::Representation + command.response_class = Google::Apis::ArtifactregistryV1beta1::ListRepositoriesResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates a repository. + # @param [String] name + # The name of the repository, for example: + # "projects/p1/locations/us-central1/repositories/repo1". + # @param [Google::Apis::ArtifactregistryV1beta1::Repository] repository_object + # @param [String] update_mask + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf# + # fieldmask + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ArtifactregistryV1beta1::Repository] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ArtifactregistryV1beta1::Repository] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def patch_project_location_repository(name, repository_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1beta1/{+name}', options) + command.request_representation = Google::Apis::ArtifactregistryV1beta1::Repository::Representation + command.request_object = repository_object + command.response_representation = Google::Apis::ArtifactregistryV1beta1::Repository::Representation + command.response_class = Google::Apis::ArtifactregistryV1beta1::Repository + command.params['name'] = name unless name.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates the IAM policy for a given resource. + # @param [String] resource + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param [Google::Apis::ArtifactregistryV1beta1::SetIamPolicyRequest] set_iam_policy_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ArtifactregistryV1beta1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ArtifactregistryV1beta1::Policy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def set_repository_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+resource}:setIamPolicy', options) + command.request_representation = Google::Apis::ArtifactregistryV1beta1::SetIamPolicyRequest::Representation + command.request_object = set_iam_policy_request_object + command.response_representation = Google::Apis::ArtifactregistryV1beta1::Policy::Representation + command.response_class = Google::Apis::ArtifactregistryV1beta1::Policy + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Tests if the caller has a list of permissions on a resource. + # @param [String] resource + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param [Google::Apis::ArtifactregistryV1beta1::TestIamPermissionsRequest] test_iam_permissions_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ArtifactregistryV1beta1::TestIamPermissionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ArtifactregistryV1beta1::TestIamPermissionsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def test_repository_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+resource}:testIamPermissions', options) + command.request_representation = Google::Apis::ArtifactregistryV1beta1::TestIamPermissionsRequest::Representation + command.request_object = test_iam_permissions_request_object + command.response_representation = Google::Apis::ArtifactregistryV1beta1::TestIamPermissionsResponse::Representation + command.response_class = Google::Apis::ArtifactregistryV1beta1::TestIamPermissionsResponse + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a file. + # @param [String] name + # The name of the file to retrieve. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ArtifactregistryV1beta1::File] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ArtifactregistryV1beta1::File] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location_repository_file(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+name}', options) + command.response_representation = Google::Apis::ArtifactregistryV1beta1::File::Representation + command.response_class = Google::Apis::ArtifactregistryV1beta1::File + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists files. + # @param [String] parent + # The name of the parent resource whose files will be listed. + # @param [String] filter + # An expression for filtering the results of the request. Filter rules are + # case insensitive. The fields eligible for filtering are: + # * `name` + # * `owner` + # An example of using a filter: + # * `name="projects/p1/locations/us-central1/repositories/repo1/files/a/b/*"` - + # -> Files with an + # ID starting with "a/b/". + # * `owner="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/ + # versions/1.0"` --> + # Files owned by the version `1.0` in package `pkg1`. + # @param [Fixnum] page_size + # The maximum number of files to return. + # @param [String] page_token + # The next_page_token value returned from a previous list request, if any. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ArtifactregistryV1beta1::ListFilesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ArtifactregistryV1beta1::ListFilesResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_location_repository_files(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+parent}/files', options) + command.response_representation = Google::Apis::ArtifactregistryV1beta1::ListFilesResponse::Representation + command.response_class = Google::Apis::ArtifactregistryV1beta1::ListFilesResponse + command.params['parent'] = parent unless parent.nil? + command.query['filter'] = filter unless filter.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a package and all of its versions and tags. The returned operation + # will complete once the package has been deleted. + # @param [String] name + # The name of the package to delete. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ArtifactregistryV1beta1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ArtifactregistryV1beta1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_project_location_repository_package(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1beta1/{+name}', options) + command.response_representation = Google::Apis::ArtifactregistryV1beta1::Operation::Representation + command.response_class = Google::Apis::ArtifactregistryV1beta1::Operation + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a package. + # @param [String] name + # The name of the package to retrieve. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ArtifactregistryV1beta1::Package] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ArtifactregistryV1beta1::Package] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location_repository_package(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+name}', options) + command.response_representation = Google::Apis::ArtifactregistryV1beta1::Package::Representation + command.response_class = Google::Apis::ArtifactregistryV1beta1::Package + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists packages. + # @param [String] parent + # The name of the parent resource whose packages will be listed. + # @param [Fixnum] page_size + # The maximum number of packages to return. + # @param [String] page_token + # The next_page_token value returned from a previous list request, if any. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ArtifactregistryV1beta1::ListPackagesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ArtifactregistryV1beta1::ListPackagesResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_location_repository_packages(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+parent}/packages', options) + command.response_representation = Google::Apis::ArtifactregistryV1beta1::ListPackagesResponse::Representation + command.response_class = Google::Apis::ArtifactregistryV1beta1::ListPackagesResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a tag. + # @param [String] parent + # The name of the parent resource where the tag will be created. + # @param [Google::Apis::ArtifactregistryV1beta1::Tag] tag_object + # @param [String] tag_id + # The tag id to use for this repository. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ArtifactregistryV1beta1::Tag] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ArtifactregistryV1beta1::Tag] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_project_location_repository_package_tag(parent, tag_object = nil, tag_id: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+parent}/tags', options) + command.request_representation = Google::Apis::ArtifactregistryV1beta1::Tag::Representation + command.request_object = tag_object + command.response_representation = Google::Apis::ArtifactregistryV1beta1::Tag::Representation + command.response_class = Google::Apis::ArtifactregistryV1beta1::Tag + command.params['parent'] = parent unless parent.nil? + command.query['tagId'] = tag_id unless tag_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a tag. + # @param [String] name + # The name of the tag to delete. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ArtifactregistryV1beta1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ArtifactregistryV1beta1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_project_location_repository_package_tag(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1beta1/{+name}', options) + command.response_representation = Google::Apis::ArtifactregistryV1beta1::Empty::Representation + command.response_class = Google::Apis::ArtifactregistryV1beta1::Empty + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a tag. + # @param [String] name + # The name of the tag to retrieve. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ArtifactregistryV1beta1::Tag] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ArtifactregistryV1beta1::Tag] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location_repository_package_tag(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+name}', options) + command.response_representation = Google::Apis::ArtifactregistryV1beta1::Tag::Representation + command.response_class = Google::Apis::ArtifactregistryV1beta1::Tag + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists tags. + # @param [String] parent + # The name of the parent resource whose tags will be listed. + # @param [String] filter + # An expression for filtering the results of the request. Filter rules are + # case insensitive. The fields eligible for filtering are: + # * `version` + # An example of using a filter: + # * `version="projects/p1/locations/us-central1/repositories/repo1/packages/ + # pkg1/versions/1.0"` + # --> Tags that are applied to the version `1.0` in package `pkg1`. + # @param [Fixnum] page_size + # The maximum number of tags to return. + # @param [String] page_token + # The next_page_token value returned from a previous list request, if any. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ArtifactregistryV1beta1::ListTagsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ArtifactregistryV1beta1::ListTagsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_location_repository_package_tags(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+parent}/tags', options) + command.response_representation = Google::Apis::ArtifactregistryV1beta1::ListTagsResponse::Representation + command.response_class = Google::Apis::ArtifactregistryV1beta1::ListTagsResponse + command.params['parent'] = parent unless parent.nil? + command.query['filter'] = filter unless filter.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates a tag. + # @param [String] name + # The name of the tag, for example: + # "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/tag1". + # @param [Google::Apis::ArtifactregistryV1beta1::Tag] tag_object + # @param [String] update_mask + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf# + # fieldmask + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ArtifactregistryV1beta1::Tag] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ArtifactregistryV1beta1::Tag] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def patch_project_location_repository_package_tag(name, tag_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1beta1/{+name}', options) + command.request_representation = Google::Apis::ArtifactregistryV1beta1::Tag::Representation + command.request_object = tag_object + command.response_representation = Google::Apis::ArtifactregistryV1beta1::Tag::Representation + command.response_class = Google::Apis::ArtifactregistryV1beta1::Tag + command.params['name'] = name unless name.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a version and all of its content. The returned operation will + # complete once the version has been deleted. + # @param [String] name + # The name of the version to delete. + # @param [Boolean] force + # By default, a version that is tagged may not be deleted. If force=true, the + # version and any tags pointing to the version are deleted. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ArtifactregistryV1beta1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ArtifactregistryV1beta1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_project_location_repository_package_version(name, force: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1beta1/{+name}', options) + command.response_representation = Google::Apis::ArtifactregistryV1beta1::Operation::Representation + command.response_class = Google::Apis::ArtifactregistryV1beta1::Operation + command.params['name'] = name unless name.nil? + command.query['force'] = force unless force.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a version + # @param [String] name + # The name of the version to retrieve. + # @param [String] view + # The view that should be returned in the response. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ArtifactregistryV1beta1::Version] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ArtifactregistryV1beta1::Version] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location_repository_package_version(name, view: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+name}', options) + command.response_representation = Google::Apis::ArtifactregistryV1beta1::Version::Representation + command.response_class = Google::Apis::ArtifactregistryV1beta1::Version + command.params['name'] = name unless name.nil? + command.query['view'] = view unless view.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists versions. + # @param [String] parent + # The name of the parent resource whose versions will be listed. + # @param [Fixnum] page_size + # The maximum number of versions to return. + # @param [String] page_token + # The next_page_token value returned from a previous list request, if any. + # @param [String] view + # The view that should be returned in the response. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ArtifactregistryV1beta1::ListVersionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ArtifactregistryV1beta1::ListVersionsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_location_repository_package_versions(parent, page_size: nil, page_token: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+parent}/versions', options) + command.response_representation = Google::Apis::ArtifactregistryV1beta1::ListVersionsResponse::Representation + command.response_class = Google::Apis::ArtifactregistryV1beta1::ListVersionsResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['view'] = view unless view.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + protected + + def apply_command_defaults(command) + command.query['key'] = key unless key.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + end + end + end + end +end diff --git a/generated/google/apis/bigquery_v2.rb b/generated/google/apis/bigquery_v2.rb index 98786bb06..a28a257d6 100644 --- a/generated/google/apis/bigquery_v2.rb +++ b/generated/google/apis/bigquery_v2.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/bigquery/ module BigqueryV2 VERSION = 'V2' - REVISION = '20200429' + REVISION = '20200514' # View and manage your data in Google BigQuery AUTH_BIGQUERY = 'https://www.googleapis.com/auth/bigquery' diff --git a/generated/google/apis/bigquery_v2/classes.rb b/generated/google/apis/bigquery_v2/classes.rb index 9e0b2dec6..a7cc6031c 100644 --- a/generated/google/apis/bigquery_v2/classes.rb +++ b/generated/google/apis/bigquery_v2/classes.rb @@ -2117,6 +2117,11 @@ module Google # @return [String] attr_accessor :compression + # [Optional, Trusted Tester] Connection for external data source. + # Corresponds to the JSON property `connectionId` + # @return [String] + attr_accessor :connection_id + # Additional properties to set if sourceFormat is set to CSV. # Corresponds to the JSON property `csvOptions` # @return [Google::Apis::BigqueryV2::CsvOptions] @@ -2192,6 +2197,7 @@ module Google @autodetect = args[:autodetect] if args.key?(:autodetect) @bigtable_options = args[:bigtable_options] if args.key?(:bigtable_options) @compression = args[:compression] if args.key?(:compression) + @connection_id = args[:connection_id] if args.key?(:connection_id) @csv_options = args[:csv_options] if args.key?(:csv_options) @google_sheets_options = args[:google_sheets_options] if args.key?(:google_sheets_options) @hive_partitioning_options = args[:hive_partitioning_options] if args.key?(:hive_partitioning_options) @@ -6675,7 +6681,12 @@ module Google end end - # + # This is used for defining User Defined Function (UDF) resources only when + # using legacy SQL. Users of Standard SQL should leverage either DDL (e.g. + # CREATE [TEMPORARY] FUNCTION ... ) or the Routines API to define UDF resources. + # For additional information on migrating, see: https://cloud.google.com/ + # bigquery/docs/reference/standard-sql/migrating-from-legacy-sql# + # differences_in_user-defined_javascript_functions class UserDefinedFunctionResource include Google::Apis::Core::Hashable diff --git a/generated/google/apis/bigquery_v2/representations.rb b/generated/google/apis/bigquery_v2/representations.rb index d3694809f..7c19cc228 100644 --- a/generated/google/apis/bigquery_v2/representations.rb +++ b/generated/google/apis/bigquery_v2/representations.rb @@ -1267,6 +1267,7 @@ module Google property :bigtable_options, as: 'bigtableOptions', class: Google::Apis::BigqueryV2::BigtableOptions, decorator: Google::Apis::BigqueryV2::BigtableOptions::Representation property :compression, as: 'compression' + property :connection_id, as: 'connectionId' property :csv_options, as: 'csvOptions', class: Google::Apis::BigqueryV2::CsvOptions, decorator: Google::Apis::BigqueryV2::CsvOptions::Representation property :google_sheets_options, as: 'googleSheetsOptions', class: Google::Apis::BigqueryV2::GoogleSheetsOptions, decorator: Google::Apis::BigqueryV2::GoogleSheetsOptions::Representation diff --git a/generated/google/apis/cloudbuild_v1.rb b/generated/google/apis/cloudbuild_v1.rb index 87df8e957..a19737e23 100644 --- a/generated/google/apis/cloudbuild_v1.rb +++ b/generated/google/apis/cloudbuild_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/cloud-build/docs/ module CloudbuildV1 VERSION = 'V1' - REVISION = '20200505' + REVISION = '20200520' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/cloudbuild_v1/classes.rb b/generated/google/apis/cloudbuild_v1/classes.rb index f2cb611a6..0c8cd43c9 100644 --- a/generated/google/apis/cloudbuild_v1/classes.rb +++ b/generated/google/apis/cloudbuild_v1/classes.rb @@ -262,6 +262,7 @@ module Google # Amount of time that this build should be allowed to run, to second # granularity. If this amount of time elapses, work on the build will cease # and the build status will be `TIMEOUT`. + # `timeout` starts ticking from `startTime`. # Default time is ten minutes. # Corresponds to the JSON property `timeout` # @return [String] diff --git a/generated/google/apis/cloudbuild_v1/service.rb b/generated/google/apis/cloudbuild_v1/service.rb index 95379261e..dbf7ca9e8 100644 --- a/generated/google/apis/cloudbuild_v1/service.rb +++ b/generated/google/apis/cloudbuild_v1/service.rb @@ -371,6 +371,127 @@ module Google execute_or_queue_command(command, &block) end + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an Operation.error value with a google.rpc.Status.code of 1, + # corresponding to `Code.CANCELLED`. + # @param [String] name + # The name of the operation resource to be cancelled. + # @param [Google::Apis::CloudbuildV1::CancelOperationRequest] cancel_operation_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudbuildV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudbuildV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def cancel_project_location_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+name}:cancel', options) + command.request_representation = Google::Apis::CloudbuildV1::CancelOperationRequest::Representation + command.request_object = cancel_operation_request_object + command.response_representation = Google::Apis::CloudbuildV1::Empty::Representation + command.response_class = Google::Apis::CloudbuildV1::Empty + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # @param [String] name + # The name of the operation resource. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudbuildV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudbuildV1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}', options) + command.response_representation = Google::Apis::CloudbuildV1::Operation::Representation + command.response_class = Google::Apis::CloudbuildV1::Operation + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # NOTE: the `name` binding allows API services to override the binding + # to use different resource name schemes, such as `users/*/operations`. To + # override the binding, API services can add a binding such as + # `"/v1/`name=users/*`/operations"` to their service configuration. + # For backwards compatibility, the default name includes the operations + # collection id, however overriding users must ensure the name binding + # is the parent resource, without the operations collection id. + # @param [String] name + # The name of the operation's parent resource. + # @param [String] filter + # The standard list filter. + # @param [Fixnum] page_size + # The standard list page size. + # @param [String] page_token + # The standard list page token. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudbuildV1::ListOperationsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudbuildV1::ListOperationsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}/operations', options) + command.response_representation = Google::Apis::CloudbuildV1::ListOperationsResponse::Representation + command.response_class = Google::Apis::CloudbuildV1::ListOperationsResponse + command.params['name'] = name unless name.nil? + command.query['filter'] = filter unless filter.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Creates a new `BuildTrigger`. # This API is experimental. # @param [String] project_id diff --git a/generated/google/apis/cloudbuild_v1alpha1.rb b/generated/google/apis/cloudbuild_v1alpha1.rb index c93ccb168..f2eb6dab7 100644 --- a/generated/google/apis/cloudbuild_v1alpha1.rb +++ b/generated/google/apis/cloudbuild_v1alpha1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/cloud-build/docs/ module CloudbuildV1alpha1 VERSION = 'V1alpha1' - REVISION = '20200317' + REVISION = '20200520' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/cloudbuild_v1alpha1/classes.rb b/generated/google/apis/cloudbuild_v1alpha1/classes.rb index 4d40544e3..2b091408f 100644 --- a/generated/google/apis/cloudbuild_v1alpha1/classes.rb +++ b/generated/google/apis/cloudbuild_v1alpha1/classes.rb @@ -262,6 +262,7 @@ module Google # Amount of time that this build should be allowed to run, to second # granularity. If this amount of time elapses, work on the build will cease # and the build status will be `TIMEOUT`. + # `timeout` starts ticking from `startTime`. # Default time is ten minutes. # Corresponds to the JSON property `timeout` # @return [String] @@ -611,6 +612,19 @@ module Google end end + # The request message for Operations.CancelOperation. + class CancelOperationRequest + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + # 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: @@ -676,6 +690,31 @@ module Google end end + # The response message for Operations.ListOperations. + class ListOperationsResponse + include Google::Apis::Core::Hashable + + # The standard List next-page token. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # A list of operations that matches the specified filter in the request. + # Corresponds to the JSON property `operations` + # @return [Array] + attr_accessor :operations + + 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) + @operations = args[:operations] if args.key?(:operations) + end + end + # Response containing existing `WorkerPools`. class ListWorkerPoolsResponse include Google::Apis::Core::Hashable @@ -732,6 +771,70 @@ module Google end end + # This resource represents a long-running operation that is the result of a + # network API call. + class Operation + include Google::Apis::Core::Hashable + + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # Corresponds to the JSON property `done` + # @return [Boolean] + attr_accessor :done + alias_method :done?, :done + + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # Corresponds to the JSON property `error` + # @return [Google::Apis::CloudbuildV1alpha1::Status] + attr_accessor :error + + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # Corresponds to the JSON property `metadata` + # @return [Hash] + attr_accessor :metadata + + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/`unique_id``. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The normal response of the operation in case of success. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # Corresponds to the JSON property `response` + # @return [Hash] + attr_accessor :response + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @done = args[:done] if args.key?(:done) + @error = args[:error] if args.key?(:error) + @metadata = args[:metadata] if args.key?(:metadata) + @name = args[:name] if args.key?(:name) + @response = args[:response] if args.key?(:response) + end + end + # Location of the source in a Google Cloud Source Repository. class RepoSource include Google::Apis::Core::Hashable @@ -951,6 +1054,45 @@ module Google end end + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + class Status + include Google::Apis::Core::Hashable + + # The status code, which should be an enum value of google.rpc.Code. + # Corresponds to the JSON property `code` + # @return [Fixnum] + attr_accessor :code + + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + # Corresponds to the JSON property `details` + # @return [Array>] + attr_accessor :details + + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # google.rpc.Status.details field, or localized by the client. + # Corresponds to the JSON property `message` + # @return [String] + attr_accessor :message + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @code = args[:code] if args.key?(:code) + @details = args[:details] if args.key?(:details) + @message = args[:message] if args.key?(:message) + end + end + # Location of the source in an archive file in Google Cloud Storage. class StorageSource include Google::Apis::Core::Hashable diff --git a/generated/google/apis/cloudbuild_v1alpha1/representations.rb b/generated/google/apis/cloudbuild_v1alpha1/representations.rb index 055a052e1..d383cc314 100644 --- a/generated/google/apis/cloudbuild_v1alpha1/representations.rb +++ b/generated/google/apis/cloudbuild_v1alpha1/representations.rb @@ -70,6 +70,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class CancelOperationRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class Empty class Representation < Google::Apis::Core::JsonRepresentation; end @@ -88,6 +94,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class ListOperationsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class ListWorkerPoolsResponse class Representation < Google::Apis::Core::JsonRepresentation; end @@ -100,6 +112,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class Operation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class RepoSource class Representation < Google::Apis::Core::JsonRepresentation; end @@ -130,6 +148,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class Status + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class StorageSource class Representation < Google::Apis::Core::JsonRepresentation; end @@ -283,6 +307,12 @@ module Google end end + class CancelOperationRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + class Empty # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -305,6 +335,15 @@ module Google end end + class ListOperationsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :operations, as: 'operations', class: Google::Apis::CloudbuildV1alpha1::Operation, decorator: Google::Apis::CloudbuildV1alpha1::Operation::Representation + + end + end + class ListWorkerPoolsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -322,6 +361,18 @@ module Google end end + class Operation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :done, as: 'done' + property :error, as: 'error', class: Google::Apis::CloudbuildV1alpha1::Status, decorator: Google::Apis::CloudbuildV1alpha1::Status::Representation + + hash :metadata, as: 'metadata' + property :name, as: 'name' + hash :response, as: 'response' + end + end + class RepoSource # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -380,6 +431,15 @@ module Google end end + class Status + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :code, as: 'code' + collection :details, as: 'details' + property :message, as: 'message' + end + end + class StorageSource # @private class Representation < Google::Apis::Core::JsonRepresentation diff --git a/generated/google/apis/cloudbuild_v1alpha1/service.rb b/generated/google/apis/cloudbuild_v1alpha1/service.rb index d2267bb90..ac4730d57 100644 --- a/generated/google/apis/cloudbuild_v1alpha1/service.rb +++ b/generated/google/apis/cloudbuild_v1alpha1/service.rb @@ -47,6 +47,127 @@ module Google @batch_path = 'batch' end + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an Operation.error value with a google.rpc.Status.code of 1, + # corresponding to `Code.CANCELLED`. + # @param [String] name + # The name of the operation resource to be cancelled. + # @param [Google::Apis::CloudbuildV1alpha1::CancelOperationRequest] cancel_operation_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudbuildV1alpha1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudbuildV1alpha1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1alpha1/{+name}:cancel', options) + command.request_representation = Google::Apis::CloudbuildV1alpha1::CancelOperationRequest::Representation + command.request_object = cancel_operation_request_object + command.response_representation = Google::Apis::CloudbuildV1alpha1::Empty::Representation + command.response_class = Google::Apis::CloudbuildV1alpha1::Empty + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # @param [String] name + # The name of the operation resource. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudbuildV1alpha1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudbuildV1alpha1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1alpha1/{+name}', options) + command.response_representation = Google::Apis::CloudbuildV1alpha1::Operation::Representation + command.response_class = Google::Apis::CloudbuildV1alpha1::Operation + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # NOTE: the `name` binding allows API services to override the binding + # to use different resource name schemes, such as `users/*/operations`. To + # override the binding, API services can add a binding such as + # `"/v1/`name=users/*`/operations"` to their service configuration. + # For backwards compatibility, the default name includes the operations + # collection id, however overriding users must ensure the name binding + # is the parent resource, without the operations collection id. + # @param [String] name + # The name of the operation's parent resource. + # @param [String] filter + # The standard list filter. + # @param [Fixnum] page_size + # The standard list page size. + # @param [String] page_token + # The standard list page token. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudbuildV1alpha1::ListOperationsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudbuildV1alpha1::ListOperationsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1alpha1/{+name}/operations', options) + command.response_representation = Google::Apis::CloudbuildV1alpha1::ListOperationsResponse::Representation + command.response_class = Google::Apis::CloudbuildV1alpha1::ListOperationsResponse + command.params['name'] = name unless name.nil? + command.query['filter'] = filter unless filter.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Creates a `WorkerPool` to run the builds, and returns the new worker pool. # @param [String] parent # ID of the parent project. diff --git a/generated/google/apis/cloudbuild_v1alpha2.rb b/generated/google/apis/cloudbuild_v1alpha2.rb index ad713e1d9..a044d1af0 100644 --- a/generated/google/apis/cloudbuild_v1alpha2.rb +++ b/generated/google/apis/cloudbuild_v1alpha2.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/cloud-build/docs/ module CloudbuildV1alpha2 VERSION = 'V1alpha2' - REVISION = '20200317' + REVISION = '20200520' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/cloudbuild_v1alpha2/classes.rb b/generated/google/apis/cloudbuild_v1alpha2/classes.rb index 8a0a3bcc4..8770a9db4 100644 --- a/generated/google/apis/cloudbuild_v1alpha2/classes.rb +++ b/generated/google/apis/cloudbuild_v1alpha2/classes.rb @@ -262,6 +262,7 @@ module Google # Amount of time that this build should be allowed to run, to second # granularity. If this amount of time elapses, work on the build will cease # and the build status will be `TIMEOUT`. + # `timeout` starts ticking from `startTime`. # Default time is ten minutes. # Corresponds to the JSON property `timeout` # @return [String] @@ -611,6 +612,19 @@ module Google end end + # The request message for Operations.CancelOperation. + class CancelOperationRequest + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + # 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: @@ -676,6 +690,31 @@ module Google end end + # The response message for Operations.ListOperations. + class ListOperationsResponse + include Google::Apis::Core::Hashable + + # The standard List next-page token. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # A list of operations that matches the specified filter in the request. + # Corresponds to the JSON property `operations` + # @return [Array] + attr_accessor :operations + + 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) + @operations = args[:operations] if args.key?(:operations) + end + end + # Response containing existing `WorkerPools`. class ListWorkerPoolsResponse include Google::Apis::Core::Hashable @@ -719,6 +758,70 @@ module Google end end + # This resource represents a long-running operation that is the result of a + # network API call. + class Operation + include Google::Apis::Core::Hashable + + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # Corresponds to the JSON property `done` + # @return [Boolean] + attr_accessor :done + alias_method :done?, :done + + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # Corresponds to the JSON property `error` + # @return [Google::Apis::CloudbuildV1alpha2::Status] + attr_accessor :error + + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # Corresponds to the JSON property `metadata` + # @return [Hash] + attr_accessor :metadata + + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/`unique_id``. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The normal response of the operation in case of success. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # Corresponds to the JSON property `response` + # @return [Hash] + attr_accessor :response + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @done = args[:done] if args.key?(:done) + @error = args[:error] if args.key?(:error) + @metadata = args[:metadata] if args.key?(:metadata) + @name = args[:name] if args.key?(:name) + @response = args[:response] if args.key?(:response) + end + end + # Location of the source in a Google Cloud Source Repository. class RepoSource include Google::Apis::Core::Hashable @@ -938,6 +1041,45 @@ module Google end end + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + class Status + include Google::Apis::Core::Hashable + + # The status code, which should be an enum value of google.rpc.Code. + # Corresponds to the JSON property `code` + # @return [Fixnum] + attr_accessor :code + + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + # Corresponds to the JSON property `details` + # @return [Array>] + attr_accessor :details + + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # google.rpc.Status.details field, or localized by the client. + # Corresponds to the JSON property `message` + # @return [String] + attr_accessor :message + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @code = args[:code] if args.key?(:code) + @details = args[:details] if args.key?(:details) + @message = args[:message] if args.key?(:message) + end + end + # Location of the source in an archive file in Google Cloud Storage. class StorageSource include Google::Apis::Core::Hashable diff --git a/generated/google/apis/cloudbuild_v1alpha2/representations.rb b/generated/google/apis/cloudbuild_v1alpha2/representations.rb index d844198b7..d7ce5beda 100644 --- a/generated/google/apis/cloudbuild_v1alpha2/representations.rb +++ b/generated/google/apis/cloudbuild_v1alpha2/representations.rb @@ -70,6 +70,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class CancelOperationRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class Empty class Representation < Google::Apis::Core::JsonRepresentation; end @@ -88,6 +94,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class ListOperationsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class ListWorkerPoolsResponse class Representation < Google::Apis::Core::JsonRepresentation; end @@ -100,6 +112,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class Operation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class RepoSource class Representation < Google::Apis::Core::JsonRepresentation; end @@ -130,6 +148,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class Status + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class StorageSource class Representation < Google::Apis::Core::JsonRepresentation; end @@ -283,6 +307,12 @@ module Google end end + class CancelOperationRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + class Empty # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -305,6 +335,15 @@ module Google end end + class ListOperationsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :operations, as: 'operations', class: Google::Apis::CloudbuildV1alpha2::Operation, decorator: Google::Apis::CloudbuildV1alpha2::Operation::Representation + + end + end + class ListWorkerPoolsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -320,6 +359,18 @@ module Google end end + class Operation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :done, as: 'done' + property :error, as: 'error', class: Google::Apis::CloudbuildV1alpha2::Status, decorator: Google::Apis::CloudbuildV1alpha2::Status::Representation + + hash :metadata, as: 'metadata' + property :name, as: 'name' + hash :response, as: 'response' + end + end + class RepoSource # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -378,6 +429,15 @@ module Google end end + class Status + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :code, as: 'code' + collection :details, as: 'details' + property :message, as: 'message' + end + end + class StorageSource # @private class Representation < Google::Apis::Core::JsonRepresentation diff --git a/generated/google/apis/cloudbuild_v1alpha2/service.rb b/generated/google/apis/cloudbuild_v1alpha2/service.rb index 607c2a1df..4fa1a914a 100644 --- a/generated/google/apis/cloudbuild_v1alpha2/service.rb +++ b/generated/google/apis/cloudbuild_v1alpha2/service.rb @@ -47,6 +47,127 @@ module Google @batch_path = 'batch' end + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an Operation.error value with a google.rpc.Status.code of 1, + # corresponding to `Code.CANCELLED`. + # @param [String] name + # The name of the operation resource to be cancelled. + # @param [Google::Apis::CloudbuildV1alpha2::CancelOperationRequest] cancel_operation_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudbuildV1alpha2::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudbuildV1alpha2::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1alpha2/{+name}:cancel', options) + command.request_representation = Google::Apis::CloudbuildV1alpha2::CancelOperationRequest::Representation + command.request_object = cancel_operation_request_object + command.response_representation = Google::Apis::CloudbuildV1alpha2::Empty::Representation + command.response_class = Google::Apis::CloudbuildV1alpha2::Empty + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # @param [String] name + # The name of the operation resource. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudbuildV1alpha2::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudbuildV1alpha2::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1alpha2/{+name}', options) + command.response_representation = Google::Apis::CloudbuildV1alpha2::Operation::Representation + command.response_class = Google::Apis::CloudbuildV1alpha2::Operation + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # NOTE: the `name` binding allows API services to override the binding + # to use different resource name schemes, such as `users/*/operations`. To + # override the binding, API services can add a binding such as + # `"/v1/`name=users/*`/operations"` to their service configuration. + # For backwards compatibility, the default name includes the operations + # collection id, however overriding users must ensure the name binding + # is the parent resource, without the operations collection id. + # @param [String] name + # The name of the operation's parent resource. + # @param [String] filter + # The standard list filter. + # @param [Fixnum] page_size + # The standard list page size. + # @param [String] page_token + # The standard list page token. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudbuildV1alpha2::ListOperationsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudbuildV1alpha2::ListOperationsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1alpha2/{+name}/operations', options) + command.response_representation = Google::Apis::CloudbuildV1alpha2::ListOperationsResponse::Representation + command.response_class = Google::Apis::CloudbuildV1alpha2::ListOperationsResponse + command.params['name'] = name unless name.nil? + command.query['filter'] = filter unless filter.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Creates a `WorkerPool` to run the builds, and returns the new worker pool. # @param [String] parent # Required. The parent resource where this book will be created. diff --git a/generated/google/apis/dialogflow_v3alpha1.rb b/generated/google/apis/dialogflow_v3alpha1.rb new file mode 100644 index 000000000..303ab6aef --- /dev/null +++ b/generated/google/apis/dialogflow_v3alpha1.rb @@ -0,0 +1,38 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'google/apis/dialogflow_v3alpha1/service.rb' +require 'google/apis/dialogflow_v3alpha1/classes.rb' +require 'google/apis/dialogflow_v3alpha1/representations.rb' + +module Google + module Apis + # Dialogflow API + # + # Builds conversational interfaces (for example, chatbots, and voice-powered + # apps and devices). + # + # @see https://cloud.google.com/dialogflow/ + module DialogflowV3alpha1 + VERSION = 'V3alpha1' + REVISION = '20200518' + + # View and manage your data across Google Cloud Platform services + AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' + + # View, manage and query your Dialogflow agents + AUTH_DIALOGFLOW = 'https://www.googleapis.com/auth/dialogflow' + end + end +end diff --git a/generated/google/apis/dialogflow_v3alpha1/classes.rb b/generated/google/apis/dialogflow_v3alpha1/classes.rb new file mode 100644 index 000000000..34fe64f30 --- /dev/null +++ b/generated/google/apis/dialogflow_v3alpha1/classes.rb @@ -0,0 +1,5022 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'date' +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module DialogflowV3alpha1 + + # Represents a part of a message possibly annotated with an entity. The part + # can be an entity or purely a part of the message between two entities or + # message start/end. + class GoogleCloudDialogflowV2AnnotatedMessagePart + include Google::Apis::Core::Hashable + + # The [Dialogflow system entity + # type](https://cloud.google.com/dialogflow/docs/reference/system-entities) + # of this message part. If this is empty, Dialogflow could not annotate the + # phrase part with a system entity. + # Corresponds to the JSON property `entityType` + # @return [String] + attr_accessor :entity_type + + # The [Dialogflow system entity formatted value + # ](https://cloud.google.com/dialogflow/docs/reference/system-entities) of + # this message part. For example for a system entity of type + # `@sys.unit-currency`, this may contain: + #
+        # `
+        # "amount": 5,
+        # "currency": "USD"
+        # `
+        # 
+ # Corresponds to the JSON property `formattedValue` + # @return [Object] + attr_accessor :formatted_value + + # A part of a message possibly annotated with an entity. + # Corresponds to the JSON property `text` + # @return [String] + attr_accessor :text + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @entity_type = args[:entity_type] if args.key?(:entity_type) + @formatted_value = args[:formatted_value] if args.key?(:formatted_value) + @text = args[:text] if args.key?(:text) + end + end + + # The response message for EntityTypes.BatchUpdateEntityTypes. + class GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse + include Google::Apis::Core::Hashable + + # The collection of updated or created entity types. + # Corresponds to the JSON property `entityTypes` + # @return [Array] + attr_accessor :entity_types + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @entity_types = args[:entity_types] if args.key?(:entity_types) + end + end + + # The response message for Intents.BatchUpdateIntents. + class GoogleCloudDialogflowV2BatchUpdateIntentsResponse + include Google::Apis::Core::Hashable + + # The collection of updated or created intents. + # Corresponds to the JSON property `intents` + # @return [Array] + attr_accessor :intents + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @intents = args[:intents] if args.key?(:intents) + end + end + + # Represents a context. + class GoogleCloudDialogflowV2Context + include Google::Apis::Core::Hashable + + # Optional. The number of conversational query requests after which the + # context expires. The default is `0`. If set to `0`, the context expires + # immediately. Contexts expire automatically after 20 minutes if there + # are no matching queries. + # Corresponds to the JSON property `lifespanCount` + # @return [Fixnum] + attr_accessor :lifespan_count + + # Required. The unique identifier of the context. Format: + # `projects//agent/sessions//contexts/`, + # or `projects//agent/environments//users//sessions//contexts/`. + # The `Context ID` is always converted to lowercase, may only contain + # characters in a-zA-Z0-9_-% and may be at most 250 bytes long. + # If `Environment ID` is not specified, we assume default 'draft' + # environment. If `User ID` is not specified, we assume default '-' user. + # The following context names are reserved for internal use by Dialogflow. + # You should not use these contexts or create contexts with these names: + # * `__system_counters__` + # * `*_id_dialog_context` + # * `*_dialog_params_size` + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Optional. The collection of parameters associated with this context. + # Depending on your protocol or client library language, this is a + # map, associative array, symbol table, dictionary, or JSON object + # composed of a collection of (MapKey, MapValue) pairs: + # - MapKey type: string + # - MapKey value: parameter name + # - MapValue type: + # - If parameter's entity type is a composite entity: map + # - Else: string or number, depending on parameter value type + # - MapValue value: + # - If parameter's entity type is a composite entity: + # map from composite entity property names to property values + # - Else: parameter value + # Corresponds to the JSON property `parameters` + # @return [Hash] + attr_accessor :parameters + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @lifespan_count = args[:lifespan_count] if args.key?(:lifespan_count) + @name = args[:name] if args.key?(:name) + @parameters = args[:parameters] if args.key?(:parameters) + end + end + + # Represents a notification sent to Cloud Pub/Sub subscribers for conversation + # lifecycle events. + class GoogleCloudDialogflowV2ConversationEvent + include Google::Apis::Core::Hashable + + # The unique identifier of the conversation this notification + # refers to. + # Format: `projects//conversations/`. + # Corresponds to the JSON property `conversation` + # @return [String] + attr_accessor :conversation + + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # Corresponds to the JSON property `errorStatus` + # @return [Google::Apis::DialogflowV3alpha1::GoogleRpcStatus] + attr_accessor :error_status + + # Represents a message posted into a conversation. + # Corresponds to the JSON property `newMessagePayload` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2Message] + attr_accessor :new_message_payload + + # The type of the event that this notification refers to. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @conversation = args[:conversation] if args.key?(:conversation) + @error_status = args[:error_status] if args.key?(:error_status) + @new_message_payload = args[:new_message_payload] if args.key?(:new_message_payload) + @type = args[:type] if args.key?(:type) + end + end + + # Represents an entity type. + # Entity types serve as a tool for extracting parameter values from natural + # language queries. + class GoogleCloudDialogflowV2EntityType + include Google::Apis::Core::Hashable + + # Optional. Indicates whether the entity type can be automatically + # expanded. + # Corresponds to the JSON property `autoExpansionMode` + # @return [String] + attr_accessor :auto_expansion_mode + + # Required. The name of the entity type. + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # Optional. Enables fuzzy entity extraction during classification. + # Corresponds to the JSON property `enableFuzzyExtraction` + # @return [Boolean] + attr_accessor :enable_fuzzy_extraction + alias_method :enable_fuzzy_extraction?, :enable_fuzzy_extraction + + # Optional. The collection of entity entries associated with the entity type. + # Corresponds to the JSON property `entities` + # @return [Array] + attr_accessor :entities + + # Required. Indicates the kind of entity type. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # The unique identifier of the entity type. + # Required for EntityTypes.UpdateEntityType and + # EntityTypes.BatchUpdateEntityTypes methods. + # Format: `projects//agent/entityTypes/`. + # 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) + @auto_expansion_mode = args[:auto_expansion_mode] if args.key?(:auto_expansion_mode) + @display_name = args[:display_name] if args.key?(:display_name) + @enable_fuzzy_extraction = args[:enable_fuzzy_extraction] if args.key?(:enable_fuzzy_extraction) + @entities = args[:entities] if args.key?(:entities) + @kind = args[:kind] if args.key?(:kind) + @name = args[:name] if args.key?(:name) + end + end + + # An **entity entry** for an associated entity type. + class GoogleCloudDialogflowV2EntityTypeEntity + include Google::Apis::Core::Hashable + + # Required. A collection of value synonyms. For example, if the entity type + # is *vegetable*, and `value` is *scallions*, a synonym could be *green + # onions*. + # For `KIND_LIST` entity types: + # * This collection must contain exactly one synonym equal to `value`. + # Corresponds to the JSON property `synonyms` + # @return [Array] + attr_accessor :synonyms + + # Required. The primary value associated with this entity entry. + # For example, if the entity type is *vegetable*, the value could be + # *scallions*. + # For `KIND_MAP` entity types: + # * A reference value to be used in place of synonyms. + # For `KIND_LIST` entity types: + # * A string that can contain references to other entity types (with or + # without aliases). + # Corresponds to the JSON property `value` + # @return [String] + attr_accessor :value + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @synonyms = args[:synonyms] if args.key?(:synonyms) + @value = args[:value] if args.key?(:value) + end + end + + # Events allow for matching intents by event name instead of the natural + # language input. For instance, input `` can trigger a personalized welcome response. + # The parameter `name` may be used by the agent in the response: + # `"Hello #welcome_event.name! What can I do for you today?"`. + class GoogleCloudDialogflowV2EventInput + include Google::Apis::Core::Hashable + + # Required. The language of this query. See [Language + # Support](https://cloud.google.com/dialogflow/docs/reference/language) + # for a list of the currently supported language codes. Note that queries in + # the same session do not necessarily need to specify the same language. + # Corresponds to the JSON property `languageCode` + # @return [String] + attr_accessor :language_code + + # Required. The unique identifier of the event. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The collection of parameters associated with the event. + # Depending on your protocol or client library language, this is a + # map, associative array, symbol table, dictionary, or JSON object + # composed of a collection of (MapKey, MapValue) pairs: + # - MapKey type: string + # - MapKey value: parameter name + # - MapValue type: + # - If parameter's entity type is a composite entity: map + # - Else: string or number, depending on parameter value type + # - MapValue value: + # - If parameter's entity type is a composite entity: + # map from composite entity property names to property values + # - Else: parameter value + # Corresponds to the JSON property `parameters` + # @return [Hash] + attr_accessor :parameters + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @language_code = args[:language_code] if args.key?(:language_code) + @name = args[:name] if args.key?(:name) + @parameters = args[:parameters] if args.key?(:parameters) + end + end + + # The response message for Agents.ExportAgent. + class GoogleCloudDialogflowV2ExportAgentResponse + include Google::Apis::Core::Hashable + + # Zip compressed raw byte content for agent. + # Corresponds to the JSON property `agentContent` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :agent_content + + # The URI to a file containing the exported agent. This field is populated + # only if `agent_uri` is specified in `ExportAgentRequest`. + # Corresponds to the JSON property `agentUri` + # @return [String] + attr_accessor :agent_uri + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @agent_content = args[:agent_content] if args.key?(:agent_content) + @agent_uri = args[:agent_uri] if args.key?(:agent_uri) + end + end + + # Represents an intent. + # Intents convert a number of user expressions or patterns into an action. An + # action is an extraction of a user command or sentence semantics. + class GoogleCloudDialogflowV2Intent + include Google::Apis::Core::Hashable + + # Optional. The name of the action associated with the intent. + # Note: The action name must not contain whitespaces. + # Corresponds to the JSON property `action` + # @return [String] + attr_accessor :action + + # Optional. The list of platforms for which the first responses will be + # copied from the messages in PLATFORM_UNSPECIFIED (i.e. default platform). + # Corresponds to the JSON property `defaultResponsePlatforms` + # @return [Array] + attr_accessor :default_response_platforms + + # Required. The name of this intent. + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # Optional. The collection of event names that trigger the intent. + # If the collection of input contexts is not empty, all of the contexts must + # be present in the active user session for an event to trigger this intent. + # Event names are limited to 150 characters. + # Corresponds to the JSON property `events` + # @return [Array] + attr_accessor :events + + # Read-only. Information about all followup intents that have this intent as + # a direct or indirect parent. We populate this field only in the output. + # Corresponds to the JSON property `followupIntentInfo` + # @return [Array] + attr_accessor :followup_intent_info + + # Optional. The list of context names required for this intent to be + # triggered. + # Format: `projects//agent/sessions/-/contexts/`. + # Corresponds to the JSON property `inputContextNames` + # @return [Array] + attr_accessor :input_context_names + + # Optional. Indicates whether this is a fallback intent. + # Corresponds to the JSON property `isFallback` + # @return [Boolean] + attr_accessor :is_fallback + alias_method :is_fallback?, :is_fallback + + # Optional. The collection of rich messages corresponding to the + # `Response` field in the Dialogflow console. + # Corresponds to the JSON property `messages` + # @return [Array] + attr_accessor :messages + + # Optional. Indicates whether Machine Learning is disabled for the intent. + # Note: If `ml_disabled` setting is set to true, then this intent is not + # taken into account during inference in `ML ONLY` match mode. Also, + # auto-markup in the UI is turned off. + # Corresponds to the JSON property `mlDisabled` + # @return [Boolean] + attr_accessor :ml_disabled + alias_method :ml_disabled?, :ml_disabled + + # Optional. The unique identifier of this intent. + # Required for Intents.UpdateIntent and Intents.BatchUpdateIntents + # methods. + # Format: `projects//agent/intents/`. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Optional. The collection of contexts that are activated when the intent + # is matched. Context messages in this collection should not set the + # parameters field. Setting the `lifespan_count` to 0 will reset the context + # when the intent is matched. + # Format: `projects//agent/sessions/-/contexts/`. + # Corresponds to the JSON property `outputContexts` + # @return [Array] + attr_accessor :output_contexts + + # Optional. The collection of parameters associated with the intent. + # Corresponds to the JSON property `parameters` + # @return [Array] + attr_accessor :parameters + + # Read-only after creation. The unique identifier of the parent intent in the + # chain of followup intents. You can set this field when creating an intent, + # for example with CreateIntent or + # BatchUpdateIntents, in order to make this + # intent a followup intent. + # It identifies the parent followup intent. + # Format: `projects//agent/intents/`. + # Corresponds to the JSON property `parentFollowupIntentName` + # @return [String] + attr_accessor :parent_followup_intent_name + + # Optional. The priority of this intent. Higher numbers represent higher + # priorities. + # - If the supplied value is unspecified or 0, the service + # translates the value to 500,000, which corresponds to the + # `Normal` priority in the console. + # - If the supplied value is negative, the intent is ignored + # in runtime detect intent requests. + # Corresponds to the JSON property `priority` + # @return [Fixnum] + attr_accessor :priority + + # Optional. Indicates whether to delete all contexts in the current + # session when this intent is matched. + # Corresponds to the JSON property `resetContexts` + # @return [Boolean] + attr_accessor :reset_contexts + alias_method :reset_contexts?, :reset_contexts + + # Read-only. The unique identifier of the root intent in the chain of + # followup intents. It identifies the correct followup intents chain for + # this intent. We populate this field only in the output. + # Format: `projects//agent/intents/`. + # Corresponds to the JSON property `rootFollowupIntentName` + # @return [String] + attr_accessor :root_followup_intent_name + + # Optional. The collection of examples that the agent is + # trained on. + # Corresponds to the JSON property `trainingPhrases` + # @return [Array] + attr_accessor :training_phrases + + # Optional. Indicates whether webhooks are enabled for the intent. + # Corresponds to the JSON property `webhookState` + # @return [String] + attr_accessor :webhook_state + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @action = args[:action] if args.key?(:action) + @default_response_platforms = args[:default_response_platforms] if args.key?(:default_response_platforms) + @display_name = args[:display_name] if args.key?(:display_name) + @events = args[:events] if args.key?(:events) + @followup_intent_info = args[:followup_intent_info] if args.key?(:followup_intent_info) + @input_context_names = args[:input_context_names] if args.key?(:input_context_names) + @is_fallback = args[:is_fallback] if args.key?(:is_fallback) + @messages = args[:messages] if args.key?(:messages) + @ml_disabled = args[:ml_disabled] if args.key?(:ml_disabled) + @name = args[:name] if args.key?(:name) + @output_contexts = args[:output_contexts] if args.key?(:output_contexts) + @parameters = args[:parameters] if args.key?(:parameters) + @parent_followup_intent_name = args[:parent_followup_intent_name] if args.key?(:parent_followup_intent_name) + @priority = args[:priority] if args.key?(:priority) + @reset_contexts = args[:reset_contexts] if args.key?(:reset_contexts) + @root_followup_intent_name = args[:root_followup_intent_name] if args.key?(:root_followup_intent_name) + @training_phrases = args[:training_phrases] if args.key?(:training_phrases) + @webhook_state = args[:webhook_state] if args.key?(:webhook_state) + end + end + + # Represents a single followup intent in the chain. + class GoogleCloudDialogflowV2IntentFollowupIntentInfo + include Google::Apis::Core::Hashable + + # The unique identifier of the followup intent. + # Format: `projects//agent/intents/`. + # Corresponds to the JSON property `followupIntentName` + # @return [String] + attr_accessor :followup_intent_name + + # The unique identifier of the followup intent's parent. + # Format: `projects//agent/intents/`. + # Corresponds to the JSON property `parentFollowupIntentName` + # @return [String] + attr_accessor :parent_followup_intent_name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @followup_intent_name = args[:followup_intent_name] if args.key?(:followup_intent_name) + @parent_followup_intent_name = args[:parent_followup_intent_name] if args.key?(:parent_followup_intent_name) + end + end + + # A rich response message. + # Corresponds to the intent `Response` field in the Dialogflow console. + # For more information, see + # [Rich response + # messages](https://cloud.google.com/dialogflow/docs/intents-rich-messages). + class GoogleCloudDialogflowV2IntentMessage + include Google::Apis::Core::Hashable + + # The basic card message. Useful for displaying information. + # Corresponds to the JSON property `basicCard` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageBasicCard] + attr_accessor :basic_card + + # Browse Carousel Card for Actions on Google. + # https://developers.google.com/actions/assistant/responses#browsing_carousel + # Corresponds to the JSON property `browseCarouselCard` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard] + attr_accessor :browse_carousel_card + + # The card response message. + # Corresponds to the JSON property `card` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageCard] + attr_accessor :card + + # The card for presenting a carousel of options to select from. + # Corresponds to the JSON property `carouselSelect` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageCarouselSelect] + attr_accessor :carousel_select + + # The image response message. + # Corresponds to the JSON property `image` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageImage] + attr_accessor :image + + # The suggestion chip message that allows the user to jump out to the app + # or website associated with this agent. + # Corresponds to the JSON property `linkOutSuggestion` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion] + attr_accessor :link_out_suggestion + + # The card for presenting a list of options to select from. + # Corresponds to the JSON property `listSelect` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageListSelect] + attr_accessor :list_select + + # The media content card for Actions on Google. + # Corresponds to the JSON property `mediaContent` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageMediaContent] + attr_accessor :media_content + + # A custom platform-specific response. + # Corresponds to the JSON property `payload` + # @return [Hash] + attr_accessor :payload + + # Optional. The platform that this message is intended for. + # Corresponds to the JSON property `platform` + # @return [String] + attr_accessor :platform + + # The quick replies response message. + # Corresponds to the JSON property `quickReplies` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageQuickReplies] + attr_accessor :quick_replies + + # The collection of simple response candidates. + # This message in `QueryResult.fulfillment_messages` and + # `WebhookResponse.fulfillment_messages` should contain only one + # `SimpleResponse`. + # Corresponds to the JSON property `simpleResponses` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageSimpleResponses] + attr_accessor :simple_responses + + # The collection of suggestions. + # Corresponds to the JSON property `suggestions` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageSuggestions] + attr_accessor :suggestions + + # Table card for Actions on Google. + # Corresponds to the JSON property `tableCard` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageTableCard] + attr_accessor :table_card + + # The text response message. + # Corresponds to the JSON property `text` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageText] + attr_accessor :text + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @basic_card = args[:basic_card] if args.key?(:basic_card) + @browse_carousel_card = args[:browse_carousel_card] if args.key?(:browse_carousel_card) + @card = args[:card] if args.key?(:card) + @carousel_select = args[:carousel_select] if args.key?(:carousel_select) + @image = args[:image] if args.key?(:image) + @link_out_suggestion = args[:link_out_suggestion] if args.key?(:link_out_suggestion) + @list_select = args[:list_select] if args.key?(:list_select) + @media_content = args[:media_content] if args.key?(:media_content) + @payload = args[:payload] if args.key?(:payload) + @platform = args[:platform] if args.key?(:platform) + @quick_replies = args[:quick_replies] if args.key?(:quick_replies) + @simple_responses = args[:simple_responses] if args.key?(:simple_responses) + @suggestions = args[:suggestions] if args.key?(:suggestions) + @table_card = args[:table_card] if args.key?(:table_card) + @text = args[:text] if args.key?(:text) + end + end + + # The basic card message. Useful for displaying information. + class GoogleCloudDialogflowV2IntentMessageBasicCard + include Google::Apis::Core::Hashable + + # Optional. The collection of card buttons. + # Corresponds to the JSON property `buttons` + # @return [Array] + attr_accessor :buttons + + # Required, unless image is present. The body text of the card. + # Corresponds to the JSON property `formattedText` + # @return [String] + attr_accessor :formatted_text + + # The image response message. + # Corresponds to the JSON property `image` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageImage] + attr_accessor :image + + # Optional. The subtitle of the card. + # Corresponds to the JSON property `subtitle` + # @return [String] + attr_accessor :subtitle + + # Optional. The title of the card. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @buttons = args[:buttons] if args.key?(:buttons) + @formatted_text = args[:formatted_text] if args.key?(:formatted_text) + @image = args[:image] if args.key?(:image) + @subtitle = args[:subtitle] if args.key?(:subtitle) + @title = args[:title] if args.key?(:title) + end + end + + # The button object that appears at the bottom of a card. + class GoogleCloudDialogflowV2IntentMessageBasicCardButton + include Google::Apis::Core::Hashable + + # Opens the given URI. + # Corresponds to the JSON property `openUriAction` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction] + attr_accessor :open_uri_action + + # Required. The title of the button. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @open_uri_action = args[:open_uri_action] if args.key?(:open_uri_action) + @title = args[:title] if args.key?(:title) + end + end + + # Opens the given URI. + class GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction + include Google::Apis::Core::Hashable + + # Required. The HTTP or HTTPS scheme URI. + # Corresponds to the JSON property `uri` + # @return [String] + attr_accessor :uri + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @uri = args[:uri] if args.key?(:uri) + end + end + + # Browse Carousel Card for Actions on Google. + # https://developers.google.com/actions/assistant/responses#browsing_carousel + class GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard + include Google::Apis::Core::Hashable + + # Optional. Settings for displaying the image. Applies to every image in + # items. + # Corresponds to the JSON property `imageDisplayOptions` + # @return [String] + attr_accessor :image_display_options + + # Required. List of items in the Browse Carousel Card. Minimum of two + # items, maximum of ten. + # Corresponds to the JSON property `items` + # @return [Array] + attr_accessor :items + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @image_display_options = args[:image_display_options] if args.key?(:image_display_options) + @items = args[:items] if args.key?(:items) + end + end + + # Browsing carousel tile + class GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem + include Google::Apis::Core::Hashable + + # Optional. Description of the carousel item. Maximum of four lines of + # text. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # Optional. Text that appears at the bottom of the Browse Carousel + # Card. Maximum of one line of text. + # Corresponds to the JSON property `footer` + # @return [String] + attr_accessor :footer + + # The image response message. + # Corresponds to the JSON property `image` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageImage] + attr_accessor :image + + # Actions on Google action to open a given url. + # Corresponds to the JSON property `openUriAction` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction] + attr_accessor :open_uri_action + + # Required. Title of the carousel item. Maximum of two lines of text. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @description = args[:description] if args.key?(:description) + @footer = args[:footer] if args.key?(:footer) + @image = args[:image] if args.key?(:image) + @open_uri_action = args[:open_uri_action] if args.key?(:open_uri_action) + @title = args[:title] if args.key?(:title) + end + end + + # Actions on Google action to open a given url. + class GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction + include Google::Apis::Core::Hashable + + # Required. URL + # Corresponds to the JSON property `url` + # @return [String] + attr_accessor :url + + # Optional. Specifies the type of viewer that is used when opening + # the URL. Defaults to opening via web browser. + # Corresponds to the JSON property `urlTypeHint` + # @return [String] + attr_accessor :url_type_hint + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @url = args[:url] if args.key?(:url) + @url_type_hint = args[:url_type_hint] if args.key?(:url_type_hint) + end + end + + # The card response message. + class GoogleCloudDialogflowV2IntentMessageCard + include Google::Apis::Core::Hashable + + # Optional. The collection of card buttons. + # Corresponds to the JSON property `buttons` + # @return [Array] + attr_accessor :buttons + + # Optional. The public URI to an image file for the card. + # Corresponds to the JSON property `imageUri` + # @return [String] + attr_accessor :image_uri + + # Optional. The subtitle of the card. + # Corresponds to the JSON property `subtitle` + # @return [String] + attr_accessor :subtitle + + # Optional. The title of the card. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @buttons = args[:buttons] if args.key?(:buttons) + @image_uri = args[:image_uri] if args.key?(:image_uri) + @subtitle = args[:subtitle] if args.key?(:subtitle) + @title = args[:title] if args.key?(:title) + end + end + + # Contains information about a button. + class GoogleCloudDialogflowV2IntentMessageCardButton + include Google::Apis::Core::Hashable + + # Optional. The text to send back to the Dialogflow API or a URI to + # open. + # Corresponds to the JSON property `postback` + # @return [String] + attr_accessor :postback + + # Optional. The text to show on the button. + # Corresponds to the JSON property `text` + # @return [String] + attr_accessor :text + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @postback = args[:postback] if args.key?(:postback) + @text = args[:text] if args.key?(:text) + end + end + + # The card for presenting a carousel of options to select from. + class GoogleCloudDialogflowV2IntentMessageCarouselSelect + include Google::Apis::Core::Hashable + + # Required. Carousel items. + # Corresponds to the JSON property `items` + # @return [Array] + attr_accessor :items + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @items = args[:items] if args.key?(:items) + end + end + + # An item in the carousel. + class GoogleCloudDialogflowV2IntentMessageCarouselSelectItem + include Google::Apis::Core::Hashable + + # Optional. The body text of the card. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # The image response message. + # Corresponds to the JSON property `image` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageImage] + attr_accessor :image + + # Additional info about the select item for when it is triggered in a + # dialog. + # Corresponds to the JSON property `info` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageSelectItemInfo] + attr_accessor :info + + # Required. Title of the carousel item. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @description = args[:description] if args.key?(:description) + @image = args[:image] if args.key?(:image) + @info = args[:info] if args.key?(:info) + @title = args[:title] if args.key?(:title) + end + end + + # Column properties for TableCard. + class GoogleCloudDialogflowV2IntentMessageColumnProperties + include Google::Apis::Core::Hashable + + # Required. Column heading. + # Corresponds to the JSON property `header` + # @return [String] + attr_accessor :header + + # Optional. Defines text alignment for all cells in this column. + # Corresponds to the JSON property `horizontalAlignment` + # @return [String] + attr_accessor :horizontal_alignment + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @header = args[:header] if args.key?(:header) + @horizontal_alignment = args[:horizontal_alignment] if args.key?(:horizontal_alignment) + end + end + + # The image response message. + class GoogleCloudDialogflowV2IntentMessageImage + include Google::Apis::Core::Hashable + + # Optional. A text description of the image to be used for accessibility, + # e.g., screen readers. + # Corresponds to the JSON property `accessibilityText` + # @return [String] + attr_accessor :accessibility_text + + # Optional. The public URI to an image file. + # Corresponds to the JSON property `imageUri` + # @return [String] + attr_accessor :image_uri + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @accessibility_text = args[:accessibility_text] if args.key?(:accessibility_text) + @image_uri = args[:image_uri] if args.key?(:image_uri) + end + end + + # The suggestion chip message that allows the user to jump out to the app + # or website associated with this agent. + class GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion + include Google::Apis::Core::Hashable + + # Required. The name of the app or site this chip is linking to. + # Corresponds to the JSON property `destinationName` + # @return [String] + attr_accessor :destination_name + + # Required. The URI of the app or site to open when the user taps the + # suggestion chip. + # Corresponds to the JSON property `uri` + # @return [String] + attr_accessor :uri + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @destination_name = args[:destination_name] if args.key?(:destination_name) + @uri = args[:uri] if args.key?(:uri) + end + end + + # The card for presenting a list of options to select from. + class GoogleCloudDialogflowV2IntentMessageListSelect + include Google::Apis::Core::Hashable + + # Required. List items. + # Corresponds to the JSON property `items` + # @return [Array] + attr_accessor :items + + # Optional. Subtitle of the list. + # Corresponds to the JSON property `subtitle` + # @return [String] + attr_accessor :subtitle + + # Optional. The overall title of the list. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @items = args[:items] if args.key?(:items) + @subtitle = args[:subtitle] if args.key?(:subtitle) + @title = args[:title] if args.key?(:title) + end + end + + # An item in the list. + class GoogleCloudDialogflowV2IntentMessageListSelectItem + include Google::Apis::Core::Hashable + + # Optional. The main text describing the item. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # The image response message. + # Corresponds to the JSON property `image` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageImage] + attr_accessor :image + + # Additional info about the select item for when it is triggered in a + # dialog. + # Corresponds to the JSON property `info` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageSelectItemInfo] + attr_accessor :info + + # Required. The title of the list item. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @description = args[:description] if args.key?(:description) + @image = args[:image] if args.key?(:image) + @info = args[:info] if args.key?(:info) + @title = args[:title] if args.key?(:title) + end + end + + # The media content card for Actions on Google. + class GoogleCloudDialogflowV2IntentMessageMediaContent + include Google::Apis::Core::Hashable + + # Required. List of media objects. + # Corresponds to the JSON property `mediaObjects` + # @return [Array] + attr_accessor :media_objects + + # Optional. What type of media is the content (ie "audio"). + # Corresponds to the JSON property `mediaType` + # @return [String] + attr_accessor :media_type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @media_objects = args[:media_objects] if args.key?(:media_objects) + @media_type = args[:media_type] if args.key?(:media_type) + end + end + + # Response media object for media content card. + class GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject + include Google::Apis::Core::Hashable + + # Required. Url where the media is stored. + # Corresponds to the JSON property `contentUrl` + # @return [String] + attr_accessor :content_url + + # Optional. Description of media card. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # The image response message. + # Corresponds to the JSON property `icon` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageImage] + attr_accessor :icon + + # The image response message. + # Corresponds to the JSON property `largeImage` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageImage] + attr_accessor :large_image + + # Required. Name of media card. + # 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) + @content_url = args[:content_url] if args.key?(:content_url) + @description = args[:description] if args.key?(:description) + @icon = args[:icon] if args.key?(:icon) + @large_image = args[:large_image] if args.key?(:large_image) + @name = args[:name] if args.key?(:name) + end + end + + # The quick replies response message. + class GoogleCloudDialogflowV2IntentMessageQuickReplies + include Google::Apis::Core::Hashable + + # Optional. The collection of quick replies. + # Corresponds to the JSON property `quickReplies` + # @return [Array] + attr_accessor :quick_replies + + # Optional. The title of the collection of quick replies. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @quick_replies = args[:quick_replies] if args.key?(:quick_replies) + @title = args[:title] if args.key?(:title) + end + end + + # Additional info about the select item for when it is triggered in a + # dialog. + class GoogleCloudDialogflowV2IntentMessageSelectItemInfo + include Google::Apis::Core::Hashable + + # Required. A unique key that will be sent back to the agent if this + # response is given. + # Corresponds to the JSON property `key` + # @return [String] + attr_accessor :key + + # Optional. A list of synonyms that can also be used to trigger this + # item in dialog. + # Corresponds to the JSON property `synonyms` + # @return [Array] + attr_accessor :synonyms + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @key = args[:key] if args.key?(:key) + @synonyms = args[:synonyms] if args.key?(:synonyms) + end + end + + # The simple response message containing speech or text. + class GoogleCloudDialogflowV2IntentMessageSimpleResponse + include Google::Apis::Core::Hashable + + # Optional. The text to display. + # Corresponds to the JSON property `displayText` + # @return [String] + attr_accessor :display_text + + # One of text_to_speech or ssml must be provided. Structured spoken + # response to the user in the SSML format. Mutually exclusive with + # text_to_speech. + # Corresponds to the JSON property `ssml` + # @return [String] + attr_accessor :ssml + + # One of text_to_speech or ssml must be provided. The plain text of the + # speech output. Mutually exclusive with ssml. + # Corresponds to the JSON property `textToSpeech` + # @return [String] + attr_accessor :text_to_speech + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @display_text = args[:display_text] if args.key?(:display_text) + @ssml = args[:ssml] if args.key?(:ssml) + @text_to_speech = args[:text_to_speech] if args.key?(:text_to_speech) + end + end + + # The collection of simple response candidates. + # This message in `QueryResult.fulfillment_messages` and + # `WebhookResponse.fulfillment_messages` should contain only one + # `SimpleResponse`. + class GoogleCloudDialogflowV2IntentMessageSimpleResponses + include Google::Apis::Core::Hashable + + # Required. The list of simple responses. + # Corresponds to the JSON property `simpleResponses` + # @return [Array] + attr_accessor :simple_responses + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @simple_responses = args[:simple_responses] if args.key?(:simple_responses) + end + end + + # The suggestion chip message that the user can tap to quickly post a reply + # to the conversation. + class GoogleCloudDialogflowV2IntentMessageSuggestion + include Google::Apis::Core::Hashable + + # Required. The text shown the in the suggestion chip. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @title = args[:title] if args.key?(:title) + end + end + + # The collection of suggestions. + class GoogleCloudDialogflowV2IntentMessageSuggestions + include Google::Apis::Core::Hashable + + # Required. The list of suggested replies. + # Corresponds to the JSON property `suggestions` + # @return [Array] + attr_accessor :suggestions + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @suggestions = args[:suggestions] if args.key?(:suggestions) + end + end + + # Table card for Actions on Google. + class GoogleCloudDialogflowV2IntentMessageTableCard + include Google::Apis::Core::Hashable + + # Optional. List of buttons for the card. + # Corresponds to the JSON property `buttons` + # @return [Array] + attr_accessor :buttons + + # Optional. Display properties for the columns in this table. + # Corresponds to the JSON property `columnProperties` + # @return [Array] + attr_accessor :column_properties + + # The image response message. + # Corresponds to the JSON property `image` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageImage] + attr_accessor :image + + # Optional. Rows in this table of data. + # Corresponds to the JSON property `rows` + # @return [Array] + attr_accessor :rows + + # Optional. Subtitle to the title. + # Corresponds to the JSON property `subtitle` + # @return [String] + attr_accessor :subtitle + + # Required. Title of the card. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @buttons = args[:buttons] if args.key?(:buttons) + @column_properties = args[:column_properties] if args.key?(:column_properties) + @image = args[:image] if args.key?(:image) + @rows = args[:rows] if args.key?(:rows) + @subtitle = args[:subtitle] if args.key?(:subtitle) + @title = args[:title] if args.key?(:title) + end + end + + # Cell of TableCardRow. + class GoogleCloudDialogflowV2IntentMessageTableCardCell + include Google::Apis::Core::Hashable + + # Required. Text in this cell. + # Corresponds to the JSON property `text` + # @return [String] + attr_accessor :text + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @text = args[:text] if args.key?(:text) + end + end + + # Row of TableCard. + class GoogleCloudDialogflowV2IntentMessageTableCardRow + include Google::Apis::Core::Hashable + + # Optional. List of cells that make up this row. + # Corresponds to the JSON property `cells` + # @return [Array] + attr_accessor :cells + + # Optional. Whether to add a visual divider after this row. + # Corresponds to the JSON property `dividerAfter` + # @return [Boolean] + attr_accessor :divider_after + alias_method :divider_after?, :divider_after + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @cells = args[:cells] if args.key?(:cells) + @divider_after = args[:divider_after] if args.key?(:divider_after) + end + end + + # The text response message. + class GoogleCloudDialogflowV2IntentMessageText + include Google::Apis::Core::Hashable + + # Optional. The collection of the agent's responses. + # Corresponds to the JSON property `text` + # @return [Array] + attr_accessor :text + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @text = args[:text] if args.key?(:text) + end + end + + # Represents intent parameters. + class GoogleCloudDialogflowV2IntentParameter + include Google::Apis::Core::Hashable + + # Optional. The default value to use when the `value` yields an empty + # result. + # Default values can be extracted from contexts by using the following + # syntax: `#context_name.parameter_name`. + # Corresponds to the JSON property `defaultValue` + # @return [String] + attr_accessor :default_value + + # Required. The name of the parameter. + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # Optional. The name of the entity type, prefixed with `@`, that + # describes values of the parameter. If the parameter is + # required, this must be provided. + # Corresponds to the JSON property `entityTypeDisplayName` + # @return [String] + attr_accessor :entity_type_display_name + + # Optional. Indicates whether the parameter represents a list of values. + # Corresponds to the JSON property `isList` + # @return [Boolean] + attr_accessor :is_list + alias_method :is_list?, :is_list + + # Optional. Indicates whether the parameter is required. That is, + # whether the intent cannot be completed without collecting the parameter + # value. + # Corresponds to the JSON property `mandatory` + # @return [Boolean] + attr_accessor :mandatory + alias_method :mandatory?, :mandatory + + # The unique identifier of this parameter. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Optional. The collection of prompts that the agent can present to the + # user in order to collect a value for the parameter. + # Corresponds to the JSON property `prompts` + # @return [Array] + attr_accessor :prompts + + # Optional. The definition of the parameter value. It can be: + # - a constant string, + # - a parameter value defined as `$parameter_name`, + # - an original parameter value defined as `$parameter_name.original`, + # - a parameter value from some context defined as + # `#context_name.parameter_name`. + # Corresponds to the JSON property `value` + # @return [String] + attr_accessor :value + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @default_value = args[:default_value] if args.key?(:default_value) + @display_name = args[:display_name] if args.key?(:display_name) + @entity_type_display_name = args[:entity_type_display_name] if args.key?(:entity_type_display_name) + @is_list = args[:is_list] if args.key?(:is_list) + @mandatory = args[:mandatory] if args.key?(:mandatory) + @name = args[:name] if args.key?(:name) + @prompts = args[:prompts] if args.key?(:prompts) + @value = args[:value] if args.key?(:value) + end + end + + # Represents an example that the agent is trained on. + class GoogleCloudDialogflowV2IntentTrainingPhrase + include Google::Apis::Core::Hashable + + # Output only. The unique identifier of this training phrase. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Required. The ordered list of training phrase parts. + # The parts are concatenated in order to form the training phrase. + # Note: The API does not automatically annotate training phrases like the + # Dialogflow Console does. + # Note: Do not forget to include whitespace at part boundaries, + # so the training phrase is well formatted when the parts are concatenated. + # If the training phrase does not need to be annotated with parameters, + # you just need a single part with only the Part.text field set. + # If you want to annotate the training phrase, you must create multiple + # parts, where the fields of each part are populated in one of two ways: + # - `Part.text` is set to a part of the phrase that has no parameters. + # - `Part.text` is set to a part of the phrase that you want to annotate, + # and the `entity_type`, `alias`, and `user_defined` fields are all + # set. + # Corresponds to the JSON property `parts` + # @return [Array] + attr_accessor :parts + + # Optional. Indicates how many times this example was added to + # the intent. Each time a developer adds an existing sample by editing an + # intent or training, this counter is increased. + # Corresponds to the JSON property `timesAddedCount` + # @return [Fixnum] + attr_accessor :times_added_count + + # Required. The type of the training phrase. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @name = args[:name] if args.key?(:name) + @parts = args[:parts] if args.key?(:parts) + @times_added_count = args[:times_added_count] if args.key?(:times_added_count) + @type = args[:type] if args.key?(:type) + end + end + + # Represents a part of a training phrase. + class GoogleCloudDialogflowV2IntentTrainingPhrasePart + include Google::Apis::Core::Hashable + + # Optional. The parameter name for the value extracted from the + # annotated part of the example. + # This field is required for annotated parts of the training phrase. + # Corresponds to the JSON property `alias` + # @return [String] + attr_accessor :alias + + # Optional. The entity type name prefixed with `@`. + # This field is required for annotated parts of the training phrase. + # Corresponds to the JSON property `entityType` + # @return [String] + attr_accessor :entity_type + + # Required. The text for this part. + # Corresponds to the JSON property `text` + # @return [String] + attr_accessor :text + + # Optional. Indicates whether the text was manually annotated. + # This field is set to true when the Dialogflow Console is used to + # manually annotate the part. When creating an annotated part with the + # API, you must set this to true. + # Corresponds to the JSON property `userDefined` + # @return [Boolean] + attr_accessor :user_defined + alias_method :user_defined?, :user_defined + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @alias = args[:alias] if args.key?(:alias) + @entity_type = args[:entity_type] if args.key?(:entity_type) + @text = args[:text] if args.key?(:text) + @user_defined = args[:user_defined] if args.key?(:user_defined) + end + end + + # Represents a message posted into a conversation. + class GoogleCloudDialogflowV2Message + include Google::Apis::Core::Hashable + + # Required. The message content. + # Corresponds to the JSON property `content` + # @return [String] + attr_accessor :content + + # Output only. The time when the message was created. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # Optional. The message language. + # This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) + # language tag. Example: "en-US". + # Corresponds to the JSON property `languageCode` + # @return [String] + attr_accessor :language_code + + # Represents the result of annotation for the message. + # Corresponds to the JSON property `messageAnnotation` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2MessageAnnotation] + attr_accessor :message_annotation + + # The unique identifier of the message. + # Format: `projects//conversations//messages/`. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Output only. The participant that sends this message. + # Corresponds to the JSON property `participant` + # @return [String] + attr_accessor :participant + + # Output only. The role of the participant. + # Corresponds to the JSON property `participantRole` + # @return [String] + attr_accessor :participant_role + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @content = args[:content] if args.key?(:content) + @create_time = args[:create_time] if args.key?(:create_time) + @language_code = args[:language_code] if args.key?(:language_code) + @message_annotation = args[:message_annotation] if args.key?(:message_annotation) + @name = args[:name] if args.key?(:name) + @participant = args[:participant] if args.key?(:participant) + @participant_role = args[:participant_role] if args.key?(:participant_role) + end + end + + # Represents the result of annotation for the message. + class GoogleCloudDialogflowV2MessageAnnotation + include Google::Apis::Core::Hashable + + # Indicates whether the text message contains entities. + # Corresponds to the JSON property `containEntities` + # @return [Boolean] + attr_accessor :contain_entities + alias_method :contain_entities?, :contain_entities + + # The collection of annotated message parts ordered by their + # position in the message. You can recover the annotated message by + # concatenating [AnnotatedMessagePart.text]. + # Corresponds to the JSON property `parts` + # @return [Array] + attr_accessor :parts + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @contain_entities = args[:contain_entities] if args.key?(:contain_entities) + @parts = args[:parts] if args.key?(:parts) + end + end + + # Represents the contents of the original request that was passed to + # the `[Streaming]DetectIntent` call. + class GoogleCloudDialogflowV2OriginalDetectIntentRequest + include Google::Apis::Core::Hashable + + # Optional. This field is set to the value of the `QueryParameters.payload` + # field passed in the request. Some integrations that query a Dialogflow + # agent may provide additional information in the payload. + # In particular, for the Dialogflow Phone Gateway integration, this field has + # the form: + #
`
+        # "telephony": `
+        # "caller_id": "+18558363987"
+        # `
+        # `
+ # Note: The caller ID field (`caller_id`) will be redacted for Standard + # Edition agents and populated with the caller ID in [E.164 + # format](https://en.wikipedia.org/wiki/E.164) for Enterprise Edition agents. + # Corresponds to the JSON property `payload` + # @return [Hash] + attr_accessor :payload + + # The source of this request, e.g., `google`, `facebook`, `slack`. It is set + # by Dialogflow-owned servers. + # Corresponds to the JSON property `source` + # @return [String] + attr_accessor :source + + # Optional. The version of the protocol used for this request. + # This field is AoG-specific. + # Corresponds to the JSON property `version` + # @return [String] + attr_accessor :version + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @payload = args[:payload] if args.key?(:payload) + @source = args[:source] if args.key?(:source) + @version = args[:version] if args.key?(:version) + end + end + + # Represents the result of conversational query or event processing. + class GoogleCloudDialogflowV2QueryResult + include Google::Apis::Core::Hashable + + # The action name from the matched intent. + # Corresponds to the JSON property `action` + # @return [String] + attr_accessor :action + + # This field is set to: + # - `false` if the matched intent has required parameters and not all of + # the required parameter values have been collected. + # - `true` if all required parameter values have been collected, or if the + # matched intent doesn't contain any required parameters. + # Corresponds to the JSON property `allRequiredParamsPresent` + # @return [Boolean] + attr_accessor :all_required_params_present + alias_method :all_required_params_present?, :all_required_params_present + + # Free-form diagnostic information for the associated detect intent request. + # The fields of this data can change without notice, so you should not write + # code that depends on its structure. + # The data may contain: + # - webhook call latency + # - webhook errors + # Corresponds to the JSON property `diagnosticInfo` + # @return [Hash] + attr_accessor :diagnostic_info + + # The collection of rich messages to present to the user. + # Corresponds to the JSON property `fulfillmentMessages` + # @return [Array] + attr_accessor :fulfillment_messages + + # The text to be pronounced to the user or shown on the screen. + # Note: This is a legacy field, `fulfillment_messages` should be preferred. + # Corresponds to the JSON property `fulfillmentText` + # @return [String] + attr_accessor :fulfillment_text + + # Represents an intent. + # Intents convert a number of user expressions or patterns into an action. An + # action is an extraction of a user command or sentence semantics. + # Corresponds to the JSON property `intent` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2Intent] + attr_accessor :intent + + # The intent detection confidence. Values range from 0.0 + # (completely uncertain) to 1.0 (completely certain). + # This value is for informational purpose only and is only used to + # help match the best intent within the classification threshold. + # This value may change for the same end-user expression at any time due to a + # model retraining or change in implementation. + # If there are `multiple knowledge_answers` messages, this value is set to + # the greatest `knowledgeAnswers.match_confidence` value in the list. + # Corresponds to the JSON property `intentDetectionConfidence` + # @return [Float] + attr_accessor :intent_detection_confidence + + # The language that was triggered during intent detection. + # See [Language + # Support](https://cloud.google.com/dialogflow/docs/reference/language) + # for a list of the currently supported language codes. + # Corresponds to the JSON property `languageCode` + # @return [String] + attr_accessor :language_code + + # The collection of output contexts. If applicable, + # `output_contexts.parameters` contains entries with name + # `.original` containing the original parameter values + # before the query. + # Corresponds to the JSON property `outputContexts` + # @return [Array] + attr_accessor :output_contexts + + # The collection of extracted parameters. + # Depending on your protocol or client library language, this is a + # map, associative array, symbol table, dictionary, or JSON object + # composed of a collection of (MapKey, MapValue) pairs: + # - MapKey type: string + # - MapKey value: parameter name + # - MapValue type: + # - If parameter's entity type is a composite entity: map + # - Else: string or number, depending on parameter value type + # - MapValue value: + # - If parameter's entity type is a composite entity: + # map from composite entity property names to property values + # - Else: parameter value + # Corresponds to the JSON property `parameters` + # @return [Hash] + attr_accessor :parameters + + # The original conversational query text: + # - If natural language text was provided as input, `query_text` contains + # a copy of the input. + # - If natural language speech audio was provided as input, `query_text` + # contains the speech recognition result. If speech recognizer produced + # multiple alternatives, a particular one is picked. + # - If automatic spell correction is enabled, `query_text` will contain the + # corrected user input. + # Corresponds to the JSON property `queryText` + # @return [String] + attr_accessor :query_text + + # The result of sentiment analysis as configured by + # `sentiment_analysis_request_config`. + # Corresponds to the JSON property `sentimentAnalysisResult` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2SentimentAnalysisResult] + attr_accessor :sentiment_analysis_result + + # The Speech recognition confidence between 0.0 and 1.0. A higher number + # indicates an estimated greater likelihood that the recognized words are + # correct. The default of 0.0 is a sentinel value indicating that confidence + # was not set. + # This field is not guaranteed to be accurate or set. In particular this + # field isn't set for StreamingDetectIntent since the streaming endpoint has + # separate confidence estimates per portion of the audio in + # StreamingRecognitionResult. + # Corresponds to the JSON property `speechRecognitionConfidence` + # @return [Float] + attr_accessor :speech_recognition_confidence + + # If the query was fulfilled by a webhook call, this field is set to the + # value of the `payload` field returned in the webhook response. + # Corresponds to the JSON property `webhookPayload` + # @return [Hash] + attr_accessor :webhook_payload + + # If the query was fulfilled by a webhook call, this field is set to the + # value of the `source` field returned in the webhook response. + # Corresponds to the JSON property `webhookSource` + # @return [String] + attr_accessor :webhook_source + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @action = args[:action] if args.key?(:action) + @all_required_params_present = args[:all_required_params_present] if args.key?(:all_required_params_present) + @diagnostic_info = args[:diagnostic_info] if args.key?(:diagnostic_info) + @fulfillment_messages = args[:fulfillment_messages] if args.key?(:fulfillment_messages) + @fulfillment_text = args[:fulfillment_text] if args.key?(:fulfillment_text) + @intent = args[:intent] if args.key?(:intent) + @intent_detection_confidence = args[:intent_detection_confidence] if args.key?(:intent_detection_confidence) + @language_code = args[:language_code] if args.key?(:language_code) + @output_contexts = args[:output_contexts] if args.key?(:output_contexts) + @parameters = args[:parameters] if args.key?(:parameters) + @query_text = args[:query_text] if args.key?(:query_text) + @sentiment_analysis_result = args[:sentiment_analysis_result] if args.key?(:sentiment_analysis_result) + @speech_recognition_confidence = args[:speech_recognition_confidence] if args.key?(:speech_recognition_confidence) + @webhook_payload = args[:webhook_payload] if args.key?(:webhook_payload) + @webhook_source = args[:webhook_source] if args.key?(:webhook_source) + end + end + + # The sentiment, such as positive/negative feeling or association, for a unit + # of analysis, such as the query text. + class GoogleCloudDialogflowV2Sentiment + include Google::Apis::Core::Hashable + + # A non-negative number in the [0, +inf) range, which represents the absolute + # magnitude of sentiment, regardless of score (positive or negative). + # Corresponds to the JSON property `magnitude` + # @return [Float] + attr_accessor :magnitude + + # Sentiment score between -1.0 (negative sentiment) and 1.0 (positive + # sentiment). + # Corresponds to the JSON property `score` + # @return [Float] + attr_accessor :score + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @magnitude = args[:magnitude] if args.key?(:magnitude) + @score = args[:score] if args.key?(:score) + end + end + + # The result of sentiment analysis as configured by + # `sentiment_analysis_request_config`. + class GoogleCloudDialogflowV2SentimentAnalysisResult + include Google::Apis::Core::Hashable + + # The sentiment, such as positive/negative feeling or association, for a unit + # of analysis, such as the query text. + # Corresponds to the JSON property `queryTextSentiment` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2Sentiment] + attr_accessor :query_text_sentiment + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @query_text_sentiment = args[:query_text_sentiment] if args.key?(:query_text_sentiment) + end + end + + # Represents a session entity type. + # Extends or replaces a custom entity type at the user session level (we + # refer to the entity types defined at the agent level as "custom entity + # types"). + # Note: session entity types apply to all queries, regardless of the language. + class GoogleCloudDialogflowV2SessionEntityType + include Google::Apis::Core::Hashable + + # Required. The collection of entities associated with this session entity + # type. + # Corresponds to the JSON property `entities` + # @return [Array] + attr_accessor :entities + + # Required. Indicates whether the additional data should override or + # supplement the custom entity type definition. + # Corresponds to the JSON property `entityOverrideMode` + # @return [String] + attr_accessor :entity_override_mode + + # Required. The unique identifier of this session entity type. Format: + # `projects//agent/sessions//entityTypes/`, or `projects//agent/environments//users//sessions//entityTypes/`. + # If `Environment ID` is not specified, we assume default 'draft' + # environment. If `User ID` is not specified, we assume default '-' user. + # `` must be the display name of an existing entity + # type in the same agent that will be overridden or supplemented. + # 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) + @entities = args[:entities] if args.key?(:entities) + @entity_override_mode = args[:entity_override_mode] if args.key?(:entity_override_mode) + @name = args[:name] if args.key?(:name) + end + end + + # The request message for a webhook call. + class GoogleCloudDialogflowV2WebhookRequest + include Google::Apis::Core::Hashable + + # Represents the contents of the original request that was passed to + # the `[Streaming]DetectIntent` call. + # Corresponds to the JSON property `originalDetectIntentRequest` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2OriginalDetectIntentRequest] + attr_accessor :original_detect_intent_request + + # Represents the result of conversational query or event processing. + # Corresponds to the JSON property `queryResult` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2QueryResult] + attr_accessor :query_result + + # The unique identifier of the response. Contains the same value as + # `[Streaming]DetectIntentResponse.response_id`. + # Corresponds to the JSON property `responseId` + # @return [String] + attr_accessor :response_id + + # The unique identifier of detectIntent request session. + # Can be used to identify end-user inside webhook implementation. + # Format: `projects//agent/sessions/`, or + # `projects//agent/environments//users//sessions/`. + # Corresponds to the JSON property `session` + # @return [String] + attr_accessor :session + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @original_detect_intent_request = args[:original_detect_intent_request] if args.key?(:original_detect_intent_request) + @query_result = args[:query_result] if args.key?(:query_result) + @response_id = args[:response_id] if args.key?(:response_id) + @session = args[:session] if args.key?(:session) + end + end + + # The response message for a webhook call. + # This response is validated by the Dialogflow server. If validation fails, + # an error will be returned in the QueryResult.diagnostic_info field. + # Setting JSON fields to an empty value with the wrong type is a common error. + # To avoid this error: + # - Use `""` for empty strings + # - Use ```` or `null` for empty objects + # - Use `[]` or `null` for empty arrays + # For more information, see the + # [Protocol Buffers Language + # Guide](https://developers.google.com/protocol-buffers/docs/proto3#json). + class GoogleCloudDialogflowV2WebhookResponse + include Google::Apis::Core::Hashable + + # Events allow for matching intents by event name instead of the natural + # language input. For instance, input `` can trigger a personalized welcome response. + # The parameter `name` may be used by the agent in the response: + # `"Hello #welcome_event.name! What can I do for you today?"`. + # Corresponds to the JSON property `followupEventInput` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2EventInput] + attr_accessor :followup_event_input + + # Optional. The rich response messages intended for the end-user. + # When provided, Dialogflow uses this field to populate + # QueryResult.fulfillment_messages sent to the integration or API caller. + # Corresponds to the JSON property `fulfillmentMessages` + # @return [Array] + attr_accessor :fulfillment_messages + + # Optional. The text response message intended for the end-user. + # It is recommended to use `fulfillment_messages.text.text[0]` instead. + # When provided, Dialogflow uses this field to populate + # QueryResult.fulfillment_text sent to the integration or API caller. + # Corresponds to the JSON property `fulfillmentText` + # @return [String] + attr_accessor :fulfillment_text + + # Optional. The collection of output contexts that will overwrite currently + # active contexts for the session and reset their lifespans. + # When provided, Dialogflow uses this field to populate + # QueryResult.output_contexts sent to the integration or API caller. + # Corresponds to the JSON property `outputContexts` + # @return [Array] + attr_accessor :output_contexts + + # Optional. This field can be used to pass custom data from your webhook to the + # integration or API caller. Arbitrary JSON objects are supported. + # When provided, Dialogflow uses this field to populate + # QueryResult.webhook_payload sent to the integration or API caller. + # This field is also used by the + # [Google Assistant + # integration](https://cloud.google.com/dialogflow/docs/integrations/aog) + # for rich response messages. + # See the format definition at [Google Assistant Dialogflow webhook + # format](https://developers.google.com/assistant/actions/build/json/dialogflow- + # webhook-json) + # Corresponds to the JSON property `payload` + # @return [Hash] + attr_accessor :payload + + # Optional. Additional session entity types to replace or extend developer + # entity types with. The entity synonyms apply to all languages and persist + # for the session. Setting this data from a webhook overwrites + # the session entity types that have been set using `detectIntent`, + # `streamingDetectIntent` or SessionEntityType management methods. + # Corresponds to the JSON property `sessionEntityTypes` + # @return [Array] + attr_accessor :session_entity_types + + # Optional. A custom field used to identify the webhook source. + # Arbitrary strings are supported. + # When provided, Dialogflow uses this field to populate + # QueryResult.webhook_source sent to the integration or API caller. + # Corresponds to the JSON property `source` + # @return [String] + attr_accessor :source + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @followup_event_input = args[:followup_event_input] if args.key?(:followup_event_input) + @fulfillment_messages = args[:fulfillment_messages] if args.key?(:fulfillment_messages) + @fulfillment_text = args[:fulfillment_text] if args.key?(:fulfillment_text) + @output_contexts = args[:output_contexts] if args.key?(:output_contexts) + @payload = args[:payload] if args.key?(:payload) + @session_entity_types = args[:session_entity_types] if args.key?(:session_entity_types) + @source = args[:source] if args.key?(:source) + end + end + + # Represents an annotated conversation dataset. + # ConversationDataset can have multiple AnnotatedConversationDataset, each of + # them represents one result from one annotation task. + # AnnotatedConversationDataset can only be generated from annotation task, + # which will be triggered by LabelConversation. + class GoogleCloudDialogflowV2beta1AnnotatedConversationDataset + include Google::Apis::Core::Hashable + + # Output only. Number of examples that have annotations in the annotated + # conversation dataset. + # Corresponds to the JSON property `completedExampleCount` + # @return [Fixnum] + attr_accessor :completed_example_count + + # Output only. Creation time of this annotated conversation dataset. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # Optional. The description of the annotated conversation dataset. + # Maximum of 10000 bytes. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # Required. The display name of the annotated conversation dataset. + # It's specified when user starts an annotation task. Maximum of 64 bytes. + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # Output only. Number of examples in the annotated conversation dataset. + # Corresponds to the JSON property `exampleCount` + # @return [Fixnum] + attr_accessor :example_count + + # Output only. AnnotatedConversationDataset resource name. Format: + # `projects//conversationDatasets//annotatedConversationDatasets/` + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Output only. Question type name that identifies a labeling task. + # A question is a single task that a worker answers. A question type is set + # of related questions. Each question belongs to a particular question type. + # It can be used in CrowdCompute UI to filter and manage labeling tasks. + # Corresponds to the JSON property `questionTypeName` + # @return [String] + attr_accessor :question_type_name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @completed_example_count = args[:completed_example_count] if args.key?(:completed_example_count) + @create_time = args[:create_time] if args.key?(:create_time) + @description = args[:description] if args.key?(:description) + @display_name = args[:display_name] if args.key?(:display_name) + @example_count = args[:example_count] if args.key?(:example_count) + @name = args[:name] if args.key?(:name) + @question_type_name = args[:question_type_name] if args.key?(:question_type_name) + end + end + + # The response message for EntityTypes.BatchUpdateEntityTypes. + class GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse + include Google::Apis::Core::Hashable + + # The collection of updated or created entity types. + # Corresponds to the JSON property `entityTypes` + # @return [Array] + attr_accessor :entity_types + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @entity_types = args[:entity_types] if args.key?(:entity_types) + end + end + + # The response message for Intents.BatchUpdateIntents. + class GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse + include Google::Apis::Core::Hashable + + # The collection of updated or created intents. + # Corresponds to the JSON property `intents` + # @return [Array] + attr_accessor :intents + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @intents = args[:intents] if args.key?(:intents) + end + end + + # Represents a context. + class GoogleCloudDialogflowV2beta1Context + include Google::Apis::Core::Hashable + + # Optional. The number of conversational query requests after which the + # context expires. The default is `0`. If set to `0`, the context expires + # immediately. Contexts expire automatically after 20 minutes if there + # are no matching queries. + # Corresponds to the JSON property `lifespanCount` + # @return [Fixnum] + attr_accessor :lifespan_count + + # Required. The unique identifier of the context. Format: + # `projects//agent/sessions//contexts/`, + # or `projects//agent/environments//users//sessions//contexts/`. + # The `Context ID` is always converted to lowercase, may only contain + # characters in a-zA-Z0-9_-% and may be at most 250 bytes long. + # If `Environment ID` is not specified, we assume default 'draft' + # environment. If `User ID` is not specified, we assume default '-' user. + # The following context names are reserved for internal use by Dialogflow. + # You should not use these contexts or create contexts with these names: + # * `__system_counters__` + # * `*_id_dialog_context` + # * `*_dialog_params_size` + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Optional. The collection of parameters associated with this context. + # Depending on your protocol or client library language, this is a + # map, associative array, symbol table, dictionary, or JSON object + # composed of a collection of (MapKey, MapValue) pairs: + # - MapKey type: string + # - MapKey value: parameter name + # - MapValue type: + # - If parameter's entity type is a composite entity: map + # - Else: string or number, depending on parameter value type + # - MapValue value: + # - If parameter's entity type is a composite entity: + # map from composite entity property names to property values + # - Else: parameter value + # Corresponds to the JSON property `parameters` + # @return [Hash] + attr_accessor :parameters + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @lifespan_count = args[:lifespan_count] if args.key?(:lifespan_count) + @name = args[:name] if args.key?(:name) + @parameters = args[:parameters] if args.key?(:parameters) + end + end + + # Represents an entity type. + # Entity types serve as a tool for extracting parameter values from natural + # language queries. + class GoogleCloudDialogflowV2beta1EntityType + include Google::Apis::Core::Hashable + + # Optional. Indicates whether the entity type can be automatically + # expanded. + # Corresponds to the JSON property `autoExpansionMode` + # @return [String] + attr_accessor :auto_expansion_mode + + # Required. The name of the entity type. + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # Optional. Enables fuzzy entity extraction during classification. + # Corresponds to the JSON property `enableFuzzyExtraction` + # @return [Boolean] + attr_accessor :enable_fuzzy_extraction + alias_method :enable_fuzzy_extraction?, :enable_fuzzy_extraction + + # Optional. The collection of entity entries associated with the entity type. + # Corresponds to the JSON property `entities` + # @return [Array] + attr_accessor :entities + + # Required. Indicates the kind of entity type. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # The unique identifier of the entity type. + # Required for EntityTypes.UpdateEntityType and + # EntityTypes.BatchUpdateEntityTypes methods. + # Format: `projects//agent/entityTypes/`. + # 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) + @auto_expansion_mode = args[:auto_expansion_mode] if args.key?(:auto_expansion_mode) + @display_name = args[:display_name] if args.key?(:display_name) + @enable_fuzzy_extraction = args[:enable_fuzzy_extraction] if args.key?(:enable_fuzzy_extraction) + @entities = args[:entities] if args.key?(:entities) + @kind = args[:kind] if args.key?(:kind) + @name = args[:name] if args.key?(:name) + end + end + + # An **entity entry** for an associated entity type. + class GoogleCloudDialogflowV2beta1EntityTypeEntity + include Google::Apis::Core::Hashable + + # Required. A collection of value synonyms. For example, if the entity type + # is *vegetable*, and `value` is *scallions*, a synonym could be *green + # onions*. + # For `KIND_LIST` entity types: + # * This collection must contain exactly one synonym equal to `value`. + # Corresponds to the JSON property `synonyms` + # @return [Array] + attr_accessor :synonyms + + # Required. The primary value associated with this entity entry. + # For example, if the entity type is *vegetable*, the value could be + # *scallions*. + # For `KIND_MAP` entity types: + # * A reference value to be used in place of synonyms. + # For `KIND_LIST` entity types: + # * A string that can contain references to other entity types (with or + # without aliases). + # Corresponds to the JSON property `value` + # @return [String] + attr_accessor :value + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @synonyms = args[:synonyms] if args.key?(:synonyms) + @value = args[:value] if args.key?(:value) + end + end + + # Events allow for matching intents by event name instead of the natural + # language input. For instance, input `` can trigger a personalized welcome response. + # The parameter `name` may be used by the agent in the response: + # `"Hello #welcome_event.name! What can I do for you today?"`. + class GoogleCloudDialogflowV2beta1EventInput + include Google::Apis::Core::Hashable + + # Required. The language of this query. See [Language + # Support](https://cloud.google.com/dialogflow/docs/reference/language) + # for a list of the currently supported language codes. Note that queries in + # the same session do not necessarily need to specify the same language. + # Corresponds to the JSON property `languageCode` + # @return [String] + attr_accessor :language_code + + # Required. The unique identifier of the event. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The collection of parameters associated with the event. + # Depending on your protocol or client library language, this is a + # map, associative array, symbol table, dictionary, or JSON object + # composed of a collection of (MapKey, MapValue) pairs: + # - MapKey type: string + # - MapKey value: parameter name + # - MapValue type: + # - If parameter's entity type is a composite entity: map + # - Else: string or number, depending on parameter value type + # - MapValue value: + # - If parameter's entity type is a composite entity: + # map from composite entity property names to property values + # - Else: parameter value + # Corresponds to the JSON property `parameters` + # @return [Hash] + attr_accessor :parameters + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @language_code = args[:language_code] if args.key?(:language_code) + @name = args[:name] if args.key?(:name) + @parameters = args[:parameters] if args.key?(:parameters) + end + end + + # The response message for Agents.ExportAgent. + class GoogleCloudDialogflowV2beta1ExportAgentResponse + include Google::Apis::Core::Hashable + + # Zip compressed raw byte content for agent. + # Corresponds to the JSON property `agentContent` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :agent_content + + # The URI to a file containing the exported agent. This field is populated + # only if `agent_uri` is specified in `ExportAgentRequest`. + # Corresponds to the JSON property `agentUri` + # @return [String] + attr_accessor :agent_uri + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @agent_content = args[:agent_content] if args.key?(:agent_content) + @agent_uri = args[:agent_uri] if args.key?(:agent_uri) + end + end + + # Represents an intent. + # Intents convert a number of user expressions or patterns into an action. An + # action is an extraction of a user command or sentence semantics. + class GoogleCloudDialogflowV2beta1Intent + include Google::Apis::Core::Hashable + + # Optional. The name of the action associated with the intent. + # Note: The action name must not contain whitespaces. + # Corresponds to the JSON property `action` + # @return [String] + attr_accessor :action + + # Optional. The list of platforms for which the first responses will be + # copied from the messages in PLATFORM_UNSPECIFIED (i.e. default platform). + # Corresponds to the JSON property `defaultResponsePlatforms` + # @return [Array] + attr_accessor :default_response_platforms + + # Required. The name of this intent. + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # Optional. Indicates that this intent ends an interaction. Some integrations + # (e.g., Actions on Google or Dialogflow phone gateway) use this information + # to close interaction with an end user. Default is false. + # Corresponds to the JSON property `endInteraction` + # @return [Boolean] + attr_accessor :end_interaction + alias_method :end_interaction?, :end_interaction + + # Optional. The collection of event names that trigger the intent. + # If the collection of input contexts is not empty, all of the contexts must + # be present in the active user session for an event to trigger this intent. + # Event names are limited to 150 characters. + # Corresponds to the JSON property `events` + # @return [Array] + attr_accessor :events + + # Output only. Information about all followup intents that have this intent as + # a direct or indirect parent. We populate this field only in the output. + # Corresponds to the JSON property `followupIntentInfo` + # @return [Array] + attr_accessor :followup_intent_info + + # Optional. The list of context names required for this intent to be + # triggered. + # Format: `projects//agent/sessions/-/contexts/`. + # Corresponds to the JSON property `inputContextNames` + # @return [Array] + attr_accessor :input_context_names + + # Optional. Indicates whether this is a fallback intent. + # Corresponds to the JSON property `isFallback` + # @return [Boolean] + attr_accessor :is_fallback + alias_method :is_fallback?, :is_fallback + + # Optional. The collection of rich messages corresponding to the + # `Response` field in the Dialogflow console. + # Corresponds to the JSON property `messages` + # @return [Array] + attr_accessor :messages + + # Optional. Indicates whether Machine Learning is disabled for the intent. + # Note: If `ml_disabled` setting is set to true, then this intent is not + # taken into account during inference in `ML ONLY` match mode. Also, + # auto-markup in the UI is turned off. + # Corresponds to the JSON property `mlDisabled` + # @return [Boolean] + attr_accessor :ml_disabled + alias_method :ml_disabled?, :ml_disabled + + # Optional. Indicates whether Machine Learning is enabled for the intent. + # Note: If `ml_enabled` setting is set to false, then this intent is not + # taken into account during inference in `ML ONLY` match mode. Also, + # auto-markup in the UI is turned off. + # DEPRECATED! Please use `ml_disabled` field instead. + # NOTE: If both `ml_enabled` and `ml_disabled` are either not set or false, + # then the default value is determined as follows: + # - Before April 15th, 2018 the default is: + # ml_enabled = false / ml_disabled = true. + # - After April 15th, 2018 the default is: + # ml_enabled = true / ml_disabled = false. + # Corresponds to the JSON property `mlEnabled` + # @return [Boolean] + attr_accessor :ml_enabled + alias_method :ml_enabled?, :ml_enabled + + # Optional. The unique identifier of this intent. + # Required for Intents.UpdateIntent and Intents.BatchUpdateIntents + # methods. + # Format: `projects//agent/intents/`. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Optional. The collection of contexts that are activated when the intent + # is matched. Context messages in this collection should not set the + # parameters field. Setting the `lifespan_count` to 0 will reset the context + # when the intent is matched. + # Format: `projects//agent/sessions/-/contexts/`. + # Corresponds to the JSON property `outputContexts` + # @return [Array] + attr_accessor :output_contexts + + # Optional. The collection of parameters associated with the intent. + # Corresponds to the JSON property `parameters` + # @return [Array] + attr_accessor :parameters + + # Optional. The unique identifier of the parent intent in the + # chain of followup intents. You can set this field when creating an intent, + # for example with CreateIntent or + # BatchUpdateIntents, in order to make this + # intent a followup intent. + # It identifies the parent followup intent. + # Format: `projects//agent/intents/`. + # Corresponds to the JSON property `parentFollowupIntentName` + # @return [String] + attr_accessor :parent_followup_intent_name + + # Optional. The priority of this intent. Higher numbers represent higher + # priorities. + # - If the supplied value is unspecified or 0, the service + # translates the value to 500,000, which corresponds to the + # `Normal` priority in the console. + # - If the supplied value is negative, the intent is ignored + # in runtime detect intent requests. + # Corresponds to the JSON property `priority` + # @return [Fixnum] + attr_accessor :priority + + # Optional. Indicates whether to delete all contexts in the current + # session when this intent is matched. + # Corresponds to the JSON property `resetContexts` + # @return [Boolean] + attr_accessor :reset_contexts + alias_method :reset_contexts?, :reset_contexts + + # Output only. The unique identifier of the root intent in the chain of + # followup intents. It identifies the correct followup intents chain for + # this intent. + # Format: `projects//agent/intents/`. + # Corresponds to the JSON property `rootFollowupIntentName` + # @return [String] + attr_accessor :root_followup_intent_name + + # Optional. The collection of examples that the agent is + # trained on. + # Corresponds to the JSON property `trainingPhrases` + # @return [Array] + attr_accessor :training_phrases + + # Optional. Indicates whether webhooks are enabled for the intent. + # Corresponds to the JSON property `webhookState` + # @return [String] + attr_accessor :webhook_state + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @action = args[:action] if args.key?(:action) + @default_response_platforms = args[:default_response_platforms] if args.key?(:default_response_platforms) + @display_name = args[:display_name] if args.key?(:display_name) + @end_interaction = args[:end_interaction] if args.key?(:end_interaction) + @events = args[:events] if args.key?(:events) + @followup_intent_info = args[:followup_intent_info] if args.key?(:followup_intent_info) + @input_context_names = args[:input_context_names] if args.key?(:input_context_names) + @is_fallback = args[:is_fallback] if args.key?(:is_fallback) + @messages = args[:messages] if args.key?(:messages) + @ml_disabled = args[:ml_disabled] if args.key?(:ml_disabled) + @ml_enabled = args[:ml_enabled] if args.key?(:ml_enabled) + @name = args[:name] if args.key?(:name) + @output_contexts = args[:output_contexts] if args.key?(:output_contexts) + @parameters = args[:parameters] if args.key?(:parameters) + @parent_followup_intent_name = args[:parent_followup_intent_name] if args.key?(:parent_followup_intent_name) + @priority = args[:priority] if args.key?(:priority) + @reset_contexts = args[:reset_contexts] if args.key?(:reset_contexts) + @root_followup_intent_name = args[:root_followup_intent_name] if args.key?(:root_followup_intent_name) + @training_phrases = args[:training_phrases] if args.key?(:training_phrases) + @webhook_state = args[:webhook_state] if args.key?(:webhook_state) + end + end + + # Represents a single followup intent in the chain. + class GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo + include Google::Apis::Core::Hashable + + # The unique identifier of the followup intent. + # Format: `projects//agent/intents/`. + # Corresponds to the JSON property `followupIntentName` + # @return [String] + attr_accessor :followup_intent_name + + # The unique identifier of the followup intent's parent. + # Format: `projects//agent/intents/`. + # Corresponds to the JSON property `parentFollowupIntentName` + # @return [String] + attr_accessor :parent_followup_intent_name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @followup_intent_name = args[:followup_intent_name] if args.key?(:followup_intent_name) + @parent_followup_intent_name = args[:parent_followup_intent_name] if args.key?(:parent_followup_intent_name) + end + end + + # Corresponds to the `Response` field in the Dialogflow console. + class GoogleCloudDialogflowV2beta1IntentMessage + include Google::Apis::Core::Hashable + + # The basic card message. Useful for displaying information. + # Corresponds to the JSON property `basicCard` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageBasicCard] + attr_accessor :basic_card + + # Browse Carousel Card for Actions on Google. + # https://developers.google.com/actions/assistant/responses#browsing_carousel + # Corresponds to the JSON property `browseCarouselCard` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard] + attr_accessor :browse_carousel_card + + # The card response message. + # Corresponds to the JSON property `card` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageCard] + attr_accessor :card + + # The card for presenting a carousel of options to select from. + # Corresponds to the JSON property `carouselSelect` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect] + attr_accessor :carousel_select + + # The image response message. + # Corresponds to the JSON property `image` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageImage] + attr_accessor :image + + # The suggestion chip message that allows the user to jump out to the app + # or website associated with this agent. + # Corresponds to the JSON property `linkOutSuggestion` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion] + attr_accessor :link_out_suggestion + + # The card for presenting a list of options to select from. + # Corresponds to the JSON property `listSelect` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageListSelect] + attr_accessor :list_select + + # The media content card for Actions on Google. + # Corresponds to the JSON property `mediaContent` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageMediaContent] + attr_accessor :media_content + + # A custom platform-specific response. + # Corresponds to the JSON property `payload` + # @return [Hash] + attr_accessor :payload + + # Optional. The platform that this message is intended for. + # Corresponds to the JSON property `platform` + # @return [String] + attr_accessor :platform + + # The quick replies response message. + # Corresponds to the JSON property `quickReplies` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageQuickReplies] + attr_accessor :quick_replies + + # Carousel Rich Business Messaging (RBM) rich card. + # Rich cards allow you to respond to users with more vivid content, e.g. + # with media and suggestions. + # For more details about RBM rich cards, please see: + # https://developers.google.com/rcs-business-messaging/rbm/guides/build/send- + # messages#rich-cards. + # If you want to show a single card with more control over the layout, + # please use RbmStandaloneCard instead. + # Corresponds to the JSON property `rbmCarouselRichCard` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard] + attr_accessor :rbm_carousel_rich_card + + # Standalone Rich Business Messaging (RBM) rich card. + # Rich cards allow you to respond to users with more vivid content, e.g. + # with media and suggestions. + # For more details about RBM rich cards, please see: + # https://developers.google.com/rcs-business-messaging/rbm/guides/build/send- + # messages#rich-cards. + # You can group multiple rich cards into one using RbmCarouselCard but + # carousel cards will give you less control over the card layout. + # Corresponds to the JSON property `rbmStandaloneRichCard` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard] + attr_accessor :rbm_standalone_rich_card + + # Rich Business Messaging (RBM) text response with suggestions. + # Corresponds to the JSON property `rbmText` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageRbmText] + attr_accessor :rbm_text + + # The collection of simple response candidates. + # This message in `QueryResult.fulfillment_messages` and + # `WebhookResponse.fulfillment_messages` should contain only one + # `SimpleResponse`. + # Corresponds to the JSON property `simpleResponses` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses] + attr_accessor :simple_responses + + # The collection of suggestions. + # Corresponds to the JSON property `suggestions` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageSuggestions] + attr_accessor :suggestions + + # Table card for Actions on Google. + # Corresponds to the JSON property `tableCard` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageTableCard] + attr_accessor :table_card + + # Plays audio from a file in Telephony Gateway. + # Corresponds to the JSON property `telephonyPlayAudio` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio] + attr_accessor :telephony_play_audio + + # Synthesizes speech and plays back the synthesized audio to the caller in + # Telephony Gateway. + # Telephony Gateway takes the synthesizer settings from + # `DetectIntentResponse.output_audio_config` which can either be set + # at request-level or can come from the agent-level synthesizer config. + # Corresponds to the JSON property `telephonySynthesizeSpeech` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech] + attr_accessor :telephony_synthesize_speech + + # Transfers the call in Telephony Gateway. + # Corresponds to the JSON property `telephonyTransferCall` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall] + attr_accessor :telephony_transfer_call + + # The text response message. + # Corresponds to the JSON property `text` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageText] + attr_accessor :text + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @basic_card = args[:basic_card] if args.key?(:basic_card) + @browse_carousel_card = args[:browse_carousel_card] if args.key?(:browse_carousel_card) + @card = args[:card] if args.key?(:card) + @carousel_select = args[:carousel_select] if args.key?(:carousel_select) + @image = args[:image] if args.key?(:image) + @link_out_suggestion = args[:link_out_suggestion] if args.key?(:link_out_suggestion) + @list_select = args[:list_select] if args.key?(:list_select) + @media_content = args[:media_content] if args.key?(:media_content) + @payload = args[:payload] if args.key?(:payload) + @platform = args[:platform] if args.key?(:platform) + @quick_replies = args[:quick_replies] if args.key?(:quick_replies) + @rbm_carousel_rich_card = args[:rbm_carousel_rich_card] if args.key?(:rbm_carousel_rich_card) + @rbm_standalone_rich_card = args[:rbm_standalone_rich_card] if args.key?(:rbm_standalone_rich_card) + @rbm_text = args[:rbm_text] if args.key?(:rbm_text) + @simple_responses = args[:simple_responses] if args.key?(:simple_responses) + @suggestions = args[:suggestions] if args.key?(:suggestions) + @table_card = args[:table_card] if args.key?(:table_card) + @telephony_play_audio = args[:telephony_play_audio] if args.key?(:telephony_play_audio) + @telephony_synthesize_speech = args[:telephony_synthesize_speech] if args.key?(:telephony_synthesize_speech) + @telephony_transfer_call = args[:telephony_transfer_call] if args.key?(:telephony_transfer_call) + @text = args[:text] if args.key?(:text) + end + end + + # The basic card message. Useful for displaying information. + class GoogleCloudDialogflowV2beta1IntentMessageBasicCard + include Google::Apis::Core::Hashable + + # Optional. The collection of card buttons. + # Corresponds to the JSON property `buttons` + # @return [Array] + attr_accessor :buttons + + # Required, unless image is present. The body text of the card. + # Corresponds to the JSON property `formattedText` + # @return [String] + attr_accessor :formatted_text + + # The image response message. + # Corresponds to the JSON property `image` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageImage] + attr_accessor :image + + # Optional. The subtitle of the card. + # Corresponds to the JSON property `subtitle` + # @return [String] + attr_accessor :subtitle + + # Optional. The title of the card. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @buttons = args[:buttons] if args.key?(:buttons) + @formatted_text = args[:formatted_text] if args.key?(:formatted_text) + @image = args[:image] if args.key?(:image) + @subtitle = args[:subtitle] if args.key?(:subtitle) + @title = args[:title] if args.key?(:title) + end + end + + # The button object that appears at the bottom of a card. + class GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton + include Google::Apis::Core::Hashable + + # Opens the given URI. + # Corresponds to the JSON property `openUriAction` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction] + attr_accessor :open_uri_action + + # Required. The title of the button. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @open_uri_action = args[:open_uri_action] if args.key?(:open_uri_action) + @title = args[:title] if args.key?(:title) + end + end + + # Opens the given URI. + class GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction + include Google::Apis::Core::Hashable + + # Required. The HTTP or HTTPS scheme URI. + # Corresponds to the JSON property `uri` + # @return [String] + attr_accessor :uri + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @uri = args[:uri] if args.key?(:uri) + end + end + + # Browse Carousel Card for Actions on Google. + # https://developers.google.com/actions/assistant/responses#browsing_carousel + class GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard + include Google::Apis::Core::Hashable + + # Optional. Settings for displaying the image. Applies to every image in + # items. + # Corresponds to the JSON property `imageDisplayOptions` + # @return [String] + attr_accessor :image_display_options + + # Required. List of items in the Browse Carousel Card. Minimum of two + # items, maximum of ten. + # Corresponds to the JSON property `items` + # @return [Array] + attr_accessor :items + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @image_display_options = args[:image_display_options] if args.key?(:image_display_options) + @items = args[:items] if args.key?(:items) + end + end + + # Browsing carousel tile + class GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItem + include Google::Apis::Core::Hashable + + # Optional. Description of the carousel item. Maximum of four lines of + # text. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # Optional. Text that appears at the bottom of the Browse Carousel + # Card. Maximum of one line of text. + # Corresponds to the JSON property `footer` + # @return [String] + attr_accessor :footer + + # The image response message. + # Corresponds to the JSON property `image` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageImage] + attr_accessor :image + + # Actions on Google action to open a given url. + # Corresponds to the JSON property `openUriAction` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction] + attr_accessor :open_uri_action + + # Required. Title of the carousel item. Maximum of two lines of text. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @description = args[:description] if args.key?(:description) + @footer = args[:footer] if args.key?(:footer) + @image = args[:image] if args.key?(:image) + @open_uri_action = args[:open_uri_action] if args.key?(:open_uri_action) + @title = args[:title] if args.key?(:title) + end + end + + # Actions on Google action to open a given url. + class GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction + include Google::Apis::Core::Hashable + + # Required. URL + # Corresponds to the JSON property `url` + # @return [String] + attr_accessor :url + + # Optional. Specifies the type of viewer that is used when opening + # the URL. Defaults to opening via web browser. + # Corresponds to the JSON property `urlTypeHint` + # @return [String] + attr_accessor :url_type_hint + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @url = args[:url] if args.key?(:url) + @url_type_hint = args[:url_type_hint] if args.key?(:url_type_hint) + end + end + + # The card response message. + class GoogleCloudDialogflowV2beta1IntentMessageCard + include Google::Apis::Core::Hashable + + # Optional. The collection of card buttons. + # Corresponds to the JSON property `buttons` + # @return [Array] + attr_accessor :buttons + + # Optional. The public URI to an image file for the card. + # Corresponds to the JSON property `imageUri` + # @return [String] + attr_accessor :image_uri + + # Optional. The subtitle of the card. + # Corresponds to the JSON property `subtitle` + # @return [String] + attr_accessor :subtitle + + # Optional. The title of the card. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @buttons = args[:buttons] if args.key?(:buttons) + @image_uri = args[:image_uri] if args.key?(:image_uri) + @subtitle = args[:subtitle] if args.key?(:subtitle) + @title = args[:title] if args.key?(:title) + end + end + + # Optional. Contains information about a button. + class GoogleCloudDialogflowV2beta1IntentMessageCardButton + include Google::Apis::Core::Hashable + + # Optional. The text to send back to the Dialogflow API or a URI to + # open. + # Corresponds to the JSON property `postback` + # @return [String] + attr_accessor :postback + + # Optional. The text to show on the button. + # Corresponds to the JSON property `text` + # @return [String] + attr_accessor :text + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @postback = args[:postback] if args.key?(:postback) + @text = args[:text] if args.key?(:text) + end + end + + # The card for presenting a carousel of options to select from. + class GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect + include Google::Apis::Core::Hashable + + # Required. Carousel items. + # Corresponds to the JSON property `items` + # @return [Array] + attr_accessor :items + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @items = args[:items] if args.key?(:items) + end + end + + # An item in the carousel. + class GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem + include Google::Apis::Core::Hashable + + # Optional. The body text of the card. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # The image response message. + # Corresponds to the JSON property `image` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageImage] + attr_accessor :image + + # Additional info about the select item for when it is triggered in a + # dialog. + # Corresponds to the JSON property `info` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo] + attr_accessor :info + + # Required. Title of the carousel item. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @description = args[:description] if args.key?(:description) + @image = args[:image] if args.key?(:image) + @info = args[:info] if args.key?(:info) + @title = args[:title] if args.key?(:title) + end + end + + # Column properties for TableCard. + class GoogleCloudDialogflowV2beta1IntentMessageColumnProperties + include Google::Apis::Core::Hashable + + # Required. Column heading. + # Corresponds to the JSON property `header` + # @return [String] + attr_accessor :header + + # Optional. Defines text alignment for all cells in this column. + # Corresponds to the JSON property `horizontalAlignment` + # @return [String] + attr_accessor :horizontal_alignment + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @header = args[:header] if args.key?(:header) + @horizontal_alignment = args[:horizontal_alignment] if args.key?(:horizontal_alignment) + end + end + + # The image response message. + class GoogleCloudDialogflowV2beta1IntentMessageImage + include Google::Apis::Core::Hashable + + # A text description of the image to be used for accessibility, + # e.g., screen readers. Required if image_uri is set for CarouselSelect. + # Corresponds to the JSON property `accessibilityText` + # @return [String] + attr_accessor :accessibility_text + + # Optional. The public URI to an image file. + # Corresponds to the JSON property `imageUri` + # @return [String] + attr_accessor :image_uri + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @accessibility_text = args[:accessibility_text] if args.key?(:accessibility_text) + @image_uri = args[:image_uri] if args.key?(:image_uri) + end + end + + # The suggestion chip message that allows the user to jump out to the app + # or website associated with this agent. + class GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion + include Google::Apis::Core::Hashable + + # Required. The name of the app or site this chip is linking to. + # Corresponds to the JSON property `destinationName` + # @return [String] + attr_accessor :destination_name + + # Required. The URI of the app or site to open when the user taps the + # suggestion chip. + # Corresponds to the JSON property `uri` + # @return [String] + attr_accessor :uri + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @destination_name = args[:destination_name] if args.key?(:destination_name) + @uri = args[:uri] if args.key?(:uri) + end + end + + # The card for presenting a list of options to select from. + class GoogleCloudDialogflowV2beta1IntentMessageListSelect + include Google::Apis::Core::Hashable + + # Required. List items. + # Corresponds to the JSON property `items` + # @return [Array] + attr_accessor :items + + # Optional. Subtitle of the list. + # Corresponds to the JSON property `subtitle` + # @return [String] + attr_accessor :subtitle + + # Optional. The overall title of the list. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @items = args[:items] if args.key?(:items) + @subtitle = args[:subtitle] if args.key?(:subtitle) + @title = args[:title] if args.key?(:title) + end + end + + # An item in the list. + class GoogleCloudDialogflowV2beta1IntentMessageListSelectItem + include Google::Apis::Core::Hashable + + # Optional. The main text describing the item. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # The image response message. + # Corresponds to the JSON property `image` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageImage] + attr_accessor :image + + # Additional info about the select item for when it is triggered in a + # dialog. + # Corresponds to the JSON property `info` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo] + attr_accessor :info + + # Required. The title of the list item. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @description = args[:description] if args.key?(:description) + @image = args[:image] if args.key?(:image) + @info = args[:info] if args.key?(:info) + @title = args[:title] if args.key?(:title) + end + end + + # The media content card for Actions on Google. + class GoogleCloudDialogflowV2beta1IntentMessageMediaContent + include Google::Apis::Core::Hashable + + # Required. List of media objects. + # Corresponds to the JSON property `mediaObjects` + # @return [Array] + attr_accessor :media_objects + + # Optional. What type of media is the content (ie "audio"). + # Corresponds to the JSON property `mediaType` + # @return [String] + attr_accessor :media_type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @media_objects = args[:media_objects] if args.key?(:media_objects) + @media_type = args[:media_type] if args.key?(:media_type) + end + end + + # Response media object for media content card. + class GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObject + include Google::Apis::Core::Hashable + + # Required. Url where the media is stored. + # Corresponds to the JSON property `contentUrl` + # @return [String] + attr_accessor :content_url + + # Optional. Description of media card. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # The image response message. + # Corresponds to the JSON property `icon` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageImage] + attr_accessor :icon + + # The image response message. + # Corresponds to the JSON property `largeImage` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageImage] + attr_accessor :large_image + + # Required. Name of media card. + # 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) + @content_url = args[:content_url] if args.key?(:content_url) + @description = args[:description] if args.key?(:description) + @icon = args[:icon] if args.key?(:icon) + @large_image = args[:large_image] if args.key?(:large_image) + @name = args[:name] if args.key?(:name) + end + end + + # The quick replies response message. + class GoogleCloudDialogflowV2beta1IntentMessageQuickReplies + include Google::Apis::Core::Hashable + + # Optional. The collection of quick replies. + # Corresponds to the JSON property `quickReplies` + # @return [Array] + attr_accessor :quick_replies + + # Optional. The title of the collection of quick replies. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @quick_replies = args[:quick_replies] if args.key?(:quick_replies) + @title = args[:title] if args.key?(:title) + end + end + + # Rich Business Messaging (RBM) Card content + class GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent + include Google::Apis::Core::Hashable + + # Optional. Description of the card (at most 2000 bytes). + # At least one of the title, description or media must be set. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # Rich Business Messaging (RBM) Media displayed in Cards + # The following media-types are currently supported: + # Image Types + # * image/jpeg + # * image/jpg' + # * image/gif + # * image/png + # Video Types + # * video/h263 + # * video/m4v + # * video/mp4 + # * video/mpeg + # * video/mpeg4 + # * video/webm + # Corresponds to the JSON property `media` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia] + attr_accessor :media + + # Optional. List of suggestions to include in the card. + # Corresponds to the JSON property `suggestions` + # @return [Array] + attr_accessor :suggestions + + # Optional. Title of the card (at most 200 bytes). + # At least one of the title, description or media must be set. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @description = args[:description] if args.key?(:description) + @media = args[:media] if args.key?(:media) + @suggestions = args[:suggestions] if args.key?(:suggestions) + @title = args[:title] if args.key?(:title) + end + end + + # Rich Business Messaging (RBM) Media displayed in Cards + # The following media-types are currently supported: + # Image Types + # * image/jpeg + # * image/jpg' + # * image/gif + # * image/png + # Video Types + # * video/h263 + # * video/m4v + # * video/mp4 + # * video/mpeg + # * video/mpeg4 + # * video/webm + class GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia + include Google::Apis::Core::Hashable + + # Required. Publicly reachable URI of the file. The RBM platform + # determines the MIME type of the file from the content-type field in + # the HTTP headers when the platform fetches the file. The content-type + # field must be present and accurate in the HTTP response from the URL. + # Corresponds to the JSON property `fileUri` + # @return [String] + attr_accessor :file_uri + + # Required for cards with vertical orientation. The height of the media + # within a rich card with a vertical layout. (https://goo.gl/NeFCjz). + # For a standalone card with horizontal layout, height is not + # customizable, and this field is ignored. + # Corresponds to the JSON property `height` + # @return [String] + attr_accessor :height + + # Optional. Publicly reachable URI of the thumbnail.If you don't + # provide a thumbnail URI, the RBM platform displays a blank + # placeholder thumbnail until the user's device downloads the file. + # Depending on the user's setting, the file may not download + # automatically and may require the user to tap a download button. + # Corresponds to the JSON property `thumbnailUri` + # @return [String] + attr_accessor :thumbnail_uri + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @file_uri = args[:file_uri] if args.key?(:file_uri) + @height = args[:height] if args.key?(:height) + @thumbnail_uri = args[:thumbnail_uri] if args.key?(:thumbnail_uri) + end + end + + # Carousel Rich Business Messaging (RBM) rich card. + # Rich cards allow you to respond to users with more vivid content, e.g. + # with media and suggestions. + # For more details about RBM rich cards, please see: + # https://developers.google.com/rcs-business-messaging/rbm/guides/build/send- + # messages#rich-cards. + # If you want to show a single card with more control over the layout, + # please use RbmStandaloneCard instead. + class GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard + include Google::Apis::Core::Hashable + + # Required. The cards in the carousel. A carousel must have at least + # 2 cards and at most 10. + # Corresponds to the JSON property `cardContents` + # @return [Array] + attr_accessor :card_contents + + # Required. The width of the cards in the carousel. + # Corresponds to the JSON property `cardWidth` + # @return [String] + attr_accessor :card_width + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @card_contents = args[:card_contents] if args.key?(:card_contents) + @card_width = args[:card_width] if args.key?(:card_width) + end + end + + # Standalone Rich Business Messaging (RBM) rich card. + # Rich cards allow you to respond to users with more vivid content, e.g. + # with media and suggestions. + # For more details about RBM rich cards, please see: + # https://developers.google.com/rcs-business-messaging/rbm/guides/build/send- + # messages#rich-cards. + # You can group multiple rich cards into one using RbmCarouselCard but + # carousel cards will give you less control over the card layout. + class GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard + include Google::Apis::Core::Hashable + + # Rich Business Messaging (RBM) Card content + # Corresponds to the JSON property `cardContent` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent] + attr_accessor :card_content + + # Required. Orientation of the card. + # Corresponds to the JSON property `cardOrientation` + # @return [String] + attr_accessor :card_orientation + + # Required if orientation is horizontal. + # Image preview alignment for standalone cards with horizontal layout. + # Corresponds to the JSON property `thumbnailImageAlignment` + # @return [String] + attr_accessor :thumbnail_image_alignment + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @card_content = args[:card_content] if args.key?(:card_content) + @card_orientation = args[:card_orientation] if args.key?(:card_orientation) + @thumbnail_image_alignment = args[:thumbnail_image_alignment] if args.key?(:thumbnail_image_alignment) + end + end + + # Rich Business Messaging (RBM) suggested client-side action that the user + # can choose from the card. + class GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction + include Google::Apis::Core::Hashable + + # Opens the user's default dialer app with the specified phone number + # but does not dial automatically (https://goo.gl/ergbB2). + # Corresponds to the JSON property `dial` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial] + attr_accessor :dial + + # Opens the user's default web browser app to the specified uri + # (https://goo.gl/6GLJD2). If the user has an app installed that is + # registered as the default handler for the URL, then this app will be + # opened instead, and its icon will be used in the suggested action UI. + # Corresponds to the JSON property `openUrl` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri] + attr_accessor :open_url + + # Opaque payload that the Dialogflow receives in a user event + # when the user taps the suggested action. This data will be also + # forwarded to webhook to allow performing custom business logic. + # Corresponds to the JSON property `postbackData` + # @return [String] + attr_accessor :postback_data + + # Opens the device's location chooser so the user can pick a location + # to send back to the agent (https://goo.gl/GXotJW). + # Corresponds to the JSON property `shareLocation` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionShareLocation] + attr_accessor :share_location + + # Text to display alongside the action. + # Corresponds to the JSON property `text` + # @return [String] + attr_accessor :text + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @dial = args[:dial] if args.key?(:dial) + @open_url = args[:open_url] if args.key?(:open_url) + @postback_data = args[:postback_data] if args.key?(:postback_data) + @share_location = args[:share_location] if args.key?(:share_location) + @text = args[:text] if args.key?(:text) + end + end + + # Opens the user's default dialer app with the specified phone number + # but does not dial automatically (https://goo.gl/ergbB2). + class GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial + include Google::Apis::Core::Hashable + + # Required. The phone number to fill in the default dialer app. + # This field should be in [E.164](https://en.wikipedia.org/wiki/E.164) + # format. An example of a correctly formatted phone number: + # +15556767888. + # Corresponds to the JSON property `phoneNumber` + # @return [String] + attr_accessor :phone_number + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @phone_number = args[:phone_number] if args.key?(:phone_number) + end + end + + # Opens the user's default web browser app to the specified uri + # (https://goo.gl/6GLJD2). If the user has an app installed that is + # registered as the default handler for the URL, then this app will be + # opened instead, and its icon will be used in the suggested action UI. + class GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri + include Google::Apis::Core::Hashable + + # Required. The uri to open on the user device + # Corresponds to the JSON property `uri` + # @return [String] + attr_accessor :uri + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @uri = args[:uri] if args.key?(:uri) + end + end + + # Opens the device's location chooser so the user can pick a location + # to send back to the agent (https://goo.gl/GXotJW). + class GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionShareLocation + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Rich Business Messaging (RBM) suggested reply that the user can click + # instead of typing in their own response. + class GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply + include Google::Apis::Core::Hashable + + # Opaque payload that the Dialogflow receives in a user event + # when the user taps the suggested reply. This data will be also + # forwarded to webhook to allow performing custom business logic. + # Corresponds to the JSON property `postbackData` + # @return [String] + attr_accessor :postback_data + + # Suggested reply text. + # Corresponds to the JSON property `text` + # @return [String] + attr_accessor :text + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @postback_data = args[:postback_data] if args.key?(:postback_data) + @text = args[:text] if args.key?(:text) + end + end + + # Rich Business Messaging (RBM) suggestion. Suggestions allow user to + # easily select/click a predefined response or perform an action (like + # opening a web uri). + class GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion + include Google::Apis::Core::Hashable + + # Rich Business Messaging (RBM) suggested client-side action that the user + # can choose from the card. + # Corresponds to the JSON property `action` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction] + attr_accessor :action + + # Rich Business Messaging (RBM) suggested reply that the user can click + # instead of typing in their own response. + # Corresponds to the JSON property `reply` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply] + attr_accessor :reply + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @action = args[:action] if args.key?(:action) + @reply = args[:reply] if args.key?(:reply) + end + end + + # Rich Business Messaging (RBM) text response with suggestions. + class GoogleCloudDialogflowV2beta1IntentMessageRbmText + include Google::Apis::Core::Hashable + + # Optional. One or more suggestions to show to the user. + # Corresponds to the JSON property `rbmSuggestion` + # @return [Array] + attr_accessor :rbm_suggestion + + # Required. Text sent and displayed to the user. + # Corresponds to the JSON property `text` + # @return [String] + attr_accessor :text + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @rbm_suggestion = args[:rbm_suggestion] if args.key?(:rbm_suggestion) + @text = args[:text] if args.key?(:text) + end + end + + # Additional info about the select item for when it is triggered in a + # dialog. + class GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo + include Google::Apis::Core::Hashable + + # Required. A unique key that will be sent back to the agent if this + # response is given. + # Corresponds to the JSON property `key` + # @return [String] + attr_accessor :key + + # Optional. A list of synonyms that can also be used to trigger this + # item in dialog. + # Corresponds to the JSON property `synonyms` + # @return [Array] + attr_accessor :synonyms + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @key = args[:key] if args.key?(:key) + @synonyms = args[:synonyms] if args.key?(:synonyms) + end + end + + # The simple response message containing speech or text. + class GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse + include Google::Apis::Core::Hashable + + # Optional. The text to display. + # Corresponds to the JSON property `displayText` + # @return [String] + attr_accessor :display_text + + # One of text_to_speech or ssml must be provided. Structured spoken + # response to the user in the SSML format. Mutually exclusive with + # text_to_speech. + # Corresponds to the JSON property `ssml` + # @return [String] + attr_accessor :ssml + + # One of text_to_speech or ssml must be provided. The plain text of the + # speech output. Mutually exclusive with ssml. + # Corresponds to the JSON property `textToSpeech` + # @return [String] + attr_accessor :text_to_speech + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @display_text = args[:display_text] if args.key?(:display_text) + @ssml = args[:ssml] if args.key?(:ssml) + @text_to_speech = args[:text_to_speech] if args.key?(:text_to_speech) + end + end + + # The collection of simple response candidates. + # This message in `QueryResult.fulfillment_messages` and + # `WebhookResponse.fulfillment_messages` should contain only one + # `SimpleResponse`. + class GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses + include Google::Apis::Core::Hashable + + # Required. The list of simple responses. + # Corresponds to the JSON property `simpleResponses` + # @return [Array] + attr_accessor :simple_responses + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @simple_responses = args[:simple_responses] if args.key?(:simple_responses) + end + end + + # The suggestion chip message that the user can tap to quickly post a reply + # to the conversation. + class GoogleCloudDialogflowV2beta1IntentMessageSuggestion + include Google::Apis::Core::Hashable + + # Required. The text shown the in the suggestion chip. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @title = args[:title] if args.key?(:title) + end + end + + # The collection of suggestions. + class GoogleCloudDialogflowV2beta1IntentMessageSuggestions + include Google::Apis::Core::Hashable + + # Required. The list of suggested replies. + # Corresponds to the JSON property `suggestions` + # @return [Array] + attr_accessor :suggestions + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @suggestions = args[:suggestions] if args.key?(:suggestions) + end + end + + # Table card for Actions on Google. + class GoogleCloudDialogflowV2beta1IntentMessageTableCard + include Google::Apis::Core::Hashable + + # Optional. List of buttons for the card. + # Corresponds to the JSON property `buttons` + # @return [Array] + attr_accessor :buttons + + # Optional. Display properties for the columns in this table. + # Corresponds to the JSON property `columnProperties` + # @return [Array] + attr_accessor :column_properties + + # The image response message. + # Corresponds to the JSON property `image` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageImage] + attr_accessor :image + + # Optional. Rows in this table of data. + # Corresponds to the JSON property `rows` + # @return [Array] + attr_accessor :rows + + # Optional. Subtitle to the title. + # Corresponds to the JSON property `subtitle` + # @return [String] + attr_accessor :subtitle + + # Required. Title of the card. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @buttons = args[:buttons] if args.key?(:buttons) + @column_properties = args[:column_properties] if args.key?(:column_properties) + @image = args[:image] if args.key?(:image) + @rows = args[:rows] if args.key?(:rows) + @subtitle = args[:subtitle] if args.key?(:subtitle) + @title = args[:title] if args.key?(:title) + end + end + + # Cell of TableCardRow. + class GoogleCloudDialogflowV2beta1IntentMessageTableCardCell + include Google::Apis::Core::Hashable + + # Required. Text in this cell. + # Corresponds to the JSON property `text` + # @return [String] + attr_accessor :text + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @text = args[:text] if args.key?(:text) + end + end + + # Row of TableCard. + class GoogleCloudDialogflowV2beta1IntentMessageTableCardRow + include Google::Apis::Core::Hashable + + # Optional. List of cells that make up this row. + # Corresponds to the JSON property `cells` + # @return [Array] + attr_accessor :cells + + # Optional. Whether to add a visual divider after this row. + # Corresponds to the JSON property `dividerAfter` + # @return [Boolean] + attr_accessor :divider_after + alias_method :divider_after?, :divider_after + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @cells = args[:cells] if args.key?(:cells) + @divider_after = args[:divider_after] if args.key?(:divider_after) + end + end + + # Plays audio from a file in Telephony Gateway. + class GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio + include Google::Apis::Core::Hashable + + # Required. URI to a Google Cloud Storage object containing the audio to + # play, e.g., "gs://bucket/object". The object must contain a single + # channel (mono) of linear PCM audio (2 bytes / sample) at 8kHz. + # This object must be readable by the `service-@gcp-sa-dialogflow.iam.gserviceaccount.com` service account + # where is the number of the Telephony Gateway project + # (usually the same as the Dialogflow agent project). If the Google Cloud + # Storage bucket is in the Telephony Gateway project, this permission is + # added by default when enabling the Dialogflow V2 API. + # For audio from other sources, consider using the + # `TelephonySynthesizeSpeech` message with SSML. + # Corresponds to the JSON property `audioUri` + # @return [String] + attr_accessor :audio_uri + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @audio_uri = args[:audio_uri] if args.key?(:audio_uri) + end + end + + # Synthesizes speech and plays back the synthesized audio to the caller in + # Telephony Gateway. + # Telephony Gateway takes the synthesizer settings from + # `DetectIntentResponse.output_audio_config` which can either be set + # at request-level or can come from the agent-level synthesizer config. + class GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech + include Google::Apis::Core::Hashable + + # The SSML to be synthesized. For more information, see + # [SSML](https://developers.google.com/actions/reference/ssml). + # Corresponds to the JSON property `ssml` + # @return [String] + attr_accessor :ssml + + # The raw text to be synthesized. + # Corresponds to the JSON property `text` + # @return [String] + attr_accessor :text + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @ssml = args[:ssml] if args.key?(:ssml) + @text = args[:text] if args.key?(:text) + end + end + + # Transfers the call in Telephony Gateway. + class GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall + include Google::Apis::Core::Hashable + + # Required. The phone number to transfer the call to + # in [E.164 format](https://en.wikipedia.org/wiki/E.164). + # We currently only allow transferring to US numbers (+1xxxyyyzzzz). + # Corresponds to the JSON property `phoneNumber` + # @return [String] + attr_accessor :phone_number + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @phone_number = args[:phone_number] if args.key?(:phone_number) + end + end + + # The text response message. + class GoogleCloudDialogflowV2beta1IntentMessageText + include Google::Apis::Core::Hashable + + # Optional. The collection of the agent's responses. + # Corresponds to the JSON property `text` + # @return [Array] + attr_accessor :text + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @text = args[:text] if args.key?(:text) + end + end + + # Represents intent parameters. + class GoogleCloudDialogflowV2beta1IntentParameter + include Google::Apis::Core::Hashable + + # Optional. The default value to use when the `value` yields an empty + # result. + # Default values can be extracted from contexts by using the following + # syntax: `#context_name.parameter_name`. + # Corresponds to the JSON property `defaultValue` + # @return [String] + attr_accessor :default_value + + # Required. The name of the parameter. + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # Optional. The name of the entity type, prefixed with `@`, that + # describes values of the parameter. If the parameter is + # required, this must be provided. + # Corresponds to the JSON property `entityTypeDisplayName` + # @return [String] + attr_accessor :entity_type_display_name + + # Optional. Indicates whether the parameter represents a list of values. + # Corresponds to the JSON property `isList` + # @return [Boolean] + attr_accessor :is_list + alias_method :is_list?, :is_list + + # Optional. Indicates whether the parameter is required. That is, + # whether the intent cannot be completed without collecting the parameter + # value. + # Corresponds to the JSON property `mandatory` + # @return [Boolean] + attr_accessor :mandatory + alias_method :mandatory?, :mandatory + + # The unique identifier of this parameter. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Optional. The collection of prompts that the agent can present to the + # user in order to collect a value for the parameter. + # Corresponds to the JSON property `prompts` + # @return [Array] + attr_accessor :prompts + + # Optional. The definition of the parameter value. It can be: + # - a constant string, + # - a parameter value defined as `$parameter_name`, + # - an original parameter value defined as `$parameter_name.original`, + # - a parameter value from some context defined as + # `#context_name.parameter_name`. + # Corresponds to the JSON property `value` + # @return [String] + attr_accessor :value + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @default_value = args[:default_value] if args.key?(:default_value) + @display_name = args[:display_name] if args.key?(:display_name) + @entity_type_display_name = args[:entity_type_display_name] if args.key?(:entity_type_display_name) + @is_list = args[:is_list] if args.key?(:is_list) + @mandatory = args[:mandatory] if args.key?(:mandatory) + @name = args[:name] if args.key?(:name) + @prompts = args[:prompts] if args.key?(:prompts) + @value = args[:value] if args.key?(:value) + end + end + + # Represents an example that the agent is trained on. + class GoogleCloudDialogflowV2beta1IntentTrainingPhrase + include Google::Apis::Core::Hashable + + # Output only. The unique identifier of this training phrase. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Required. The ordered list of training phrase parts. + # The parts are concatenated in order to form the training phrase. + # Note: The API does not automatically annotate training phrases like the + # Dialogflow Console does. + # Note: Do not forget to include whitespace at part boundaries, + # so the training phrase is well formatted when the parts are concatenated. + # If the training phrase does not need to be annotated with parameters, + # you just need a single part with only the Part.text field set. + # If you want to annotate the training phrase, you must create multiple + # parts, where the fields of each part are populated in one of two ways: + # - `Part.text` is set to a part of the phrase that has no parameters. + # - `Part.text` is set to a part of the phrase that you want to annotate, + # and the `entity_type`, `alias`, and `user_defined` fields are all + # set. + # Corresponds to the JSON property `parts` + # @return [Array] + attr_accessor :parts + + # Optional. Indicates how many times this example was added to + # the intent. Each time a developer adds an existing sample by editing an + # intent or training, this counter is increased. + # Corresponds to the JSON property `timesAddedCount` + # @return [Fixnum] + attr_accessor :times_added_count + + # Required. The type of the training phrase. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @name = args[:name] if args.key?(:name) + @parts = args[:parts] if args.key?(:parts) + @times_added_count = args[:times_added_count] if args.key?(:times_added_count) + @type = args[:type] if args.key?(:type) + end + end + + # Represents a part of a training phrase. + class GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart + include Google::Apis::Core::Hashable + + # Optional. The parameter name for the value extracted from the + # annotated part of the example. + # This field is required for annotated parts of the training phrase. + # Corresponds to the JSON property `alias` + # @return [String] + attr_accessor :alias + + # Optional. The entity type name prefixed with `@`. + # This field is required for annotated parts of the training phrase. + # Corresponds to the JSON property `entityType` + # @return [String] + attr_accessor :entity_type + + # Required. The text for this part. + # Corresponds to the JSON property `text` + # @return [String] + attr_accessor :text + + # Optional. Indicates whether the text was manually annotated. + # This field is set to true when the Dialogflow Console is used to + # manually annotate the part. When creating an annotated part with the + # API, you must set this to true. + # Corresponds to the JSON property `userDefined` + # @return [Boolean] + attr_accessor :user_defined + alias_method :user_defined?, :user_defined + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @alias = args[:alias] if args.key?(:alias) + @entity_type = args[:entity_type] if args.key?(:entity_type) + @text = args[:text] if args.key?(:text) + @user_defined = args[:user_defined] if args.key?(:user_defined) + end + end + + # Represents the result of querying a Knowledge base. + class GoogleCloudDialogflowV2beta1KnowledgeAnswers + include Google::Apis::Core::Hashable + + # A list of answers from Knowledge Connector. + # Corresponds to the JSON property `answers` + # @return [Array] + attr_accessor :answers + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @answers = args[:answers] if args.key?(:answers) + end + end + + # An answer from Knowledge Connector. + class GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer + include Google::Apis::Core::Hashable + + # The piece of text from the `source` knowledge base document that answers + # this conversational query. + # Corresponds to the JSON property `answer` + # @return [String] + attr_accessor :answer + + # The corresponding FAQ question if the answer was extracted from a FAQ + # Document, empty otherwise. + # Corresponds to the JSON property `faqQuestion` + # @return [String] + attr_accessor :faq_question + + # The system's confidence score that this Knowledge answer is a good match + # for this conversational query. + # The range is from 0.0 (completely uncertain) to 1.0 (completely certain). + # Note: The confidence score is likely to vary somewhat (possibly even for + # identical requests), as the underlying model is under constant + # improvement. It may be deprecated in the future. We recommend using + # `match_confidence_level` which should be generally more stable. + # Corresponds to the JSON property `matchConfidence` + # @return [Float] + attr_accessor :match_confidence + + # The system's confidence level that this knowledge answer is a good match + # for this conversational query. + # NOTE: The confidence level for a given `` pair may change + # without notice, as it depends on models that are constantly being + # improved. However, it will change less frequently than the confidence + # score below, and should be preferred for referencing the quality of an + # answer. + # Corresponds to the JSON property `matchConfidenceLevel` + # @return [String] + attr_accessor :match_confidence_level + + # Indicates which Knowledge Document this answer was extracted from. + # Format: `projects//knowledgeBases//documents/`. + # Corresponds to the JSON property `source` + # @return [String] + attr_accessor :source + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @answer = args[:answer] if args.key?(:answer) + @faq_question = args[:faq_question] if args.key?(:faq_question) + @match_confidence = args[:match_confidence] if args.key?(:match_confidence) + @match_confidence_level = args[:match_confidence_level] if args.key?(:match_confidence_level) + @source = args[:source] if args.key?(:source) + end + end + + # Metadata in google::longrunning::Operation for Knowledge operations. + class GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata + include Google::Apis::Core::Hashable + + # Required. Output only. The current state of this operation. + # Corresponds to the JSON property `state` + # @return [String] + attr_accessor :state + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @state = args[:state] if args.key?(:state) + end + end + + # The response for + # ConversationDatasets.LabelConversation. + class GoogleCloudDialogflowV2beta1LabelConversationResponse + include Google::Apis::Core::Hashable + + # Represents an annotated conversation dataset. + # ConversationDataset can have multiple AnnotatedConversationDataset, each of + # them represents one result from one annotation task. + # AnnotatedConversationDataset can only be generated from annotation task, + # which will be triggered by LabelConversation. + # Corresponds to the JSON property `annotatedConversationDataset` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1AnnotatedConversationDataset] + attr_accessor :annotated_conversation_dataset + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @annotated_conversation_dataset = args[:annotated_conversation_dataset] if args.key?(:annotated_conversation_dataset) + end + end + + # Represents the contents of the original request that was passed to + # the `[Streaming]DetectIntent` call. + class GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest + include Google::Apis::Core::Hashable + + # Optional. This field is set to the value of the `QueryParameters.payload` + # field passed in the request. Some integrations that query a Dialogflow + # agent may provide additional information in the payload. + # In particular, for the Dialogflow Phone Gateway integration, this field has + # the form: + #
`
+        # "telephony": `
+        # "caller_id": "+18558363987"
+        # `
+        # `
+ # Note: The caller ID field (`caller_id`) will be redacted for Standard + # Edition agents and populated with the caller ID in [E.164 + # format](https://en.wikipedia.org/wiki/E.164) for Enterprise Edition agents. + # Corresponds to the JSON property `payload` + # @return [Hash] + attr_accessor :payload + + # The source of this request, e.g., `google`, `facebook`, `slack`. It is set + # by Dialogflow-owned servers. + # Corresponds to the JSON property `source` + # @return [String] + attr_accessor :source + + # Optional. The version of the protocol used for this request. + # This field is AoG-specific. + # Corresponds to the JSON property `version` + # @return [String] + attr_accessor :version + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @payload = args[:payload] if args.key?(:payload) + @source = args[:source] if args.key?(:source) + @version = args[:version] if args.key?(:version) + end + end + + # Represents the result of conversational query or event processing. + class GoogleCloudDialogflowV2beta1QueryResult + include Google::Apis::Core::Hashable + + # The action name from the matched intent. + # Corresponds to the JSON property `action` + # @return [String] + attr_accessor :action + + # This field is set to: + # - `false` if the matched intent has required parameters and not all of + # the required parameter values have been collected. + # - `true` if all required parameter values have been collected, or if the + # matched intent doesn't contain any required parameters. + # Corresponds to the JSON property `allRequiredParamsPresent` + # @return [Boolean] + attr_accessor :all_required_params_present + alias_method :all_required_params_present?, :all_required_params_present + + # Free-form diagnostic information for the associated detect intent request. + # The fields of this data can change without notice, so you should not write + # code that depends on its structure. + # The data may contain: + # - webhook call latency + # - webhook errors + # Corresponds to the JSON property `diagnosticInfo` + # @return [Hash] + attr_accessor :diagnostic_info + + # The collection of rich messages to present to the user. + # Corresponds to the JSON property `fulfillmentMessages` + # @return [Array] + attr_accessor :fulfillment_messages + + # The text to be pronounced to the user or shown on the screen. + # Note: This is a legacy field, `fulfillment_messages` should be preferred. + # Corresponds to the JSON property `fulfillmentText` + # @return [String] + attr_accessor :fulfillment_text + + # Represents an intent. + # Intents convert a number of user expressions or patterns into an action. An + # action is an extraction of a user command or sentence semantics. + # Corresponds to the JSON property `intent` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1Intent] + attr_accessor :intent + + # The intent detection confidence. Values range from 0.0 + # (completely uncertain) to 1.0 (completely certain). + # This value is for informational purpose only and is only used to + # help match the best intent within the classification threshold. + # This value may change for the same end-user expression at any time due to a + # model retraining or change in implementation. + # If there are `multiple knowledge_answers` messages, this value is set to + # the greatest `knowledgeAnswers.match_confidence` value in the list. + # Corresponds to the JSON property `intentDetectionConfidence` + # @return [Float] + attr_accessor :intent_detection_confidence + + # Represents the result of querying a Knowledge base. + # Corresponds to the JSON property `knowledgeAnswers` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1KnowledgeAnswers] + attr_accessor :knowledge_answers + + # The language that was triggered during intent detection. + # See [Language + # Support](https://cloud.google.com/dialogflow/docs/reference/language) + # for a list of the currently supported language codes. + # Corresponds to the JSON property `languageCode` + # @return [String] + attr_accessor :language_code + + # The collection of output contexts. If applicable, + # `output_contexts.parameters` contains entries with name + # `.original` containing the original parameter values + # before the query. + # Corresponds to the JSON property `outputContexts` + # @return [Array] + attr_accessor :output_contexts + + # The collection of extracted parameters. + # Depending on your protocol or client library language, this is a + # map, associative array, symbol table, dictionary, or JSON object + # composed of a collection of (MapKey, MapValue) pairs: + # - MapKey type: string + # - MapKey value: parameter name + # - MapValue type: + # - If parameter's entity type is a composite entity: map + # - Else: string or number, depending on parameter value type + # - MapValue value: + # - If parameter's entity type is a composite entity: + # map from composite entity property names to property values + # - Else: parameter value + # Corresponds to the JSON property `parameters` + # @return [Hash] + attr_accessor :parameters + + # The original conversational query text: + # - If natural language text was provided as input, `query_text` contains + # a copy of the input. + # - If natural language speech audio was provided as input, `query_text` + # contains the speech recognition result. If speech recognizer produced + # multiple alternatives, a particular one is picked. + # - If automatic spell correction is enabled, `query_text` will contain the + # corrected user input. + # Corresponds to the JSON property `queryText` + # @return [String] + attr_accessor :query_text + + # The result of sentiment analysis as configured by + # `sentiment_analysis_request_config`. + # Corresponds to the JSON property `sentimentAnalysisResult` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1SentimentAnalysisResult] + attr_accessor :sentiment_analysis_result + + # The Speech recognition confidence between 0.0 and 1.0. A higher number + # indicates an estimated greater likelihood that the recognized words are + # correct. The default of 0.0 is a sentinel value indicating that confidence + # was not set. + # This field is not guaranteed to be accurate or set. In particular this + # field isn't set for StreamingDetectIntent since the streaming endpoint has + # separate confidence estimates per portion of the audio in + # StreamingRecognitionResult. + # Corresponds to the JSON property `speechRecognitionConfidence` + # @return [Float] + attr_accessor :speech_recognition_confidence + + # If the query was fulfilled by a webhook call, this field is set to the + # value of the `payload` field returned in the webhook response. + # Corresponds to the JSON property `webhookPayload` + # @return [Hash] + attr_accessor :webhook_payload + + # If the query was fulfilled by a webhook call, this field is set to the + # value of the `source` field returned in the webhook response. + # Corresponds to the JSON property `webhookSource` + # @return [String] + attr_accessor :webhook_source + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @action = args[:action] if args.key?(:action) + @all_required_params_present = args[:all_required_params_present] if args.key?(:all_required_params_present) + @diagnostic_info = args[:diagnostic_info] if args.key?(:diagnostic_info) + @fulfillment_messages = args[:fulfillment_messages] if args.key?(:fulfillment_messages) + @fulfillment_text = args[:fulfillment_text] if args.key?(:fulfillment_text) + @intent = args[:intent] if args.key?(:intent) + @intent_detection_confidence = args[:intent_detection_confidence] if args.key?(:intent_detection_confidence) + @knowledge_answers = args[:knowledge_answers] if args.key?(:knowledge_answers) + @language_code = args[:language_code] if args.key?(:language_code) + @output_contexts = args[:output_contexts] if args.key?(:output_contexts) + @parameters = args[:parameters] if args.key?(:parameters) + @query_text = args[:query_text] if args.key?(:query_text) + @sentiment_analysis_result = args[:sentiment_analysis_result] if args.key?(:sentiment_analysis_result) + @speech_recognition_confidence = args[:speech_recognition_confidence] if args.key?(:speech_recognition_confidence) + @webhook_payload = args[:webhook_payload] if args.key?(:webhook_payload) + @webhook_source = args[:webhook_source] if args.key?(:webhook_source) + end + end + + # The sentiment, such as positive/negative feeling or association, for a unit + # of analysis, such as the query text. + class GoogleCloudDialogflowV2beta1Sentiment + include Google::Apis::Core::Hashable + + # A non-negative number in the [0, +inf) range, which represents the absolute + # magnitude of sentiment, regardless of score (positive or negative). + # Corresponds to the JSON property `magnitude` + # @return [Float] + attr_accessor :magnitude + + # Sentiment score between -1.0 (negative sentiment) and 1.0 (positive + # sentiment). + # Corresponds to the JSON property `score` + # @return [Float] + attr_accessor :score + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @magnitude = args[:magnitude] if args.key?(:magnitude) + @score = args[:score] if args.key?(:score) + end + end + + # The result of sentiment analysis as configured by + # `sentiment_analysis_request_config`. + class GoogleCloudDialogflowV2beta1SentimentAnalysisResult + include Google::Apis::Core::Hashable + + # The sentiment, such as positive/negative feeling or association, for a unit + # of analysis, such as the query text. + # Corresponds to the JSON property `queryTextSentiment` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1Sentiment] + attr_accessor :query_text_sentiment + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @query_text_sentiment = args[:query_text_sentiment] if args.key?(:query_text_sentiment) + end + end + + # Represents a session entity type. + # Extends or replaces a custom entity type at the user session level (we + # refer to the entity types defined at the agent level as "custom entity + # types"). + # Note: session entity types apply to all queries, regardless of the language. + class GoogleCloudDialogflowV2beta1SessionEntityType + include Google::Apis::Core::Hashable + + # Required. The collection of entities associated with this session entity + # type. + # Corresponds to the JSON property `entities` + # @return [Array] + attr_accessor :entities + + # Required. Indicates whether the additional data should override or + # supplement the custom entity type definition. + # Corresponds to the JSON property `entityOverrideMode` + # @return [String] + attr_accessor :entity_override_mode + + # Required. The unique identifier of this session entity type. Format: + # `projects//agent/sessions//entityTypes/`, or + # `projects//agent/environments//users//sessions//entityTypes/`. + # If `Environment ID` is not specified, we assume default 'draft' + # environment. If `User ID` is not specified, we assume default '-' user. + # `` must be the display name of an existing entity + # type in the same agent that will be overridden or supplemented. + # 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) + @entities = args[:entities] if args.key?(:entities) + @entity_override_mode = args[:entity_override_mode] if args.key?(:entity_override_mode) + @name = args[:name] if args.key?(:name) + end + end + + # The request message for a webhook call. + class GoogleCloudDialogflowV2beta1WebhookRequest + include Google::Apis::Core::Hashable + + # Alternative query results from KnowledgeService. + # Corresponds to the JSON property `alternativeQueryResults` + # @return [Array] + attr_accessor :alternative_query_results + + # Represents the contents of the original request that was passed to + # the `[Streaming]DetectIntent` call. + # Corresponds to the JSON property `originalDetectIntentRequest` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest] + attr_accessor :original_detect_intent_request + + # Represents the result of conversational query or event processing. + # Corresponds to the JSON property `queryResult` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1QueryResult] + attr_accessor :query_result + + # The unique identifier of the response. Contains the same value as + # `[Streaming]DetectIntentResponse.response_id`. + # Corresponds to the JSON property `responseId` + # @return [String] + attr_accessor :response_id + + # The unique identifier of detectIntent request session. + # Can be used to identify end-user inside webhook implementation. + # Format: `projects//agent/sessions/`, or + # `projects//agent/environments//users//sessions/`. + # Corresponds to the JSON property `session` + # @return [String] + attr_accessor :session + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @alternative_query_results = args[:alternative_query_results] if args.key?(:alternative_query_results) + @original_detect_intent_request = args[:original_detect_intent_request] if args.key?(:original_detect_intent_request) + @query_result = args[:query_result] if args.key?(:query_result) + @response_id = args[:response_id] if args.key?(:response_id) + @session = args[:session] if args.key?(:session) + end + end + + # The response message for a webhook call. + # This response is validated by the Dialogflow server. If validation fails, + # an error will be returned in the QueryResult.diagnostic_info field. + # Setting JSON fields to an empty value with the wrong type is a common error. + # To avoid this error: + # - Use `""` for empty strings + # - Use ```` or `null` for empty objects + # - Use `[]` or `null` for empty arrays + # For more information, see the + # [Protocol Buffers Language + # Guide](https://developers.google.com/protocol-buffers/docs/proto3#json). + class GoogleCloudDialogflowV2beta1WebhookResponse + include Google::Apis::Core::Hashable + + # Optional. Indicates that this intent ends an interaction. Some integrations + # (e.g., Actions on Google or Dialogflow phone gateway) use this information + # to close interaction with an end user. Default is false. + # Corresponds to the JSON property `endInteraction` + # @return [Boolean] + attr_accessor :end_interaction + alias_method :end_interaction?, :end_interaction + + # Events allow for matching intents by event name instead of the natural + # language input. For instance, input `` can trigger a personalized welcome response. + # The parameter `name` may be used by the agent in the response: + # `"Hello #welcome_event.name! What can I do for you today?"`. + # Corresponds to the JSON property `followupEventInput` + # @return [Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1EventInput] + attr_accessor :followup_event_input + + # Optional. The rich response messages intended for the end-user. + # When provided, Dialogflow uses this field to populate + # QueryResult.fulfillment_messages sent to the integration or API caller. + # Corresponds to the JSON property `fulfillmentMessages` + # @return [Array] + attr_accessor :fulfillment_messages + + # Optional. The text response message intended for the end-user. + # It is recommended to use `fulfillment_messages.text.text[0]` instead. + # When provided, Dialogflow uses this field to populate + # QueryResult.fulfillment_text sent to the integration or API caller. + # Corresponds to the JSON property `fulfillmentText` + # @return [String] + attr_accessor :fulfillment_text + + # Optional. The collection of output contexts that will overwrite currently + # active contexts for the session and reset their lifespans. + # When provided, Dialogflow uses this field to populate + # QueryResult.output_contexts sent to the integration or API caller. + # Corresponds to the JSON property `outputContexts` + # @return [Array] + attr_accessor :output_contexts + + # Optional. This field can be used to pass custom data from your webhook to the + # integration or API caller. Arbitrary JSON objects are supported. + # When provided, Dialogflow uses this field to populate + # QueryResult.webhook_payload sent to the integration or API caller. + # This field is also used by the + # [Google Assistant + # integration](https://cloud.google.com/dialogflow/docs/integrations/aog) + # for rich response messages. + # See the format definition at [Google Assistant Dialogflow webhook + # format](https://developers.google.com/assistant/actions/build/json/dialogflow- + # webhook-json) + # Corresponds to the JSON property `payload` + # @return [Hash] + attr_accessor :payload + + # Optional. Additional session entity types to replace or extend developer + # entity types with. The entity synonyms apply to all languages and persist + # for the session. Setting this data from a webhook overwrites + # the session entity types that have been set using `detectIntent`, + # `streamingDetectIntent` or SessionEntityType management methods. + # Corresponds to the JSON property `sessionEntityTypes` + # @return [Array] + attr_accessor :session_entity_types + + # Optional. A custom field used to identify the webhook source. + # Arbitrary strings are supported. + # When provided, Dialogflow uses this field to populate + # QueryResult.webhook_source sent to the integration or API caller. + # Corresponds to the JSON property `source` + # @return [String] + attr_accessor :source + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @end_interaction = args[:end_interaction] if args.key?(:end_interaction) + @followup_event_input = args[:followup_event_input] if args.key?(:followup_event_input) + @fulfillment_messages = args[:fulfillment_messages] if args.key?(:fulfillment_messages) + @fulfillment_text = args[:fulfillment_text] if args.key?(:fulfillment_text) + @output_contexts = args[:output_contexts] if args.key?(:output_contexts) + @payload = args[:payload] if args.key?(:payload) + @session_entity_types = args[:session_entity_types] if args.key?(:session_entity_types) + @source = args[:source] if args.key?(:source) + end + end + + # The response message for Agents.ExportAgent. + class GoogleCloudDialogflowV3alpha1ExportAgentResponse + include Google::Apis::Core::Hashable + + # Uncompressed raw byte content for agent. + # Corresponds to the JSON property `agentContent` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :agent_content + + # The URI to a file containing the exported agent. This field is populated + # only if `agent_uri` is specified in ExportAgentRequest. + # Corresponds to the JSON property `agentUri` + # @return [String] + attr_accessor :agent_uri + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @agent_content = args[:agent_content] if args.key?(:agent_content) + @agent_uri = args[:agent_uri] if args.key?(:agent_uri) + end + end + + # The response message for Operations.ListOperations. + class GoogleLongrunningListOperationsResponse + include Google::Apis::Core::Hashable + + # The standard List next-page token. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # A list of operations that matches the specified filter in the request. + # Corresponds to the JSON property `operations` + # @return [Array] + attr_accessor :operations + + 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) + @operations = args[:operations] if args.key?(:operations) + end + end + + # This resource represents a long-running operation that is the result of a + # network API call. + class GoogleLongrunningOperation + include Google::Apis::Core::Hashable + + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # Corresponds to the JSON property `done` + # @return [Boolean] + attr_accessor :done + alias_method :done?, :done + + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # Corresponds to the JSON property `error` + # @return [Google::Apis::DialogflowV3alpha1::GoogleRpcStatus] + attr_accessor :error + + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # Corresponds to the JSON property `metadata` + # @return [Hash] + attr_accessor :metadata + + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/`unique_id``. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The normal response of the operation in case of success. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # Corresponds to the JSON property `response` + # @return [Hash] + attr_accessor :response + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @done = args[:done] if args.key?(:done) + @error = args[:error] if args.key?(:error) + @metadata = args[:metadata] if args.key?(:metadata) + @name = args[:name] if args.key?(:name) + @response = args[:response] if args.key?(:response) + end + end + + # 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 ````. + class GoogleProtobufEmpty + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + class GoogleRpcStatus + include Google::Apis::Core::Hashable + + # The status code, which should be an enum value of google.rpc.Code. + # Corresponds to the JSON property `code` + # @return [Fixnum] + attr_accessor :code + + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + # Corresponds to the JSON property `details` + # @return [Array>] + attr_accessor :details + + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # google.rpc.Status.details field, or localized by the client. + # Corresponds to the JSON property `message` + # @return [String] + attr_accessor :message + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @code = args[:code] if args.key?(:code) + @details = args[:details] if args.key?(:details) + @message = args[:message] if args.key?(:message) + end + end + end + end +end diff --git a/generated/google/apis/dialogflow_v3alpha1/representations.rb b/generated/google/apis/dialogflow_v3alpha1/representations.rb new file mode 100644 index 000000000..0afe6b376 --- /dev/null +++ b/generated/google/apis/dialogflow_v3alpha1/representations.rb @@ -0,0 +1,2057 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'date' +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module DialogflowV3alpha1 + + class GoogleCloudDialogflowV2AnnotatedMessagePart + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2BatchUpdateIntentsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2Context + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2ConversationEvent + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2EntityType + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2EntityTypeEntity + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2EventInput + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2ExportAgentResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2Intent + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2IntentFollowupIntentInfo + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2IntentMessage + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2IntentMessageBasicCard + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2IntentMessageBasicCardButton + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2IntentMessageCard + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2IntentMessageCardButton + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2IntentMessageCarouselSelect + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2IntentMessageCarouselSelectItem + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2IntentMessageColumnProperties + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2IntentMessageImage + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2IntentMessageListSelect + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2IntentMessageListSelectItem + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2IntentMessageMediaContent + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2IntentMessageQuickReplies + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2IntentMessageSelectItemInfo + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2IntentMessageSimpleResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2IntentMessageSimpleResponses + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2IntentMessageSuggestion + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2IntentMessageSuggestions + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2IntentMessageTableCard + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2IntentMessageTableCardCell + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2IntentMessageTableCardRow + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2IntentMessageText + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2IntentParameter + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2IntentTrainingPhrase + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2IntentTrainingPhrasePart + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2Message + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2MessageAnnotation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2OriginalDetectIntentRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2QueryResult + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2Sentiment + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2SentimentAnalysisResult + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2SessionEntityType + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2WebhookRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2WebhookResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1AnnotatedConversationDataset + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1Context + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1EntityType + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1EntityTypeEntity + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1EventInput + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1ExportAgentResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1Intent + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1IntentMessage + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1IntentMessageBasicCard + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItem + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1IntentMessageCard + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1IntentMessageCardButton + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1IntentMessageColumnProperties + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1IntentMessageImage + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1IntentMessageListSelect + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1IntentMessageListSelectItem + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1IntentMessageMediaContent + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObject + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1IntentMessageQuickReplies + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionShareLocation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1IntentMessageRbmText + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1IntentMessageSuggestion + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1IntentMessageSuggestions + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1IntentMessageTableCard + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1IntentMessageTableCardCell + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1IntentMessageTableCardRow + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1IntentMessageText + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1IntentParameter + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1IntentTrainingPhrase + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1KnowledgeAnswers + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1LabelConversationResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1QueryResult + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1Sentiment + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1SentimentAnalysisResult + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1SessionEntityType + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1WebhookRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2beta1WebhookResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV3alpha1ExportAgentResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleLongrunningListOperationsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleLongrunningOperation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleProtobufEmpty + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleRpcStatus + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudDialogflowV2AnnotatedMessagePart + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :entity_type, as: 'entityType' + property :formatted_value, as: 'formattedValue' + property :text, as: 'text' + end + end + + class GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :entity_types, as: 'entityTypes', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2EntityType, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2EntityType::Representation + + end + end + + class GoogleCloudDialogflowV2BatchUpdateIntentsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :intents, as: 'intents', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2Intent, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2Intent::Representation + + end + end + + class GoogleCloudDialogflowV2Context + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :lifespan_count, as: 'lifespanCount' + property :name, as: 'name' + hash :parameters, as: 'parameters' + end + end + + class GoogleCloudDialogflowV2ConversationEvent + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :conversation, as: 'conversation' + property :error_status, as: 'errorStatus', class: Google::Apis::DialogflowV3alpha1::GoogleRpcStatus, decorator: Google::Apis::DialogflowV3alpha1::GoogleRpcStatus::Representation + + property :new_message_payload, as: 'newMessagePayload', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2Message, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2Message::Representation + + property :type, as: 'type' + end + end + + class GoogleCloudDialogflowV2EntityType + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :auto_expansion_mode, as: 'autoExpansionMode' + property :display_name, as: 'displayName' + property :enable_fuzzy_extraction, as: 'enableFuzzyExtraction' + collection :entities, as: 'entities', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2EntityTypeEntity, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2EntityTypeEntity::Representation + + property :kind, as: 'kind' + property :name, as: 'name' + end + end + + class GoogleCloudDialogflowV2EntityTypeEntity + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :synonyms, as: 'synonyms' + property :value, as: 'value' + end + end + + class GoogleCloudDialogflowV2EventInput + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :language_code, as: 'languageCode' + property :name, as: 'name' + hash :parameters, as: 'parameters' + end + end + + class GoogleCloudDialogflowV2ExportAgentResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :agent_content, :base64 => true, as: 'agentContent' + property :agent_uri, as: 'agentUri' + end + end + + class GoogleCloudDialogflowV2Intent + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :action, as: 'action' + collection :default_response_platforms, as: 'defaultResponsePlatforms' + property :display_name, as: 'displayName' + collection :events, as: 'events' + collection :followup_intent_info, as: 'followupIntentInfo', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentFollowupIntentInfo, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentFollowupIntentInfo::Representation + + collection :input_context_names, as: 'inputContextNames' + property :is_fallback, as: 'isFallback' + collection :messages, as: 'messages', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessage, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessage::Representation + + property :ml_disabled, as: 'mlDisabled' + property :name, as: 'name' + collection :output_contexts, as: 'outputContexts', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2Context, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2Context::Representation + + collection :parameters, as: 'parameters', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentParameter, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentParameter::Representation + + property :parent_followup_intent_name, as: 'parentFollowupIntentName' + property :priority, as: 'priority' + property :reset_contexts, as: 'resetContexts' + property :root_followup_intent_name, as: 'rootFollowupIntentName' + collection :training_phrases, as: 'trainingPhrases', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentTrainingPhrase, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentTrainingPhrase::Representation + + property :webhook_state, as: 'webhookState' + end + end + + class GoogleCloudDialogflowV2IntentFollowupIntentInfo + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :followup_intent_name, as: 'followupIntentName' + property :parent_followup_intent_name, as: 'parentFollowupIntentName' + end + end + + class GoogleCloudDialogflowV2IntentMessage + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :basic_card, as: 'basicCard', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageBasicCard, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageBasicCard::Representation + + property :browse_carousel_card, as: 'browseCarouselCard', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard::Representation + + property :card, as: 'card', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageCard, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageCard::Representation + + property :carousel_select, as: 'carouselSelect', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageCarouselSelect, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageCarouselSelect::Representation + + property :image, as: 'image', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageImage, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageImage::Representation + + property :link_out_suggestion, as: 'linkOutSuggestion', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion::Representation + + property :list_select, as: 'listSelect', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageListSelect, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageListSelect::Representation + + property :media_content, as: 'mediaContent', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageMediaContent, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageMediaContent::Representation + + hash :payload, as: 'payload' + property :platform, as: 'platform' + property :quick_replies, as: 'quickReplies', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageQuickReplies, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageQuickReplies::Representation + + property :simple_responses, as: 'simpleResponses', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageSimpleResponses, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageSimpleResponses::Representation + + property :suggestions, as: 'suggestions', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageSuggestions, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageSuggestions::Representation + + property :table_card, as: 'tableCard', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageTableCard, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageTableCard::Representation + + property :text, as: 'text', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageText, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageText::Representation + + end + end + + class GoogleCloudDialogflowV2IntentMessageBasicCard + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :buttons, as: 'buttons', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageBasicCardButton, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageBasicCardButton::Representation + + property :formatted_text, as: 'formattedText' + property :image, as: 'image', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageImage, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageImage::Representation + + property :subtitle, as: 'subtitle' + property :title, as: 'title' + end + end + + class GoogleCloudDialogflowV2IntentMessageBasicCardButton + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :open_uri_action, as: 'openUriAction', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction::Representation + + property :title, as: 'title' + end + end + + class GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :uri, as: 'uri' + end + end + + class GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :image_display_options, as: 'imageDisplayOptions' + collection :items, as: 'items', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem::Representation + + end + end + + class GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :description, as: 'description' + property :footer, as: 'footer' + property :image, as: 'image', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageImage, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageImage::Representation + + property :open_uri_action, as: 'openUriAction', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction::Representation + + property :title, as: 'title' + end + end + + class GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :url, as: 'url' + property :url_type_hint, as: 'urlTypeHint' + end + end + + class GoogleCloudDialogflowV2IntentMessageCard + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :buttons, as: 'buttons', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageCardButton, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageCardButton::Representation + + property :image_uri, as: 'imageUri' + property :subtitle, as: 'subtitle' + property :title, as: 'title' + end + end + + class GoogleCloudDialogflowV2IntentMessageCardButton + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :postback, as: 'postback' + property :text, as: 'text' + end + end + + class GoogleCloudDialogflowV2IntentMessageCarouselSelect + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :items, as: 'items', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageCarouselSelectItem, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageCarouselSelectItem::Representation + + end + end + + class GoogleCloudDialogflowV2IntentMessageCarouselSelectItem + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :description, as: 'description' + property :image, as: 'image', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageImage, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageImage::Representation + + property :info, as: 'info', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageSelectItemInfo, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageSelectItemInfo::Representation + + property :title, as: 'title' + end + end + + class GoogleCloudDialogflowV2IntentMessageColumnProperties + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :header, as: 'header' + property :horizontal_alignment, as: 'horizontalAlignment' + end + end + + class GoogleCloudDialogflowV2IntentMessageImage + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :accessibility_text, as: 'accessibilityText' + property :image_uri, as: 'imageUri' + end + end + + class GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :destination_name, as: 'destinationName' + property :uri, as: 'uri' + end + end + + class GoogleCloudDialogflowV2IntentMessageListSelect + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :items, as: 'items', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageListSelectItem, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageListSelectItem::Representation + + property :subtitle, as: 'subtitle' + property :title, as: 'title' + end + end + + class GoogleCloudDialogflowV2IntentMessageListSelectItem + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :description, as: 'description' + property :image, as: 'image', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageImage, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageImage::Representation + + property :info, as: 'info', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageSelectItemInfo, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageSelectItemInfo::Representation + + property :title, as: 'title' + end + end + + class GoogleCloudDialogflowV2IntentMessageMediaContent + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :media_objects, as: 'mediaObjects', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject::Representation + + property :media_type, as: 'mediaType' + end + end + + class GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :content_url, as: 'contentUrl' + property :description, as: 'description' + property :icon, as: 'icon', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageImage, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageImage::Representation + + property :large_image, as: 'largeImage', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageImage, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageImage::Representation + + property :name, as: 'name' + end + end + + class GoogleCloudDialogflowV2IntentMessageQuickReplies + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :quick_replies, as: 'quickReplies' + property :title, as: 'title' + end + end + + class GoogleCloudDialogflowV2IntentMessageSelectItemInfo + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :key, as: 'key' + collection :synonyms, as: 'synonyms' + end + end + + class GoogleCloudDialogflowV2IntentMessageSimpleResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :display_text, as: 'displayText' + property :ssml, as: 'ssml' + property :text_to_speech, as: 'textToSpeech' + end + end + + class GoogleCloudDialogflowV2IntentMessageSimpleResponses + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :simple_responses, as: 'simpleResponses', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageSimpleResponse, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageSimpleResponse::Representation + + end + end + + class GoogleCloudDialogflowV2IntentMessageSuggestion + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :title, as: 'title' + end + end + + class GoogleCloudDialogflowV2IntentMessageSuggestions + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :suggestions, as: 'suggestions', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageSuggestion, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageSuggestion::Representation + + end + end + + class GoogleCloudDialogflowV2IntentMessageTableCard + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :buttons, as: 'buttons', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageBasicCardButton, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageBasicCardButton::Representation + + collection :column_properties, as: 'columnProperties', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageColumnProperties, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageColumnProperties::Representation + + property :image, as: 'image', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageImage, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageImage::Representation + + collection :rows, as: 'rows', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageTableCardRow, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageTableCardRow::Representation + + property :subtitle, as: 'subtitle' + property :title, as: 'title' + end + end + + class GoogleCloudDialogflowV2IntentMessageTableCardCell + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :text, as: 'text' + end + end + + class GoogleCloudDialogflowV2IntentMessageTableCardRow + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :cells, as: 'cells', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageTableCardCell, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessageTableCardCell::Representation + + property :divider_after, as: 'dividerAfter' + end + end + + class GoogleCloudDialogflowV2IntentMessageText + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :text, as: 'text' + end + end + + class GoogleCloudDialogflowV2IntentParameter + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :default_value, as: 'defaultValue' + property :display_name, as: 'displayName' + property :entity_type_display_name, as: 'entityTypeDisplayName' + property :is_list, as: 'isList' + property :mandatory, as: 'mandatory' + property :name, as: 'name' + collection :prompts, as: 'prompts' + property :value, as: 'value' + end + end + + class GoogleCloudDialogflowV2IntentTrainingPhrase + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :name, as: 'name' + collection :parts, as: 'parts', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentTrainingPhrasePart, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentTrainingPhrasePart::Representation + + property :times_added_count, as: 'timesAddedCount' + property :type, as: 'type' + end + end + + class GoogleCloudDialogflowV2IntentTrainingPhrasePart + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :alias, as: 'alias' + property :entity_type, as: 'entityType' + property :text, as: 'text' + property :user_defined, as: 'userDefined' + end + end + + class GoogleCloudDialogflowV2Message + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :content, as: 'content' + property :create_time, as: 'createTime' + property :language_code, as: 'languageCode' + property :message_annotation, as: 'messageAnnotation', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2MessageAnnotation, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2MessageAnnotation::Representation + + property :name, as: 'name' + property :participant, as: 'participant' + property :participant_role, as: 'participantRole' + end + end + + class GoogleCloudDialogflowV2MessageAnnotation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :contain_entities, as: 'containEntities' + collection :parts, as: 'parts', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2AnnotatedMessagePart, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2AnnotatedMessagePart::Representation + + end + end + + class GoogleCloudDialogflowV2OriginalDetectIntentRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + hash :payload, as: 'payload' + property :source, as: 'source' + property :version, as: 'version' + end + end + + class GoogleCloudDialogflowV2QueryResult + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :action, as: 'action' + property :all_required_params_present, as: 'allRequiredParamsPresent' + hash :diagnostic_info, as: 'diagnosticInfo' + collection :fulfillment_messages, as: 'fulfillmentMessages', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessage, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessage::Representation + + property :fulfillment_text, as: 'fulfillmentText' + property :intent, as: 'intent', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2Intent, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2Intent::Representation + + property :intent_detection_confidence, as: 'intentDetectionConfidence' + property :language_code, as: 'languageCode' + collection :output_contexts, as: 'outputContexts', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2Context, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2Context::Representation + + hash :parameters, as: 'parameters' + property :query_text, as: 'queryText' + property :sentiment_analysis_result, as: 'sentimentAnalysisResult', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2SentimentAnalysisResult, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2SentimentAnalysisResult::Representation + + property :speech_recognition_confidence, as: 'speechRecognitionConfidence' + hash :webhook_payload, as: 'webhookPayload' + property :webhook_source, as: 'webhookSource' + end + end + + class GoogleCloudDialogflowV2Sentiment + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :magnitude, as: 'magnitude' + property :score, as: 'score' + end + end + + class GoogleCloudDialogflowV2SentimentAnalysisResult + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :query_text_sentiment, as: 'queryTextSentiment', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2Sentiment, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2Sentiment::Representation + + end + end + + class GoogleCloudDialogflowV2SessionEntityType + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :entities, as: 'entities', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2EntityTypeEntity, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2EntityTypeEntity::Representation + + property :entity_override_mode, as: 'entityOverrideMode' + property :name, as: 'name' + end + end + + class GoogleCloudDialogflowV2WebhookRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :original_detect_intent_request, as: 'originalDetectIntentRequest', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2OriginalDetectIntentRequest, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2OriginalDetectIntentRequest::Representation + + property :query_result, as: 'queryResult', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2QueryResult, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2QueryResult::Representation + + property :response_id, as: 'responseId' + property :session, as: 'session' + end + end + + class GoogleCloudDialogflowV2WebhookResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :followup_event_input, as: 'followupEventInput', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2EventInput, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2EventInput::Representation + + collection :fulfillment_messages, as: 'fulfillmentMessages', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessage, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2IntentMessage::Representation + + property :fulfillment_text, as: 'fulfillmentText' + collection :output_contexts, as: 'outputContexts', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2Context, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2Context::Representation + + hash :payload, as: 'payload' + collection :session_entity_types, as: 'sessionEntityTypes', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2SessionEntityType, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2SessionEntityType::Representation + + property :source, as: 'source' + end + end + + class GoogleCloudDialogflowV2beta1AnnotatedConversationDataset + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :completed_example_count, :numeric_string => true, as: 'completedExampleCount' + property :create_time, as: 'createTime' + property :description, as: 'description' + property :display_name, as: 'displayName' + property :example_count, :numeric_string => true, as: 'exampleCount' + property :name, as: 'name' + property :question_type_name, as: 'questionTypeName' + end + end + + class GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :entity_types, as: 'entityTypes', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1EntityType, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1EntityType::Representation + + end + end + + class GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :intents, as: 'intents', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1Intent, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1Intent::Representation + + end + end + + class GoogleCloudDialogflowV2beta1Context + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :lifespan_count, as: 'lifespanCount' + property :name, as: 'name' + hash :parameters, as: 'parameters' + end + end + + class GoogleCloudDialogflowV2beta1EntityType + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :auto_expansion_mode, as: 'autoExpansionMode' + property :display_name, as: 'displayName' + property :enable_fuzzy_extraction, as: 'enableFuzzyExtraction' + collection :entities, as: 'entities', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1EntityTypeEntity, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1EntityTypeEntity::Representation + + property :kind, as: 'kind' + property :name, as: 'name' + end + end + + class GoogleCloudDialogflowV2beta1EntityTypeEntity + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :synonyms, as: 'synonyms' + property :value, as: 'value' + end + end + + class GoogleCloudDialogflowV2beta1EventInput + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :language_code, as: 'languageCode' + property :name, as: 'name' + hash :parameters, as: 'parameters' + end + end + + class GoogleCloudDialogflowV2beta1ExportAgentResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :agent_content, :base64 => true, as: 'agentContent' + property :agent_uri, as: 'agentUri' + end + end + + class GoogleCloudDialogflowV2beta1Intent + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :action, as: 'action' + collection :default_response_platforms, as: 'defaultResponsePlatforms' + property :display_name, as: 'displayName' + property :end_interaction, as: 'endInteraction' + collection :events, as: 'events' + collection :followup_intent_info, as: 'followupIntentInfo', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo::Representation + + collection :input_context_names, as: 'inputContextNames' + property :is_fallback, as: 'isFallback' + collection :messages, as: 'messages', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessage, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessage::Representation + + property :ml_disabled, as: 'mlDisabled' + property :ml_enabled, as: 'mlEnabled' + property :name, as: 'name' + collection :output_contexts, as: 'outputContexts', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1Context, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1Context::Representation + + collection :parameters, as: 'parameters', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentParameter, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentParameter::Representation + + property :parent_followup_intent_name, as: 'parentFollowupIntentName' + property :priority, as: 'priority' + property :reset_contexts, as: 'resetContexts' + property :root_followup_intent_name, as: 'rootFollowupIntentName' + collection :training_phrases, as: 'trainingPhrases', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentTrainingPhrase, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentTrainingPhrase::Representation + + property :webhook_state, as: 'webhookState' + end + end + + class GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :followup_intent_name, as: 'followupIntentName' + property :parent_followup_intent_name, as: 'parentFollowupIntentName' + end + end + + class GoogleCloudDialogflowV2beta1IntentMessage + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :basic_card, as: 'basicCard', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageBasicCard, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageBasicCard::Representation + + property :browse_carousel_card, as: 'browseCarouselCard', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard::Representation + + property :card, as: 'card', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageCard, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageCard::Representation + + property :carousel_select, as: 'carouselSelect', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect::Representation + + property :image, as: 'image', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageImage, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageImage::Representation + + property :link_out_suggestion, as: 'linkOutSuggestion', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion::Representation + + property :list_select, as: 'listSelect', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageListSelect, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageListSelect::Representation + + property :media_content, as: 'mediaContent', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageMediaContent, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageMediaContent::Representation + + hash :payload, as: 'payload' + property :platform, as: 'platform' + property :quick_replies, as: 'quickReplies', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageQuickReplies, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageQuickReplies::Representation + + property :rbm_carousel_rich_card, as: 'rbmCarouselRichCard', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard::Representation + + property :rbm_standalone_rich_card, as: 'rbmStandaloneRichCard', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard::Representation + + property :rbm_text, as: 'rbmText', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageRbmText, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageRbmText::Representation + + property :simple_responses, as: 'simpleResponses', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses::Representation + + property :suggestions, as: 'suggestions', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageSuggestions, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageSuggestions::Representation + + property :table_card, as: 'tableCard', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageTableCard, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageTableCard::Representation + + property :telephony_play_audio, as: 'telephonyPlayAudio', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio::Representation + + property :telephony_synthesize_speech, as: 'telephonySynthesizeSpeech', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech::Representation + + property :telephony_transfer_call, as: 'telephonyTransferCall', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall::Representation + + property :text, as: 'text', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageText, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageText::Representation + + end + end + + class GoogleCloudDialogflowV2beta1IntentMessageBasicCard + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :buttons, as: 'buttons', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton::Representation + + property :formatted_text, as: 'formattedText' + property :image, as: 'image', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageImage, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageImage::Representation + + property :subtitle, as: 'subtitle' + property :title, as: 'title' + end + end + + class GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :open_uri_action, as: 'openUriAction', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction::Representation + + property :title, as: 'title' + end + end + + class GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :uri, as: 'uri' + end + end + + class GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :image_display_options, as: 'imageDisplayOptions' + collection :items, as: 'items', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItem, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItem::Representation + + end + end + + class GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItem + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :description, as: 'description' + property :footer, as: 'footer' + property :image, as: 'image', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageImage, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageImage::Representation + + property :open_uri_action, as: 'openUriAction', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction::Representation + + property :title, as: 'title' + end + end + + class GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :url, as: 'url' + property :url_type_hint, as: 'urlTypeHint' + end + end + + class GoogleCloudDialogflowV2beta1IntentMessageCard + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :buttons, as: 'buttons', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageCardButton, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageCardButton::Representation + + property :image_uri, as: 'imageUri' + property :subtitle, as: 'subtitle' + property :title, as: 'title' + end + end + + class GoogleCloudDialogflowV2beta1IntentMessageCardButton + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :postback, as: 'postback' + property :text, as: 'text' + end + end + + class GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :items, as: 'items', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem::Representation + + end + end + + class GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :description, as: 'description' + property :image, as: 'image', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageImage, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageImage::Representation + + property :info, as: 'info', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo::Representation + + property :title, as: 'title' + end + end + + class GoogleCloudDialogflowV2beta1IntentMessageColumnProperties + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :header, as: 'header' + property :horizontal_alignment, as: 'horizontalAlignment' + end + end + + class GoogleCloudDialogflowV2beta1IntentMessageImage + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :accessibility_text, as: 'accessibilityText' + property :image_uri, as: 'imageUri' + end + end + + class GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :destination_name, as: 'destinationName' + property :uri, as: 'uri' + end + end + + class GoogleCloudDialogflowV2beta1IntentMessageListSelect + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :items, as: 'items', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageListSelectItem, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageListSelectItem::Representation + + property :subtitle, as: 'subtitle' + property :title, as: 'title' + end + end + + class GoogleCloudDialogflowV2beta1IntentMessageListSelectItem + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :description, as: 'description' + property :image, as: 'image', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageImage, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageImage::Representation + + property :info, as: 'info', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo::Representation + + property :title, as: 'title' + end + end + + class GoogleCloudDialogflowV2beta1IntentMessageMediaContent + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :media_objects, as: 'mediaObjects', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObject, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObject::Representation + + property :media_type, as: 'mediaType' + end + end + + class GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObject + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :content_url, as: 'contentUrl' + property :description, as: 'description' + property :icon, as: 'icon', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageImage, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageImage::Representation + + property :large_image, as: 'largeImage', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageImage, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageImage::Representation + + property :name, as: 'name' + end + end + + class GoogleCloudDialogflowV2beta1IntentMessageQuickReplies + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :quick_replies, as: 'quickReplies' + property :title, as: 'title' + end + end + + class GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :description, as: 'description' + property :media, as: 'media', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia::Representation + + collection :suggestions, as: 'suggestions', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion::Representation + + property :title, as: 'title' + end + end + + class GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :file_uri, as: 'fileUri' + property :height, as: 'height' + property :thumbnail_uri, as: 'thumbnailUri' + end + end + + class GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :card_contents, as: 'cardContents', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent::Representation + + property :card_width, as: 'cardWidth' + end + end + + class GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :card_content, as: 'cardContent', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent::Representation + + property :card_orientation, as: 'cardOrientation' + property :thumbnail_image_alignment, as: 'thumbnailImageAlignment' + end + end + + class GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :dial, as: 'dial', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial::Representation + + property :open_url, as: 'openUrl', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri::Representation + + property :postback_data, as: 'postbackData' + property :share_location, as: 'shareLocation', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionShareLocation, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionShareLocation::Representation + + property :text, as: 'text' + end + end + + class GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :phone_number, as: 'phoneNumber' + end + end + + class GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :uri, as: 'uri' + end + end + + class GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionShareLocation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :postback_data, as: 'postbackData' + property :text, as: 'text' + end + end + + class GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :action, as: 'action', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction::Representation + + property :reply, as: 'reply', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply::Representation + + end + end + + class GoogleCloudDialogflowV2beta1IntentMessageRbmText + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :rbm_suggestion, as: 'rbmSuggestion', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion::Representation + + property :text, as: 'text' + end + end + + class GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :key, as: 'key' + collection :synonyms, as: 'synonyms' + end + end + + class GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :display_text, as: 'displayText' + property :ssml, as: 'ssml' + property :text_to_speech, as: 'textToSpeech' + end + end + + class GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :simple_responses, as: 'simpleResponses', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse::Representation + + end + end + + class GoogleCloudDialogflowV2beta1IntentMessageSuggestion + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :title, as: 'title' + end + end + + class GoogleCloudDialogflowV2beta1IntentMessageSuggestions + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :suggestions, as: 'suggestions', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageSuggestion, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageSuggestion::Representation + + end + end + + class GoogleCloudDialogflowV2beta1IntentMessageTableCard + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :buttons, as: 'buttons', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton::Representation + + collection :column_properties, as: 'columnProperties', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageColumnProperties, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageColumnProperties::Representation + + property :image, as: 'image', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageImage, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageImage::Representation + + collection :rows, as: 'rows', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageTableCardRow, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageTableCardRow::Representation + + property :subtitle, as: 'subtitle' + property :title, as: 'title' + end + end + + class GoogleCloudDialogflowV2beta1IntentMessageTableCardCell + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :text, as: 'text' + end + end + + class GoogleCloudDialogflowV2beta1IntentMessageTableCardRow + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :cells, as: 'cells', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageTableCardCell, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessageTableCardCell::Representation + + property :divider_after, as: 'dividerAfter' + end + end + + class GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :audio_uri, as: 'audioUri' + end + end + + class GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :ssml, as: 'ssml' + property :text, as: 'text' + end + end + + class GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :phone_number, as: 'phoneNumber' + end + end + + class GoogleCloudDialogflowV2beta1IntentMessageText + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :text, as: 'text' + end + end + + class GoogleCloudDialogflowV2beta1IntentParameter + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :default_value, as: 'defaultValue' + property :display_name, as: 'displayName' + property :entity_type_display_name, as: 'entityTypeDisplayName' + property :is_list, as: 'isList' + property :mandatory, as: 'mandatory' + property :name, as: 'name' + collection :prompts, as: 'prompts' + property :value, as: 'value' + end + end + + class GoogleCloudDialogflowV2beta1IntentTrainingPhrase + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :name, as: 'name' + collection :parts, as: 'parts', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart::Representation + + property :times_added_count, as: 'timesAddedCount' + property :type, as: 'type' + end + end + + class GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :alias, as: 'alias' + property :entity_type, as: 'entityType' + property :text, as: 'text' + property :user_defined, as: 'userDefined' + end + end + + class GoogleCloudDialogflowV2beta1KnowledgeAnswers + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :answers, as: 'answers', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer::Representation + + end + end + + class GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :answer, as: 'answer' + property :faq_question, as: 'faqQuestion' + property :match_confidence, as: 'matchConfidence' + property :match_confidence_level, as: 'matchConfidenceLevel' + property :source, as: 'source' + end + end + + class GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :state, as: 'state' + end + end + + class GoogleCloudDialogflowV2beta1LabelConversationResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :annotated_conversation_dataset, as: 'annotatedConversationDataset', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1AnnotatedConversationDataset, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1AnnotatedConversationDataset::Representation + + end + end + + class GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + hash :payload, as: 'payload' + property :source, as: 'source' + property :version, as: 'version' + end + end + + class GoogleCloudDialogflowV2beta1QueryResult + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :action, as: 'action' + property :all_required_params_present, as: 'allRequiredParamsPresent' + hash :diagnostic_info, as: 'diagnosticInfo' + collection :fulfillment_messages, as: 'fulfillmentMessages', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessage, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessage::Representation + + property :fulfillment_text, as: 'fulfillmentText' + property :intent, as: 'intent', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1Intent, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1Intent::Representation + + property :intent_detection_confidence, as: 'intentDetectionConfidence' + property :knowledge_answers, as: 'knowledgeAnswers', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1KnowledgeAnswers, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1KnowledgeAnswers::Representation + + property :language_code, as: 'languageCode' + collection :output_contexts, as: 'outputContexts', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1Context, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1Context::Representation + + hash :parameters, as: 'parameters' + property :query_text, as: 'queryText' + property :sentiment_analysis_result, as: 'sentimentAnalysisResult', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1SentimentAnalysisResult, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1SentimentAnalysisResult::Representation + + property :speech_recognition_confidence, as: 'speechRecognitionConfidence' + hash :webhook_payload, as: 'webhookPayload' + property :webhook_source, as: 'webhookSource' + end + end + + class GoogleCloudDialogflowV2beta1Sentiment + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :magnitude, as: 'magnitude' + property :score, as: 'score' + end + end + + class GoogleCloudDialogflowV2beta1SentimentAnalysisResult + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :query_text_sentiment, as: 'queryTextSentiment', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1Sentiment, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1Sentiment::Representation + + end + end + + class GoogleCloudDialogflowV2beta1SessionEntityType + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :entities, as: 'entities', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1EntityTypeEntity, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1EntityTypeEntity::Representation + + property :entity_override_mode, as: 'entityOverrideMode' + property :name, as: 'name' + end + end + + class GoogleCloudDialogflowV2beta1WebhookRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :alternative_query_results, as: 'alternativeQueryResults', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1QueryResult, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1QueryResult::Representation + + property :original_detect_intent_request, as: 'originalDetectIntentRequest', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest::Representation + + property :query_result, as: 'queryResult', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1QueryResult, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1QueryResult::Representation + + property :response_id, as: 'responseId' + property :session, as: 'session' + end + end + + class GoogleCloudDialogflowV2beta1WebhookResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :end_interaction, as: 'endInteraction' + property :followup_event_input, as: 'followupEventInput', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1EventInput, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1EventInput::Representation + + collection :fulfillment_messages, as: 'fulfillmentMessages', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessage, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1IntentMessage::Representation + + property :fulfillment_text, as: 'fulfillmentText' + collection :output_contexts, as: 'outputContexts', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1Context, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1Context::Representation + + hash :payload, as: 'payload' + collection :session_entity_types, as: 'sessionEntityTypes', class: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1SessionEntityType, decorator: Google::Apis::DialogflowV3alpha1::GoogleCloudDialogflowV2beta1SessionEntityType::Representation + + property :source, as: 'source' + end + end + + class GoogleCloudDialogflowV3alpha1ExportAgentResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :agent_content, :base64 => true, as: 'agentContent' + property :agent_uri, as: 'agentUri' + end + end + + class GoogleLongrunningListOperationsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :operations, as: 'operations', class: Google::Apis::DialogflowV3alpha1::GoogleLongrunningOperation, decorator: Google::Apis::DialogflowV3alpha1::GoogleLongrunningOperation::Representation + + end + end + + class GoogleLongrunningOperation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :done, as: 'done' + property :error, as: 'error', class: Google::Apis::DialogflowV3alpha1::GoogleRpcStatus, decorator: Google::Apis::DialogflowV3alpha1::GoogleRpcStatus::Representation + + hash :metadata, as: 'metadata' + property :name, as: 'name' + hash :response, as: 'response' + end + end + + class GoogleProtobufEmpty + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class GoogleRpcStatus + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :code, as: 'code' + collection :details, as: 'details' + property :message, as: 'message' + end + end + end + end +end diff --git a/generated/google/apis/dialogflow_v3alpha1/service.rb b/generated/google/apis/dialogflow_v3alpha1/service.rb new file mode 100644 index 000000000..29e306a56 --- /dev/null +++ b/generated/google/apis/dialogflow_v3alpha1/service.rb @@ -0,0 +1,296 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module DialogflowV3alpha1 + # Dialogflow API + # + # Builds conversational interfaces (for example, chatbots, and voice-powered + # apps and devices). + # + # @example + # require 'google/apis/dialogflow_v3alpha1' + # + # Dialogflow = Google::Apis::DialogflowV3alpha1 # Alias the module + # service = Dialogflow::DialogflowService.new + # + # @see https://cloud.google.com/dialogflow/ + class DialogflowService < Google::Apis::Core::BaseService + # @return [String] + # API key. Your API key identifies your project and provides you with API access, + # quota, and reports. Required unless you provide an OAuth 2.0 token. + attr_accessor :key + + # @return [String] + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + attr_accessor :quota_user + + def initialize + super('https://dialogflow.googleapis.com/', '') + @batch_path = 'batch' + end + + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an Operation.error value with a google.rpc.Status.code of 1, + # corresponding to `Code.CANCELLED`. + # @param [String] name + # The name of the operation resource to be cancelled. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::DialogflowV3alpha1::GoogleProtobufEmpty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DialogflowV3alpha1::GoogleProtobufEmpty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def cancel_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v3alpha1/{+name}:cancel', options) + command.response_representation = Google::Apis::DialogflowV3alpha1::GoogleProtobufEmpty::Representation + command.response_class = Google::Apis::DialogflowV3alpha1::GoogleProtobufEmpty + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # @param [String] name + # The name of the operation resource. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::DialogflowV3alpha1::GoogleLongrunningOperation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DialogflowV3alpha1::GoogleLongrunningOperation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v3alpha1/{+name}', options) + command.response_representation = Google::Apis::DialogflowV3alpha1::GoogleLongrunningOperation::Representation + command.response_class = Google::Apis::DialogflowV3alpha1::GoogleLongrunningOperation + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # NOTE: the `name` binding allows API services to override the binding + # to use different resource name schemes, such as `users/*/operations`. To + # override the binding, API services can add a binding such as + # `"/v1/`name=users/*`/operations"` to their service configuration. + # For backwards compatibility, the default name includes the operations + # collection id, however overriding users must ensure the name binding + # is the parent resource, without the operations collection id. + # @param [String] name + # The name of the operation's parent resource. + # @param [String] filter + # The standard list filter. + # @param [Fixnum] page_size + # The standard list page size. + # @param [String] page_token + # The standard list page token. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::DialogflowV3alpha1::GoogleLongrunningListOperationsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DialogflowV3alpha1::GoogleLongrunningListOperationsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v3alpha1/{+name}/operations', options) + command.response_representation = Google::Apis::DialogflowV3alpha1::GoogleLongrunningListOperationsResponse::Representation + command.response_class = Google::Apis::DialogflowV3alpha1::GoogleLongrunningListOperationsResponse + command.params['name'] = name unless name.nil? + command.query['filter'] = filter unless filter.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an Operation.error value with a google.rpc.Status.code of 1, + # corresponding to `Code.CANCELLED`. + # @param [String] name + # The name of the operation resource to be cancelled. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::DialogflowV3alpha1::GoogleProtobufEmpty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DialogflowV3alpha1::GoogleProtobufEmpty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def cancel_project_operation(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v3alpha1/{+name}:cancel', options) + command.response_representation = Google::Apis::DialogflowV3alpha1::GoogleProtobufEmpty::Representation + command.response_class = Google::Apis::DialogflowV3alpha1::GoogleProtobufEmpty + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # @param [String] name + # The name of the operation resource. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::DialogflowV3alpha1::GoogleLongrunningOperation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DialogflowV3alpha1::GoogleLongrunningOperation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_operation(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v3alpha1/{+name}', options) + command.response_representation = Google::Apis::DialogflowV3alpha1::GoogleLongrunningOperation::Representation + command.response_class = Google::Apis::DialogflowV3alpha1::GoogleLongrunningOperation + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # NOTE: the `name` binding allows API services to override the binding + # to use different resource name schemes, such as `users/*/operations`. To + # override the binding, API services can add a binding such as + # `"/v1/`name=users/*`/operations"` to their service configuration. + # For backwards compatibility, the default name includes the operations + # collection id, however overriding users must ensure the name binding + # is the parent resource, without the operations collection id. + # @param [String] name + # The name of the operation's parent resource. + # @param [String] filter + # The standard list filter. + # @param [Fixnum] page_size + # The standard list page size. + # @param [String] page_token + # The standard list page token. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::DialogflowV3alpha1::GoogleLongrunningListOperationsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DialogflowV3alpha1::GoogleLongrunningListOperationsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v3alpha1/{+name}/operations', options) + command.response_representation = Google::Apis::DialogflowV3alpha1::GoogleLongrunningListOperationsResponse::Representation + command.response_class = Google::Apis::DialogflowV3alpha1::GoogleLongrunningListOperationsResponse + command.params['name'] = name unless name.nil? + command.query['filter'] = filter unless filter.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + protected + + def apply_command_defaults(command) + command.query['key'] = key unless key.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + end + end + end + end +end diff --git a/generated/google/apis/pagespeedonline_v1.rb b/generated/google/apis/firebaseml_v1.rb similarity index 57% rename from generated/google/apis/pagespeedonline_v1.rb rename to generated/google/apis/firebaseml_v1.rb index f4e347692..f93f7fe71 100644 --- a/generated/google/apis/pagespeedonline_v1.rb +++ b/generated/google/apis/firebaseml_v1.rb @@ -12,21 +12,23 @@ # See the License for the specific language governing permissions and # limitations under the License. -require 'google/apis/pagespeedonline_v1/service.rb' -require 'google/apis/pagespeedonline_v1/classes.rb' -require 'google/apis/pagespeedonline_v1/representations.rb' +require 'google/apis/firebaseml_v1/service.rb' +require 'google/apis/firebaseml_v1/classes.rb' +require 'google/apis/firebaseml_v1/representations.rb' module Google module Apis - # PageSpeed Insights API + # Firebase ML API # - # Analyzes the performance of a web page and provides tailored suggestions to - # make that page faster. + # Access custom machine learning models hosted via Firebase ML. # - # @see https://developers.google.com/speed/docs/insights/v1/getting_started - module PagespeedonlineV1 + # @see https://firebase.google.com + module FirebasemlV1 VERSION = 'V1' - REVISION = '20180606' + REVISION = '20200519' + + # View and manage your data across Google Cloud Platform services + AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' end end end diff --git a/generated/google/apis/firebaseml_v1/classes.rb b/generated/google/apis/firebaseml_v1/classes.rb new file mode 100644 index 000000000..34dea06a9 --- /dev/null +++ b/generated/google/apis/firebaseml_v1/classes.rb @@ -0,0 +1,213 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'date' +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module FirebasemlV1 + + # The request message for Operations.CancelOperation. + class CancelOperationRequest + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # 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 ````. + class Empty + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # The response message for Operations.ListOperations. + class ListOperationsResponse + include Google::Apis::Core::Hashable + + # The standard List next-page token. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # A list of operations that matches the specified filter in the request. + # Corresponds to the JSON property `operations` + # @return [Array] + attr_accessor :operations + + 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) + @operations = args[:operations] if args.key?(:operations) + end + end + + # This is returned in the longrunning operations + # for create/update. + class ModelOperationMetadata + include Google::Apis::Core::Hashable + + # + # Corresponds to the JSON property `basicOperationStatus` + # @return [String] + attr_accessor :basic_operation_status + + # The name of the model we are creating/updating + # The name must have the form `projects/`project_id`/models/`model_id`` + # 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) + @basic_operation_status = args[:basic_operation_status] if args.key?(:basic_operation_status) + @name = args[:name] if args.key?(:name) + end + end + + # This resource represents a long-running operation that is the result of a + # network API call. + class Operation + include Google::Apis::Core::Hashable + + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # Corresponds to the JSON property `done` + # @return [Boolean] + attr_accessor :done + alias_method :done?, :done + + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # Corresponds to the JSON property `error` + # @return [Google::Apis::FirebasemlV1::Status] + attr_accessor :error + + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # Corresponds to the JSON property `metadata` + # @return [Hash] + attr_accessor :metadata + + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/`unique_id``. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The normal response of the operation in case of success. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # Corresponds to the JSON property `response` + # @return [Hash] + attr_accessor :response + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @done = args[:done] if args.key?(:done) + @error = args[:error] if args.key?(:error) + @metadata = args[:metadata] if args.key?(:metadata) + @name = args[:name] if args.key?(:name) + @response = args[:response] if args.key?(:response) + end + end + + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + class Status + include Google::Apis::Core::Hashable + + # The status code, which should be an enum value of google.rpc.Code. + # Corresponds to the JSON property `code` + # @return [Fixnum] + attr_accessor :code + + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + # Corresponds to the JSON property `details` + # @return [Array>] + attr_accessor :details + + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # google.rpc.Status.details field, or localized by the client. + # Corresponds to the JSON property `message` + # @return [String] + attr_accessor :message + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @code = args[:code] if args.key?(:code) + @details = args[:details] if args.key?(:details) + @message = args[:message] if args.key?(:message) + end + end + end + end +end diff --git a/generated/google/apis/firebaseml_v1/representations.rb b/generated/google/apis/firebaseml_v1/representations.rb new file mode 100644 index 000000000..3caa1b18a --- /dev/null +++ b/generated/google/apis/firebaseml_v1/representations.rb @@ -0,0 +1,112 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'date' +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module FirebasemlV1 + + class CancelOperationRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Empty + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListOperationsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ModelOperationMetadata + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Operation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Status + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CancelOperationRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class Empty + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class ListOperationsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :operations, as: 'operations', class: Google::Apis::FirebasemlV1::Operation, decorator: Google::Apis::FirebasemlV1::Operation::Representation + + end + end + + class ModelOperationMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :basic_operation_status, as: 'basicOperationStatus' + property :name, as: 'name' + end + end + + class Operation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :done, as: 'done' + property :error, as: 'error', class: Google::Apis::FirebasemlV1::Status, decorator: Google::Apis::FirebasemlV1::Status::Representation + + hash :metadata, as: 'metadata' + property :name, as: 'name' + hash :response, as: 'response' + end + end + + class Status + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :code, as: 'code' + collection :details, as: 'details' + property :message, as: 'message' + end + end + end + end +end diff --git a/generated/google/apis/firebaseml_v1/service.rb b/generated/google/apis/firebaseml_v1/service.rb new file mode 100644 index 000000000..ea5037eb7 --- /dev/null +++ b/generated/google/apis/firebaseml_v1/service.rb @@ -0,0 +1,181 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module FirebasemlV1 + # Firebase ML API + # + # Access custom machine learning models hosted via Firebase ML. + # + # @example + # require 'google/apis/firebaseml_v1' + # + # Firebaseml = Google::Apis::FirebasemlV1 # Alias the module + # service = Firebaseml::FirebaseMLService.new + # + # @see https://firebase.google.com + class FirebaseMLService < Google::Apis::Core::BaseService + # @return [String] + # API key. Your API key identifies your project and provides you with API access, + # quota, and reports. Required unless you provide an OAuth 2.0 token. + attr_accessor :key + + # @return [String] + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + attr_accessor :quota_user + + def initialize + super('https://firebaseml.googleapis.com/', '') + @batch_path = 'batch' + end + + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an Operation.error value with a google.rpc.Status.code of 1, + # corresponding to `Code.CANCELLED`. + # @param [String] name + # The name of the operation resource to be cancelled. + # @param [Google::Apis::FirebasemlV1::CancelOperationRequest] cancel_operation_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::FirebasemlV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::FirebasemlV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+name}:cancel', options) + command.request_representation = Google::Apis::FirebasemlV1::CancelOperationRequest::Representation + command.request_object = cancel_operation_request_object + command.response_representation = Google::Apis::FirebasemlV1::Empty::Representation + command.response_class = Google::Apis::FirebasemlV1::Empty + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # @param [String] name + # The name of the operation resource to be deleted. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::FirebasemlV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::FirebasemlV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_operation(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/{+name}', options) + command.response_representation = Google::Apis::FirebasemlV1::Empty::Representation + command.response_class = Google::Apis::FirebasemlV1::Empty + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # NOTE: the `name` binding allows API services to override the binding + # to use different resource name schemes, such as `users/*/operations`. To + # override the binding, API services can add a binding such as + # `"/v1/`name=users/*`/operations"` to their service configuration. + # For backwards compatibility, the default name includes the operations + # collection id, however overriding users must ensure the name binding + # is the parent resource, without the operations collection id. + # @param [String] name + # The name of the operation's parent resource. + # @param [String] filter + # The standard list filter. + # @param [Fixnum] page_size + # The standard list page size. + # @param [String] page_token + # The standard list page token. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::FirebasemlV1::ListOperationsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::FirebasemlV1::ListOperationsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}', options) + command.response_representation = Google::Apis::FirebasemlV1::ListOperationsResponse::Representation + command.response_class = Google::Apis::FirebasemlV1::ListOperationsResponse + command.params['name'] = name unless name.nil? + command.query['filter'] = filter unless filter.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + protected + + def apply_command_defaults(command) + command.query['key'] = key unless key.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + end + end + end + end +end diff --git a/generated/google/apis/iamcredentials_v1.rb b/generated/google/apis/iamcredentials_v1.rb index ac938cd32..31e78bbdc 100644 --- a/generated/google/apis/iamcredentials_v1.rb +++ b/generated/google/apis/iamcredentials_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/iam/docs/creating-short-lived-service-account-credentials module IamcredentialsV1 VERSION = 'V1' - REVISION = '20200417' + REVISION = '20200515' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/iamcredentials_v1/classes.rb b/generated/google/apis/iamcredentials_v1/classes.rb index e9dc6e3fa..ffb99e3c7 100644 --- a/generated/google/apis/iamcredentials_v1/classes.rb +++ b/generated/google/apis/iamcredentials_v1/classes.rb @@ -194,12 +194,24 @@ module Google class SignBlobResponse include Google::Apis::Core::Hashable - # The ID of the key used to sign the blob. + # The ID of the key used to sign the blob. The key used for signing will + # remain valid for at least 12 hours after the blob is signed. To verify the + # signature, you can retrieve the public key in several formats from the + # following endpoints: + # - RSA public key wrapped in an X.509 v3 certificate: + # `https://www.googleapis.com/service_accounts/v1/metadata/x509/`ACCOUNT_EMAIL`` + # - Raw key in JSON format: + # `https://www.googleapis.com/service_accounts/v1/metadata/raw/`ACCOUNT_EMAIL`` + # - JSON Web Key (JWK): + # `https://www.googleapis.com/service_accounts/v1/metadata/jwk/`ACCOUNT_EMAIL`` # Corresponds to the JSON property `keyId` # @return [String] attr_accessor :key_id # The signature for the blob. Does not include the original blob. + # After the key pair referenced by the `key_id` response field expires, + # Google no longer exposes the public key that can be used to verify the + # blob. As a result, the receiver can no longer verify the signature. # Corresponds to the JSON property `signedBlob` # NOTE: Values are automatically base64 encoded/decoded in the client library. # @return [String] @@ -257,7 +269,16 @@ module Google class SignJwtResponse include Google::Apis::Core::Hashable - # The ID of the key used to sign the JWT. + # The ID of the key used to sign the JWT. The key used for signing will + # remain valid for at least 12 hours after the JWT is signed. To verify the + # signature, you can retrieve the public key in several formats from the + # following endpoints: + # - RSA public key wrapped in an X.509 v3 certificate: + # `https://www.googleapis.com/service_accounts/v1/metadata/x509/`ACCOUNT_EMAIL`` + # - Raw key in JSON format: + # `https://www.googleapis.com/service_accounts/v1/metadata/raw/`ACCOUNT_EMAIL`` + # - JSON Web Key (JWK): + # `https://www.googleapis.com/service_accounts/v1/metadata/jwk/`ACCOUNT_EMAIL`` # Corresponds to the JSON property `keyId` # @return [String] attr_accessor :key_id @@ -265,6 +286,9 @@ module Google # The signed JWT. Contains the automatically generated header; the # client-supplied payload; and the signature, which is generated using the # key referenced by the `kid` field in the header. + # After the key pair referenced by the `key_id` response field expires, + # Google no longer exposes the public key that can be used to verify the JWT. + # As a result, the receiver can no longer verify the signature. # Corresponds to the JSON property `signedJwt` # @return [String] attr_accessor :signed_jwt diff --git a/generated/google/apis/networkmanagement_v1.rb b/generated/google/apis/networkmanagement_v1.rb new file mode 100644 index 000000000..ffc81bd3a --- /dev/null +++ b/generated/google/apis/networkmanagement_v1.rb @@ -0,0 +1,35 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'google/apis/networkmanagement_v1/service.rb' +require 'google/apis/networkmanagement_v1/classes.rb' +require 'google/apis/networkmanagement_v1/representations.rb' + +module Google + module Apis + # Network Management API + # + # The Network Management API provides a collection of network performance + # monitoring and diagnostic capabilities. + # + # @see https://cloud.google.com/ + module NetworkmanagementV1 + VERSION = 'V1' + REVISION = '20200505' + + # View and manage your data across Google Cloud Platform services + AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' + end + end +end diff --git a/generated/google/apis/networkmanagement_v1/classes.rb b/generated/google/apis/networkmanagement_v1/classes.rb new file mode 100644 index 000000000..3df4db82d --- /dev/null +++ b/generated/google/apis/networkmanagement_v1/classes.rb @@ -0,0 +1,1868 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'date' +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module NetworkmanagementV1 + + # Details of the final state "abort" and associated resource. + class AbortInfo + include Google::Apis::Core::Hashable + + # Causes that the analysis is aborted. + # Corresponds to the JSON property `cause` + # @return [String] + attr_accessor :cause + + # URI of the resource that caused the abort. + # Corresponds to the JSON property `resourceUri` + # @return [String] + attr_accessor :resource_uri + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @cause = args[:cause] if args.key?(:cause) + @resource_uri = args[:resource_uri] if args.key?(:resource_uri) + end + end + + # Specifies the audit configuration for a service. + # The configuration determines which permission types are logged, and what + # identities, if any, are exempted from logging. + # An AuditConfig must have one or more AuditLogConfigs. + # If there are AuditConfigs for both `allServices` and a specific service, + # the union of the two AuditConfigs is used for that service: the log_types + # specified in each AuditConfig are enabled, and the exempted_members in each + # AuditLogConfig are exempted. + # Example Policy with multiple AuditConfigs: + # ` + # "audit_configs": [ + # ` + # "service": "allServices" + # "audit_log_configs": [ + # ` + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # `, + # ` + # "log_type": "DATA_WRITE", + # `, + # ` + # "log_type": "ADMIN_READ", + # ` + # ] + # `, + # ` + # "service": "sampleservice.googleapis.com" + # "audit_log_configs": [ + # ` + # "log_type": "DATA_READ", + # `, + # ` + # "log_type": "DATA_WRITE", + # "exempted_members": [ + # "user:aliya@example.com" + # ] + # ` + # ] + # ` + # ] + # ` + # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ + # logging. It also exempts jose@example.com from DATA_READ logging, and + # aliya@example.com from DATA_WRITE logging. + class AuditConfig + include Google::Apis::Core::Hashable + + # The configuration for logging of each type of permission. + # Corresponds to the JSON property `auditLogConfigs` + # @return [Array] + attr_accessor :audit_log_configs + + # Specifies a service that will be enabled for audit logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # Corresponds to the JSON property `service` + # @return [String] + attr_accessor :service + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @audit_log_configs = args[:audit_log_configs] if args.key?(:audit_log_configs) + @service = args[:service] if args.key?(:service) + end + end + + # Provides the configuration for logging a type of permissions. + # Example: + # ` + # "audit_log_configs": [ + # ` + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # `, + # ` + # "log_type": "DATA_WRITE", + # ` + # ] + # ` + # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting + # jose@example.com from DATA_READ logging. + class AuditLogConfig + include Google::Apis::Core::Hashable + + # Specifies the identities that do not cause logging for this type of + # permission. + # Follows the same format of Binding.members. + # Corresponds to the JSON property `exemptedMembers` + # @return [Array] + attr_accessor :exempted_members + + # The log type that this config enables. + # Corresponds to the JSON property `logType` + # @return [String] + attr_accessor :log_type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @exempted_members = args[:exempted_members] if args.key?(:exempted_members) + @log_type = args[:log_type] if args.key?(:log_type) + end + end + + # Associates `members` with a `role`. + class Binding + include Google::Apis::Core::Hashable + + # Represents a textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # Example (Comparison): + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # Example (Equality): + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # Example (Logic): + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # Example (Data Manipulation): + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + # Corresponds to the JSON property `condition` + # @return [Google::Apis::NetworkmanagementV1::Expr] + attr_accessor :condition + + # Specifies the identities requesting access for a Cloud Platform resource. + # `members` can have the following values: + # * `allUsers`: A special identifier that represents anyone who is + # on the internet; with or without a Google account. + # * `allAuthenticatedUsers`: A special identifier that represents anyone + # who is authenticated with a Google account or a service account. + # * `user:`emailid``: An email address that represents a specific Google + # account. For example, `alice@example.com` . + # * `serviceAccount:`emailid``: An email address that represents a service + # account. For example, `my-other-app@appspot.gserviceaccount.com`. + # * `group:`emailid``: An email address that represents a Google group. + # For example, `admins@example.com`. + # * `deleted:user:`emailid`?uid=`uniqueid``: An email address (plus unique + # identifier) representing a user that has been recently deleted. For + # example, `alice@example.com?uid=123456789012345678901`. If the user is + # recovered, this value reverts to `user:`emailid`` and the recovered user + # retains the role in the binding. + # * `deleted:serviceAccount:`emailid`?uid=`uniqueid``: An email address (plus + # unique identifier) representing a service account that has been recently + # deleted. For example, + # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. + # If the service account is undeleted, this value reverts to + # `serviceAccount:`emailid`` and the undeleted service account retains the + # role in the binding. + # * `deleted:group:`emailid`?uid=`uniqueid``: An email address (plus unique + # identifier) representing a Google group that has been recently + # deleted. For example, `admins@example.com?uid=123456789012345678901`. If + # the group is recovered, this value reverts to `group:`emailid`` and the + # recovered group retains the role in the binding. + # * `domain:`domain``: The G Suite domain (primary) that represents all the + # users of that domain. For example, `google.com` or `example.com`. + # Corresponds to the JSON property `members` + # @return [Array] + attr_accessor :members + + # Role that is assigned to `members`. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # Corresponds to the JSON property `role` + # @return [String] + attr_accessor :role + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @condition = args[:condition] if args.key?(:condition) + @members = args[:members] if args.key?(:members) + @role = args[:role] if args.key?(:role) + end + end + + # The request message for Operations.CancelOperation. + class CancelOperationRequest + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # A Connectivity Test for a network reachability analysis. + class ConnectivityTest + include Google::Apis::Core::Hashable + + # Output only. The time the test was created. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # The user-supplied description of the Connectivity Test. + # Maximum of 512 characters. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # Source or destination of the Connectivity Test. + # Corresponds to the JSON property `destination` + # @return [Google::Apis::NetworkmanagementV1::Endpoint] + attr_accessor :destination + + # Output only. The display name of a Connectivity Test. + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # Resource labels to represent user-provided metadata. + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # Required. Unique name of the resource using the form: + # `projects/`project_id`/locations/global/connectivityTests/`test_id`` + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # IP Protocol of the test. When not provided, "TCP" is assumed. + # Corresponds to the JSON property `protocol` + # @return [String] + attr_accessor :protocol + + # The details of reachability state from the latest run. + # Corresponds to the JSON property `reachabilityDetails` + # @return [Google::Apis::NetworkmanagementV1::ReachabilityDetails] + attr_accessor :reachability_details + + # Other projects that may be relevant for reachability analysis. + # This is applicable to scenarios where a test can cross project boundaries. + # Corresponds to the JSON property `relatedProjects` + # @return [Array] + attr_accessor :related_projects + + # Source or destination of the Connectivity Test. + # Corresponds to the JSON property `source` + # @return [Google::Apis::NetworkmanagementV1::Endpoint] + attr_accessor :source + + # Output only. The time the test's configuration was updated. + # Corresponds to the JSON property `updateTime` + # @return [String] + attr_accessor :update_time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @create_time = args[:create_time] if args.key?(:create_time) + @description = args[:description] if args.key?(:description) + @destination = args[:destination] if args.key?(:destination) + @display_name = args[:display_name] if args.key?(:display_name) + @labels = args[:labels] if args.key?(:labels) + @name = args[:name] if args.key?(:name) + @protocol = args[:protocol] if args.key?(:protocol) + @reachability_details = args[:reachability_details] if args.key?(:reachability_details) + @related_projects = args[:related_projects] if args.key?(:related_projects) + @source = args[:source] if args.key?(:source) + @update_time = args[:update_time] if args.key?(:update_time) + end + end + + # Details of the final state "deliver" and associated resource. + class DeliverInfo + include Google::Apis::Core::Hashable + + # URI of the resource that the packet is delivered to. + # Corresponds to the JSON property `resourceUri` + # @return [String] + attr_accessor :resource_uri + + # Target type where the packet is delivered to. + # Corresponds to the JSON property `target` + # @return [String] + attr_accessor :target + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @resource_uri = args[:resource_uri] if args.key?(:resource_uri) + @target = args[:target] if args.key?(:target) + end + end + + # Details of the final state "drop" and associated resource. + class DropInfo + include Google::Apis::Core::Hashable + + # Cause that the packet is dropped. + # Corresponds to the JSON property `cause` + # @return [String] + attr_accessor :cause + + # URI of the resource that caused the drop. + # Corresponds to the JSON property `resourceUri` + # @return [String] + attr_accessor :resource_uri + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @cause = args[:cause] if args.key?(:cause) + @resource_uri = args[:resource_uri] if args.key?(:resource_uri) + end + end + + # 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 ````. + class Empty + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Source or destination of the Connectivity Test. + class Endpoint + include Google::Apis::Core::Hashable + + # A Compute Engine instance URI. + # Corresponds to the JSON property `instance` + # @return [String] + attr_accessor :instance + + # The IP address of the endpoint, which can be an external or internal IP. + # An IPv6 address is only allowed when the test's destination is a + # [global load balancer VIP](/load-balancing/docs/load-balancing-overview). + # Corresponds to the JSON property `ipAddress` + # @return [String] + attr_accessor :ip_address + + # A Compute Engine network URI. + # Corresponds to the JSON property `network` + # @return [String] + attr_accessor :network + + # Type of the network where the endpoint is located. + # Applicable only to source endpoint, as destination network type can be + # inferred from the source. + # Corresponds to the JSON property `networkType` + # @return [String] + attr_accessor :network_type + + # The IP protocol port of the endpoint. + # Only applicable when protocol is TCP or UDP. + # Corresponds to the JSON property `port` + # @return [Fixnum] + attr_accessor :port + + # Project ID where the endpoint is located. + # The Project ID can be derived from the URI if you provide a VM instance or + # network URI. + # The following are two cases where you must provide the project ID: + # 1. Only the IP address is specified, and the IP address is within a GCP + # project. + # 2. When you are using Shared VPC and the IP address that you provide is + # from the service project. In this case, the network that the IP address + # resides in is defined in the host project. + # Corresponds to the JSON property `projectId` + # @return [String] + attr_accessor :project_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @instance = args[:instance] if args.key?(:instance) + @ip_address = args[:ip_address] if args.key?(:ip_address) + @network = args[:network] if args.key?(:network) + @network_type = args[:network_type] if args.key?(:network_type) + @port = args[:port] if args.key?(:port) + @project_id = args[:project_id] if args.key?(:project_id) + end + end + + # For display only. The specification of the endpoints for the test. + # EndpointInfo is derived from source and destination Endpoint and validated + # by the backend data plane model. + class EndpointInfo + include Google::Apis::Core::Hashable + + # Destination IP address. + # Corresponds to the JSON property `destinationIp` + # @return [String] + attr_accessor :destination_ip + + # URI of the network where this packet is sent to. + # Corresponds to the JSON property `destinationNetworkUri` + # @return [String] + attr_accessor :destination_network_uri + + # Destination port. Only valid when protocol is TCP or UDP. + # Corresponds to the JSON property `destinationPort` + # @return [Fixnum] + attr_accessor :destination_port + + # IP protocol in string format, for example: "TCP", "UDP", "ICMP". + # Corresponds to the JSON property `protocol` + # @return [String] + attr_accessor :protocol + + # Source IP address. + # Corresponds to the JSON property `sourceIp` + # @return [String] + attr_accessor :source_ip + + # URI of the network where this packet originates from. + # Corresponds to the JSON property `sourceNetworkUri` + # @return [String] + attr_accessor :source_network_uri + + # Source port. Only valid when protocol is TCP or UDP. + # Corresponds to the JSON property `sourcePort` + # @return [Fixnum] + attr_accessor :source_port + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @destination_ip = args[:destination_ip] if args.key?(:destination_ip) + @destination_network_uri = args[:destination_network_uri] if args.key?(:destination_network_uri) + @destination_port = args[:destination_port] if args.key?(:destination_port) + @protocol = args[:protocol] if args.key?(:protocol) + @source_ip = args[:source_ip] if args.key?(:source_ip) + @source_network_uri = args[:source_network_uri] if args.key?(:source_network_uri) + @source_port = args[:source_port] if args.key?(:source_port) + end + end + + # Represents a textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # Example (Comparison): + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # Example (Equality): + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # Example (Logic): + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # Example (Data Manipulation): + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + class Expr + include Google::Apis::Core::Hashable + + # Optional. Description of the expression. This is a longer text which + # describes the expression, e.g. when hovered over it in a UI. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # Textual representation of an expression in Common Expression Language + # syntax. + # Corresponds to the JSON property `expression` + # @return [String] + attr_accessor :expression + + # Optional. String indicating the location of the expression for error + # reporting, e.g. a file name and a position in the file. + # Corresponds to the JSON property `location` + # @return [String] + attr_accessor :location + + # Optional. Title for the expression, i.e. a short string describing + # its purpose. This can be used e.g. in UIs which allow to enter the + # expression. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @description = args[:description] if args.key?(:description) + @expression = args[:expression] if args.key?(:expression) + @location = args[:location] if args.key?(:location) + @title = args[:title] if args.key?(:title) + end + end + + # For display only. Metadata associated with a Compute Engine firewall rule. + class FirewallInfo + include Google::Apis::Core::Hashable + + # Possible values: ALLOW, DENY + # Corresponds to the JSON property `action` + # @return [String] + attr_accessor :action + + # Possible values: INGRESS, EGRESS + # Corresponds to the JSON property `direction` + # @return [String] + attr_accessor :direction + + # Name of a Compute Engine firewall rule. + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # URI of a Compute Engine network. + # Corresponds to the JSON property `networkUri` + # @return [String] + attr_accessor :network_uri + + # Priority of the firewall rule. + # Corresponds to the JSON property `priority` + # @return [Fixnum] + attr_accessor :priority + + # Target service accounts of the firewall rule. + # Corresponds to the JSON property `targetServiceAccounts` + # @return [Array] + attr_accessor :target_service_accounts + + # Target tags of the firewall rule. + # Corresponds to the JSON property `targetTags` + # @return [Array] + attr_accessor :target_tags + + # URI of a Compute Engine firewall rule. + # Implied default rule does not have URI. + # Corresponds to the JSON property `uri` + # @return [String] + attr_accessor :uri + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @action = args[:action] if args.key?(:action) + @direction = args[:direction] if args.key?(:direction) + @display_name = args[:display_name] if args.key?(:display_name) + @network_uri = args[:network_uri] if args.key?(:network_uri) + @priority = args[:priority] if args.key?(:priority) + @target_service_accounts = args[:target_service_accounts] if args.key?(:target_service_accounts) + @target_tags = args[:target_tags] if args.key?(:target_tags) + @uri = args[:uri] if args.key?(:uri) + end + end + + # Details of the final state "forward" and associated resource. + class ForwardInfo + include Google::Apis::Core::Hashable + + # URI of the resource that the packet is forwarded to. + # Corresponds to the JSON property `resourceUri` + # @return [String] + attr_accessor :resource_uri + + # Target type where this packet is forwarded to. + # Corresponds to the JSON property `target` + # @return [String] + attr_accessor :target + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @resource_uri = args[:resource_uri] if args.key?(:resource_uri) + @target = args[:target] if args.key?(:target) + end + end + + # For display only. Metadata associated with a Compute Engine forwarding rule. + class ForwardingRuleInfo + include Google::Apis::Core::Hashable + + # Name of a Compute Engine forwarding rule. + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # Port range defined in the forwarding rule that matches the test. + # Corresponds to the JSON property `matchedPortRange` + # @return [String] + attr_accessor :matched_port_range + + # Protocol defined in the forwarding rule that matches the test. + # Corresponds to the JSON property `matchedProtocol` + # @return [String] + attr_accessor :matched_protocol + + # Network URI. Only valid for Internal Load Balancer. + # Corresponds to the JSON property `networkUri` + # @return [String] + attr_accessor :network_uri + + # Target type of the forwarding rule. + # Corresponds to the JSON property `target` + # @return [String] + attr_accessor :target + + # URI of a Compute Engine forwarding rule. + # Corresponds to the JSON property `uri` + # @return [String] + attr_accessor :uri + + # VIP of the forwarding rule. + # Corresponds to the JSON property `vip` + # @return [String] + attr_accessor :vip + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @display_name = args[:display_name] if args.key?(:display_name) + @matched_port_range = args[:matched_port_range] if args.key?(:matched_port_range) + @matched_protocol = args[:matched_protocol] if args.key?(:matched_protocol) + @network_uri = args[:network_uri] if args.key?(:network_uri) + @target = args[:target] if args.key?(:target) + @uri = args[:uri] if args.key?(:uri) + @vip = args[:vip] if args.key?(:vip) + end + end + + # For display only. Metadata associated with a Compute Engine instance. + class InstanceInfo + include Google::Apis::Core::Hashable + + # Name of a Compute Engine instance. + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # External IP address of the network interface. + # Corresponds to the JSON property `externalIp` + # @return [String] + attr_accessor :external_ip + + # Name of the network interface of a Compute Engine instance. + # Corresponds to the JSON property `interface` + # @return [String] + attr_accessor :interface + + # Internal IP address of the network interface. + # Corresponds to the JSON property `internalIp` + # @return [String] + attr_accessor :internal_ip + + # Network tags configured on the instance. + # Corresponds to the JSON property `networkTags` + # @return [Array] + attr_accessor :network_tags + + # URI of a Compute Engine network. + # Corresponds to the JSON property `networkUri` + # @return [String] + attr_accessor :network_uri + + # Service account authorized for the instance. + # Corresponds to the JSON property `serviceAccount` + # @return [String] + attr_accessor :service_account + + # URI of a Compute Engine instance. + # Corresponds to the JSON property `uri` + # @return [String] + attr_accessor :uri + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @display_name = args[:display_name] if args.key?(:display_name) + @external_ip = args[:external_ip] if args.key?(:external_ip) + @interface = args[:interface] if args.key?(:interface) + @internal_ip = args[:internal_ip] if args.key?(:internal_ip) + @network_tags = args[:network_tags] if args.key?(:network_tags) + @network_uri = args[:network_uri] if args.key?(:network_uri) + @service_account = args[:service_account] if args.key?(:service_account) + @uri = args[:uri] if args.key?(:uri) + end + end + + # Response for the `ListConnectivityTests` method. + class ListConnectivityTestsResponse + include Google::Apis::Core::Hashable + + # Page token to fetch the next set of Connectivity Tests. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # List of Connectivity Tests. + # Corresponds to the JSON property `resources` + # @return [Array] + attr_accessor :resources + + # Locations that could not be reached (when querying all locations with `-`). + # Corresponds to the JSON property `unreachable` + # @return [Array] + attr_accessor :unreachable + + 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) + @resources = args[:resources] if args.key?(:resources) + @unreachable = args[:unreachable] if args.key?(:unreachable) + end + end + + # The response message for Locations.ListLocations. + class ListLocationsResponse + include Google::Apis::Core::Hashable + + # A list of locations that matches the specified filter in the request. + # Corresponds to the JSON property `locations` + # @return [Array] + attr_accessor :locations + + # The standard List next-page token. + # 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) + @locations = args[:locations] if args.key?(:locations) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # The response message for Operations.ListOperations. + class ListOperationsResponse + include Google::Apis::Core::Hashable + + # The standard List next-page token. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # A list of operations that matches the specified filter in the request. + # Corresponds to the JSON property `operations` + # @return [Array] + attr_accessor :operations + + 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) + @operations = args[:operations] if args.key?(:operations) + end + end + + # For display only. Metadata associated with a specific load balancer backend. + class LoadBalancerBackend + include Google::Apis::Core::Hashable + + # Name of a Compute Engine instance or network endpoint. + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # A list of firewall rule URIs allowing probes from health check IP ranges. + # Corresponds to the JSON property `healthCheckAllowingFirewallRules` + # @return [Array] + attr_accessor :health_check_allowing_firewall_rules + + # A list of firewall rule URIs blocking probes from health check IP ranges. + # Corresponds to the JSON property `healthCheckBlockingFirewallRules` + # @return [Array] + attr_accessor :health_check_blocking_firewall_rules + + # State of the health check firewall configuration. + # Corresponds to the JSON property `healthCheckFirewallState` + # @return [String] + attr_accessor :health_check_firewall_state + + # URI of a Compute Engine instance or network endpoint. + # Corresponds to the JSON property `uri` + # @return [String] + attr_accessor :uri + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @display_name = args[:display_name] if args.key?(:display_name) + @health_check_allowing_firewall_rules = args[:health_check_allowing_firewall_rules] if args.key?(:health_check_allowing_firewall_rules) + @health_check_blocking_firewall_rules = args[:health_check_blocking_firewall_rules] if args.key?(:health_check_blocking_firewall_rules) + @health_check_firewall_state = args[:health_check_firewall_state] if args.key?(:health_check_firewall_state) + @uri = args[:uri] if args.key?(:uri) + end + end + + # For display only. Metadata associated with a load balancer. + class LoadBalancerInfo + include Google::Apis::Core::Hashable + + # Type of load balancer's backend configuration. + # Corresponds to the JSON property `backendType` + # @return [String] + attr_accessor :backend_type + + # Backend configuration URI. + # Corresponds to the JSON property `backendUri` + # @return [String] + attr_accessor :backend_uri + + # Information for the loadbalancer backends. + # Corresponds to the JSON property `backends` + # @return [Array] + attr_accessor :backends + + # URI of the health check for the load balancer. + # Corresponds to the JSON property `healthCheckUri` + # @return [String] + attr_accessor :health_check_uri + + # Type of the load balancer. + # Corresponds to the JSON property `loadBalancerType` + # @return [String] + attr_accessor :load_balancer_type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @backend_type = args[:backend_type] if args.key?(:backend_type) + @backend_uri = args[:backend_uri] if args.key?(:backend_uri) + @backends = args[:backends] if args.key?(:backends) + @health_check_uri = args[:health_check_uri] if args.key?(:health_check_uri) + @load_balancer_type = args[:load_balancer_type] if args.key?(:load_balancer_type) + end + end + + # A resource that represents Google Cloud Platform location. + class Location + include Google::Apis::Core::Hashable + + # The friendly name for this location, typically a nearby city name. + # For example, "Tokyo". + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # Cross-service attributes for the location. For example + # `"cloud.googleapis.com/region": "us-east1"` + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # The canonical id for this location. For example: `"us-east1"`. + # Corresponds to the JSON property `locationId` + # @return [String] + attr_accessor :location_id + + # Service-specific metadata. For example the available capacity at the given + # location. + # Corresponds to the JSON property `metadata` + # @return [Hash] + attr_accessor :metadata + + # Resource name for the location, which may vary between implementations. + # For example: `"projects/example-project/locations/us-east1"` + # 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) + @display_name = args[:display_name] if args.key?(:display_name) + @labels = args[:labels] if args.key?(:labels) + @location_id = args[:location_id] if args.key?(:location_id) + @metadata = args[:metadata] if args.key?(:metadata) + @name = args[:name] if args.key?(:name) + end + end + + # For display only. Metadata associated with a Compute Engine network. + class NetworkInfo + include Google::Apis::Core::Hashable + + # Name of a Compute Engine network. + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # The IP range that matches the test. + # Corresponds to the JSON property `matchedIpRange` + # @return [String] + attr_accessor :matched_ip_range + + # URI of a Compute Engine network. + # Corresponds to the JSON property `uri` + # @return [String] + attr_accessor :uri + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @display_name = args[:display_name] if args.key?(:display_name) + @matched_ip_range = args[:matched_ip_range] if args.key?(:matched_ip_range) + @uri = args[:uri] if args.key?(:uri) + end + end + + # This resource represents a long-running operation that is the result of a + # network API call. + class Operation + include Google::Apis::Core::Hashable + + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # Corresponds to the JSON property `done` + # @return [Boolean] + attr_accessor :done + alias_method :done?, :done + + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # Corresponds to the JSON property `error` + # @return [Google::Apis::NetworkmanagementV1::Status] + attr_accessor :error + + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # Corresponds to the JSON property `metadata` + # @return [Hash] + attr_accessor :metadata + + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/`unique_id``. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The normal response of the operation in case of success. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # Corresponds to the JSON property `response` + # @return [Hash] + attr_accessor :response + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @done = args[:done] if args.key?(:done) + @error = args[:error] if args.key?(:error) + @metadata = args[:metadata] if args.key?(:metadata) + @name = args[:name] if args.key?(:name) + @response = args[:response] if args.key?(:response) + end + end + + # Metadata describing an Operation + class OperationMetadata + include Google::Apis::Core::Hashable + + # API version. + # Corresponds to the JSON property `apiVersion` + # @return [String] + attr_accessor :api_version + + # Specifies if cancellation was requested for the operation. + # Corresponds to the JSON property `cancelRequested` + # @return [Boolean] + attr_accessor :cancel_requested + alias_method :cancel_requested?, :cancel_requested + + # The time the operation was created. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # The time the operation finished running. + # Corresponds to the JSON property `endTime` + # @return [String] + attr_accessor :end_time + + # Human-readable status of the operation, if any. + # Corresponds to the JSON property `statusDetail` + # @return [String] + attr_accessor :status_detail + + # Target of the operation - for example + # projects/project-1/locations/global/connectivityTests/test-1 + # Corresponds to the JSON property `target` + # @return [String] + attr_accessor :target + + # Name of the verb executed by the operation. + # Corresponds to the JSON property `verb` + # @return [String] + attr_accessor :verb + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @api_version = args[:api_version] if args.key?(:api_version) + @cancel_requested = args[:cancel_requested] if args.key?(:cancel_requested) + @create_time = args[:create_time] if args.key?(:create_time) + @end_time = args[:end_time] if args.key?(:end_time) + @status_detail = args[:status_detail] if args.key?(:status_detail) + @target = args[:target] if args.key?(:target) + @verb = args[:verb] if args.key?(:verb) + end + end + + # An Identity and Access Management (IAM) policy, which specifies access + # controls for Google Cloud resources. + # A `Policy` is a collection of `bindings`. A `binding` binds one or more + # `members` to a single `role`. Members can be user accounts, service accounts, + # Google groups, and domains (such as G Suite). A `role` is a named list of + # permissions; each `role` can be an IAM predefined role or a user-created + # custom role. + # For some types of Google Cloud resources, a `binding` can also specify a + # `condition`, which is a logical expression that allows access to a resource + # only if the expression evaluates to `true`. A condition can add constraints + # based on attributes of the request, the resource, or both. To learn which + # resources support conditions in their IAM policies, see the + # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource- + # policies). + # **JSON example:** + # ` + # "bindings": [ + # ` + # "role": "roles/resourcemanager.organizationAdmin", + # "members": [ + # "user:mike@example.com", + # "group:admins@example.com", + # "domain:google.com", + # "serviceAccount:my-project-id@appspot.gserviceaccount.com" + # ] + # `, + # ` + # "role": "roles/resourcemanager.organizationViewer", + # "members": [ + # "user:eve@example.com" + # ], + # "condition": ` + # "title": "expirable access", + # "description": "Does not grant access after Sep 2020", + # "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z') + # ", + # ` + # ` + # ], + # "etag": "BwWWja0YfJA=", + # "version": 3 + # ` + # **YAML example:** + # bindings: + # - members: + # - user:mike@example.com + # - group:admins@example.com + # - domain:google.com + # - serviceAccount:my-project-id@appspot.gserviceaccount.com + # role: roles/resourcemanager.organizationAdmin + # - members: + # - user:eve@example.com + # role: roles/resourcemanager.organizationViewer + # condition: + # title: expirable access + # description: Does not grant access after Sep 2020 + # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + # - etag: BwWWja0YfJA= + # - version: 3 + # For a description of IAM and its features, see the + # [IAM documentation](https://cloud.google.com/iam/docs/). + class Policy + include Google::Apis::Core::Hashable + + # Specifies cloud audit logging configuration for this policy. + # Corresponds to the JSON property `auditConfigs` + # @return [Array] + attr_accessor :audit_configs + + # Associates a list of `members` to a `role`. Optionally, may specify a + # `condition` that determines how and when the `bindings` are applied. Each + # of the `bindings` must contain at least one member. + # Corresponds to the JSON property `bindings` + # @return [Array] + attr_accessor :bindings + + # `etag` is used for optimistic concurrency control as a way to help + # prevent simultaneous updates of a policy from overwriting each other. + # It is strongly suggested that systems make use of the `etag` in the + # read-modify-write cycle to perform policy updates in order to avoid race + # conditions: An `etag` is returned in the response to `getIamPolicy`, and + # systems are expected to put that etag in the request to `setIamPolicy` to + # ensure that their change will be applied to the same version of the policy. + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + # Corresponds to the JSON property `etag` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :etag + + # Specifies the format of the policy. + # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value + # are rejected. + # Any operation that affects conditional role bindings must specify version + # `3`. This requirement applies to the following operations: + # * Getting a policy that includes a conditional role binding + # * Adding a conditional role binding to a policy + # * Changing a conditional role binding in a policy + # * Removing any role binding, with or without a condition, from a policy + # that includes conditions + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + # If a policy does not include any conditions, operations on that policy may + # specify any valid version or leave the field unset. + # To learn which resources support conditions in their IAM policies, see the + # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource- + # policies). + # Corresponds to the JSON property `version` + # @return [Fixnum] + attr_accessor :version + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @audit_configs = args[:audit_configs] if args.key?(:audit_configs) + @bindings = args[:bindings] if args.key?(:bindings) + @etag = args[:etag] if args.key?(:etag) + @version = args[:version] if args.key?(:version) + end + end + + # The details of reachability state from the latest run. + class ReachabilityDetails + include Google::Apis::Core::Hashable + + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # Corresponds to the JSON property `error` + # @return [Google::Apis::NetworkmanagementV1::Status] + attr_accessor :error + + # The overall reachability result of the test. + # Corresponds to the JSON property `result` + # @return [String] + attr_accessor :result + + # Result may contain a list of traces if a test has multiple possible + # paths in the network, such as when destination endpoint is a load balancer + # with multiple backends. + # Corresponds to the JSON property `traces` + # @return [Array] + attr_accessor :traces + + # The time the reachability state was verified. + # Corresponds to the JSON property `verifyTime` + # @return [String] + attr_accessor :verify_time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @error = args[:error] if args.key?(:error) + @result = args[:result] if args.key?(:result) + @traces = args[:traces] if args.key?(:traces) + @verify_time = args[:verify_time] if args.key?(:verify_time) + end + end + + # Request for the `RerunConnectivityTest` method. + class RerunConnectivityTestRequest + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # For display only. Metadata associated with a Compute Engine route. + class RouteInfo + include Google::Apis::Core::Hashable + + # Destination IP range of the route. + # Corresponds to the JSON property `destIpRange` + # @return [String] + attr_accessor :dest_ip_range + + # Name of a Compute Engine route. + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # Instance tags of the route. + # Corresponds to the JSON property `instanceTags` + # @return [Array] + attr_accessor :instance_tags + + # URI of a Compute Engine network. + # Corresponds to the JSON property `networkUri` + # @return [String] + attr_accessor :network_uri + + # Next hop of the route. + # Corresponds to the JSON property `nextHop` + # @return [String] + attr_accessor :next_hop + + # Type of next hop. + # Corresponds to the JSON property `nextHopType` + # @return [String] + attr_accessor :next_hop_type + + # Priority of the route. + # Corresponds to the JSON property `priority` + # @return [Fixnum] + attr_accessor :priority + + # Type of route. + # Corresponds to the JSON property `routeType` + # @return [String] + attr_accessor :route_type + + # URI of a Compute Engine route. + # Dynamic route from cloud router does not have a URI. + # Advertised route from Google Cloud VPC to on-premises network also does + # not have a URI. + # Corresponds to the JSON property `uri` + # @return [String] + attr_accessor :uri + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @dest_ip_range = args[:dest_ip_range] if args.key?(:dest_ip_range) + @display_name = args[:display_name] if args.key?(:display_name) + @instance_tags = args[:instance_tags] if args.key?(:instance_tags) + @network_uri = args[:network_uri] if args.key?(:network_uri) + @next_hop = args[:next_hop] if args.key?(:next_hop) + @next_hop_type = args[:next_hop_type] if args.key?(:next_hop_type) + @priority = args[:priority] if args.key?(:priority) + @route_type = args[:route_type] if args.key?(:route_type) + @uri = args[:uri] if args.key?(:uri) + end + end + + # Request message for `SetIamPolicy` method. + class SetIamPolicyRequest + include Google::Apis::Core::Hashable + + # An Identity and Access Management (IAM) policy, which specifies access + # controls for Google Cloud resources. + # A `Policy` is a collection of `bindings`. A `binding` binds one or more + # `members` to a single `role`. Members can be user accounts, service accounts, + # Google groups, and domains (such as G Suite). A `role` is a named list of + # permissions; each `role` can be an IAM predefined role or a user-created + # custom role. + # For some types of Google Cloud resources, a `binding` can also specify a + # `condition`, which is a logical expression that allows access to a resource + # only if the expression evaluates to `true`. A condition can add constraints + # based on attributes of the request, the resource, or both. To learn which + # resources support conditions in their IAM policies, see the + # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource- + # policies). + # **JSON example:** + # ` + # "bindings": [ + # ` + # "role": "roles/resourcemanager.organizationAdmin", + # "members": [ + # "user:mike@example.com", + # "group:admins@example.com", + # "domain:google.com", + # "serviceAccount:my-project-id@appspot.gserviceaccount.com" + # ] + # `, + # ` + # "role": "roles/resourcemanager.organizationViewer", + # "members": [ + # "user:eve@example.com" + # ], + # "condition": ` + # "title": "expirable access", + # "description": "Does not grant access after Sep 2020", + # "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z') + # ", + # ` + # ` + # ], + # "etag": "BwWWja0YfJA=", + # "version": 3 + # ` + # **YAML example:** + # bindings: + # - members: + # - user:mike@example.com + # - group:admins@example.com + # - domain:google.com + # - serviceAccount:my-project-id@appspot.gserviceaccount.com + # role: roles/resourcemanager.organizationAdmin + # - members: + # - user:eve@example.com + # role: roles/resourcemanager.organizationViewer + # condition: + # title: expirable access + # description: Does not grant access after Sep 2020 + # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + # - etag: BwWWja0YfJA= + # - version: 3 + # For a description of IAM and its features, see the + # [IAM documentation](https://cloud.google.com/iam/docs/). + # Corresponds to the JSON property `policy` + # @return [Google::Apis::NetworkmanagementV1::Policy] + attr_accessor :policy + + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # `paths: "bindings, etag"` + # Corresponds to the JSON property `updateMask` + # @return [String] + attr_accessor :update_mask + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @policy = args[:policy] if args.key?(:policy) + @update_mask = args[:update_mask] if args.key?(:update_mask) + end + end + + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + class Status + include Google::Apis::Core::Hashable + + # The status code, which should be an enum value of google.rpc.Code. + # Corresponds to the JSON property `code` + # @return [Fixnum] + attr_accessor :code + + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + # Corresponds to the JSON property `details` + # @return [Array>] + attr_accessor :details + + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # google.rpc.Status.details field, or localized by the client. + # Corresponds to the JSON property `message` + # @return [String] + attr_accessor :message + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @code = args[:code] if args.key?(:code) + @details = args[:details] if args.key?(:details) + @message = args[:message] if args.key?(:message) + end + end + + # A simulated forwarding path is composed of multiple steps. + # Each step has a well-defined state and an associated configuration. + class Step + include Google::Apis::Core::Hashable + + # Details of the final state "abort" and associated resource. + # Corresponds to the JSON property `abort` + # @return [Google::Apis::NetworkmanagementV1::AbortInfo] + attr_accessor :abort + + # This is a step that leads to the final state Drop. + # Corresponds to the JSON property `causesDrop` + # @return [Boolean] + attr_accessor :causes_drop + alias_method :causes_drop?, :causes_drop + + # Details of the final state "deliver" and associated resource. + # Corresponds to the JSON property `deliver` + # @return [Google::Apis::NetworkmanagementV1::DeliverInfo] + attr_accessor :deliver + + # A description of the step. Usually this is a summary of the state. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # Details of the final state "drop" and associated resource. + # Corresponds to the JSON property `drop` + # @return [Google::Apis::NetworkmanagementV1::DropInfo] + attr_accessor :drop + + # For display only. The specification of the endpoints for the test. + # EndpointInfo is derived from source and destination Endpoint and validated + # by the backend data plane model. + # Corresponds to the JSON property `endpoint` + # @return [Google::Apis::NetworkmanagementV1::EndpointInfo] + attr_accessor :endpoint + + # For display only. Metadata associated with a Compute Engine firewall rule. + # Corresponds to the JSON property `firewall` + # @return [Google::Apis::NetworkmanagementV1::FirewallInfo] + attr_accessor :firewall + + # Details of the final state "forward" and associated resource. + # Corresponds to the JSON property `forward` + # @return [Google::Apis::NetworkmanagementV1::ForwardInfo] + attr_accessor :forward + + # For display only. Metadata associated with a Compute Engine forwarding rule. + # Corresponds to the JSON property `forwardingRule` + # @return [Google::Apis::NetworkmanagementV1::ForwardingRuleInfo] + attr_accessor :forwarding_rule + + # For display only. Metadata associated with a Compute Engine instance. + # Corresponds to the JSON property `instance` + # @return [Google::Apis::NetworkmanagementV1::InstanceInfo] + attr_accessor :instance + + # For display only. Metadata associated with a load balancer. + # Corresponds to the JSON property `loadBalancer` + # @return [Google::Apis::NetworkmanagementV1::LoadBalancerInfo] + attr_accessor :load_balancer + + # For display only. Metadata associated with a Compute Engine network. + # Corresponds to the JSON property `network` + # @return [Google::Apis::NetworkmanagementV1::NetworkInfo] + attr_accessor :network + + # Project ID that contains the configuration this step is validating. + # Corresponds to the JSON property `projectId` + # @return [String] + attr_accessor :project_id + + # For display only. Metadata associated with a Compute Engine route. + # Corresponds to the JSON property `route` + # @return [Google::Apis::NetworkmanagementV1::RouteInfo] + attr_accessor :route + + # Each step is in one of the pre-defined states. + # Corresponds to the JSON property `state` + # @return [String] + attr_accessor :state + + # For display only. Metadata associated with a Compute Engine VPN gateway. + # Corresponds to the JSON property `vpnGateway` + # @return [Google::Apis::NetworkmanagementV1::VpnGatewayInfo] + attr_accessor :vpn_gateway + + # For display only. Metadata associated with a Compute Engine VPN tunnel. + # Corresponds to the JSON property `vpnTunnel` + # @return [Google::Apis::NetworkmanagementV1::VpnTunnelInfo] + attr_accessor :vpn_tunnel + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @abort = args[:abort] if args.key?(:abort) + @causes_drop = args[:causes_drop] if args.key?(:causes_drop) + @deliver = args[:deliver] if args.key?(:deliver) + @description = args[:description] if args.key?(:description) + @drop = args[:drop] if args.key?(:drop) + @endpoint = args[:endpoint] if args.key?(:endpoint) + @firewall = args[:firewall] if args.key?(:firewall) + @forward = args[:forward] if args.key?(:forward) + @forwarding_rule = args[:forwarding_rule] if args.key?(:forwarding_rule) + @instance = args[:instance] if args.key?(:instance) + @load_balancer = args[:load_balancer] if args.key?(:load_balancer) + @network = args[:network] if args.key?(:network) + @project_id = args[:project_id] if args.key?(:project_id) + @route = args[:route] if args.key?(:route) + @state = args[:state] if args.key?(:state) + @vpn_gateway = args[:vpn_gateway] if args.key?(:vpn_gateway) + @vpn_tunnel = args[:vpn_tunnel] if args.key?(:vpn_tunnel) + end + end + + # Request message for `TestIamPermissions` method. + class TestIamPermissionsRequest + include Google::Apis::Core::Hashable + + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # Corresponds to the JSON property `permissions` + # @return [Array] + attr_accessor :permissions + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @permissions = args[:permissions] if args.key?(:permissions) + end + end + + # Response message for `TestIamPermissions` method. + class TestIamPermissionsResponse + include Google::Apis::Core::Hashable + + # A subset of `TestPermissionsRequest.permissions` that the caller is + # allowed. + # Corresponds to the JSON property `permissions` + # @return [Array] + attr_accessor :permissions + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @permissions = args[:permissions] if args.key?(:permissions) + end + end + + # Trace represents one simulated packet forwarding path. + #
    + #
  • Each trace contains multiple ordered steps.
  • + #
  • Each step is in a particular state and has an associated + # configuration.
  • State is categorized as a final or non-final + # state.
  • Each final state has a reason associated with it.
  • + #
  • Each trace must end with a final state (the last step).
  • + #
+ #

+      # |---------------------Trace----------------------|
+      # Step1(State) Step2(State) ---  StepN(State(final))
+      # 
+ class Trace + include Google::Apis::Core::Hashable + + # For display only. The specification of the endpoints for the test. + # EndpointInfo is derived from source and destination Endpoint and validated + # by the backend data plane model. + # Corresponds to the JSON property `endpointInfo` + # @return [Google::Apis::NetworkmanagementV1::EndpointInfo] + attr_accessor :endpoint_info + + # A trace of a test contains multiple steps from the initial state to the + # final state (delivered, dropped, forwarded, or aborted). + # The steps are ordered by the processing sequence within the simulated + # network state machine. It is critical to preserve the order of the steps + # and avoid reordering or sorting them. + # Corresponds to the JSON property `steps` + # @return [Array] + attr_accessor :steps + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @endpoint_info = args[:endpoint_info] if args.key?(:endpoint_info) + @steps = args[:steps] if args.key?(:steps) + end + end + + # For display only. Metadata associated with a Compute Engine VPN gateway. + class VpnGatewayInfo + include Google::Apis::Core::Hashable + + # Name of a VPN gateway. + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # IP address of the VPN gateway. + # Corresponds to the JSON property `ipAddress` + # @return [String] + attr_accessor :ip_address + + # URI of a Compute Engine network where the VPN gateway is configured. + # Corresponds to the JSON property `networkUri` + # @return [String] + attr_accessor :network_uri + + # Name of a GCP region where this VPN gateway is configured. + # Corresponds to the JSON property `region` + # @return [String] + attr_accessor :region + + # URI of a VPN gateway. + # Corresponds to the JSON property `uri` + # @return [String] + attr_accessor :uri + + # A VPN tunnel that is associated with this VPN gateway. + # There may be multiple VPN tunnels configured on a VPN gateway, and only + # the one relevant to the test is displayed. + # Corresponds to the JSON property `vpnTunnelUri` + # @return [String] + attr_accessor :vpn_tunnel_uri + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @display_name = args[:display_name] if args.key?(:display_name) + @ip_address = args[:ip_address] if args.key?(:ip_address) + @network_uri = args[:network_uri] if args.key?(:network_uri) + @region = args[:region] if args.key?(:region) + @uri = args[:uri] if args.key?(:uri) + @vpn_tunnel_uri = args[:vpn_tunnel_uri] if args.key?(:vpn_tunnel_uri) + end + end + + # For display only. Metadata associated with a Compute Engine VPN tunnel. + class VpnTunnelInfo + include Google::Apis::Core::Hashable + + # Name of a VPN tunnel. + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # URI of a Compute Engine network where the VPN tunnel is configured. + # Corresponds to the JSON property `networkUri` + # @return [String] + attr_accessor :network_uri + + # Name of a GCP region where this VPN tunnel is configured. + # Corresponds to the JSON property `region` + # @return [String] + attr_accessor :region + + # URI of a VPN gateway at remote end of the tunnel. + # Corresponds to the JSON property `remoteGateway` + # @return [String] + attr_accessor :remote_gateway + + # Remote VPN gateway's IP address. + # Corresponds to the JSON property `remoteGatewayIp` + # @return [String] + attr_accessor :remote_gateway_ip + + # Type of the routing policy. + # Corresponds to the JSON property `routingType` + # @return [String] + attr_accessor :routing_type + + # URI of the VPN gateway at local end of the tunnel. + # Corresponds to the JSON property `sourceGateway` + # @return [String] + attr_accessor :source_gateway + + # Local VPN gateway's IP address. + # Corresponds to the JSON property `sourceGatewayIp` + # @return [String] + attr_accessor :source_gateway_ip + + # URI of a VPN tunnel. + # Corresponds to the JSON property `uri` + # @return [String] + attr_accessor :uri + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @display_name = args[:display_name] if args.key?(:display_name) + @network_uri = args[:network_uri] if args.key?(:network_uri) + @region = args[:region] if args.key?(:region) + @remote_gateway = args[:remote_gateway] if args.key?(:remote_gateway) + @remote_gateway_ip = args[:remote_gateway_ip] if args.key?(:remote_gateway_ip) + @routing_type = args[:routing_type] if args.key?(:routing_type) + @source_gateway = args[:source_gateway] if args.key?(:source_gateway) + @source_gateway_ip = args[:source_gateway_ip] if args.key?(:source_gateway_ip) + @uri = args[:uri] if args.key?(:uri) + end + end + end + end +end diff --git a/generated/google/apis/networkmanagement_v1/representations.rb b/generated/google/apis/networkmanagement_v1/representations.rb new file mode 100644 index 000000000..f531904b9 --- /dev/null +++ b/generated/google/apis/networkmanagement_v1/representations.rb @@ -0,0 +1,661 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'date' +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module NetworkmanagementV1 + + class AbortInfo + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AuditConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AuditLogConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Binding + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CancelOperationRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ConnectivityTest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DeliverInfo + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DropInfo + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Empty + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Endpoint + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class EndpointInfo + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Expr + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class FirewallInfo + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ForwardInfo + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ForwardingRuleInfo + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class InstanceInfo + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListConnectivityTestsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListLocationsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListOperationsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class LoadBalancerBackend + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class LoadBalancerInfo + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Location + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class NetworkInfo + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Operation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class OperationMetadata + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Policy + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ReachabilityDetails + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class RerunConnectivityTestRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class RouteInfo + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SetIamPolicyRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Status + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Step + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TestIamPermissionsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TestIamPermissionsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Trace + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class VpnGatewayInfo + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class VpnTunnelInfo + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AbortInfo + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :cause, as: 'cause' + property :resource_uri, as: 'resourceUri' + end + end + + class AuditConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :audit_log_configs, as: 'auditLogConfigs', class: Google::Apis::NetworkmanagementV1::AuditLogConfig, decorator: Google::Apis::NetworkmanagementV1::AuditLogConfig::Representation + + property :service, as: 'service' + end + end + + class AuditLogConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :exempted_members, as: 'exemptedMembers' + property :log_type, as: 'logType' + end + end + + class Binding + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :condition, as: 'condition', class: Google::Apis::NetworkmanagementV1::Expr, decorator: Google::Apis::NetworkmanagementV1::Expr::Representation + + collection :members, as: 'members' + property :role, as: 'role' + end + end + + class CancelOperationRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class ConnectivityTest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :create_time, as: 'createTime' + property :description, as: 'description' + property :destination, as: 'destination', class: Google::Apis::NetworkmanagementV1::Endpoint, decorator: Google::Apis::NetworkmanagementV1::Endpoint::Representation + + property :display_name, as: 'displayName' + hash :labels, as: 'labels' + property :name, as: 'name' + property :protocol, as: 'protocol' + property :reachability_details, as: 'reachabilityDetails', class: Google::Apis::NetworkmanagementV1::ReachabilityDetails, decorator: Google::Apis::NetworkmanagementV1::ReachabilityDetails::Representation + + collection :related_projects, as: 'relatedProjects' + property :source, as: 'source', class: Google::Apis::NetworkmanagementV1::Endpoint, decorator: Google::Apis::NetworkmanagementV1::Endpoint::Representation + + property :update_time, as: 'updateTime' + end + end + + class DeliverInfo + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :resource_uri, as: 'resourceUri' + property :target, as: 'target' + end + end + + class DropInfo + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :cause, as: 'cause' + property :resource_uri, as: 'resourceUri' + end + end + + class Empty + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class Endpoint + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :instance, as: 'instance' + property :ip_address, as: 'ipAddress' + property :network, as: 'network' + property :network_type, as: 'networkType' + property :port, as: 'port' + property :project_id, as: 'projectId' + end + end + + class EndpointInfo + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :destination_ip, as: 'destinationIp' + property :destination_network_uri, as: 'destinationNetworkUri' + property :destination_port, as: 'destinationPort' + property :protocol, as: 'protocol' + property :source_ip, as: 'sourceIp' + property :source_network_uri, as: 'sourceNetworkUri' + property :source_port, as: 'sourcePort' + end + end + + class Expr + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :description, as: 'description' + property :expression, as: 'expression' + property :location, as: 'location' + property :title, as: 'title' + end + end + + class FirewallInfo + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :action, as: 'action' + property :direction, as: 'direction' + property :display_name, as: 'displayName' + property :network_uri, as: 'networkUri' + property :priority, as: 'priority' + collection :target_service_accounts, as: 'targetServiceAccounts' + collection :target_tags, as: 'targetTags' + property :uri, as: 'uri' + end + end + + class ForwardInfo + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :resource_uri, as: 'resourceUri' + property :target, as: 'target' + end + end + + class ForwardingRuleInfo + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :display_name, as: 'displayName' + property :matched_port_range, as: 'matchedPortRange' + property :matched_protocol, as: 'matchedProtocol' + property :network_uri, as: 'networkUri' + property :target, as: 'target' + property :uri, as: 'uri' + property :vip, as: 'vip' + end + end + + class InstanceInfo + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :display_name, as: 'displayName' + property :external_ip, as: 'externalIp' + property :interface, as: 'interface' + property :internal_ip, as: 'internalIp' + collection :network_tags, as: 'networkTags' + property :network_uri, as: 'networkUri' + property :service_account, as: 'serviceAccount' + property :uri, as: 'uri' + end + end + + class ListConnectivityTestsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :resources, as: 'resources', class: Google::Apis::NetworkmanagementV1::ConnectivityTest, decorator: Google::Apis::NetworkmanagementV1::ConnectivityTest::Representation + + collection :unreachable, as: 'unreachable' + end + end + + class ListLocationsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :locations, as: 'locations', class: Google::Apis::NetworkmanagementV1::Location, decorator: Google::Apis::NetworkmanagementV1::Location::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class ListOperationsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :operations, as: 'operations', class: Google::Apis::NetworkmanagementV1::Operation, decorator: Google::Apis::NetworkmanagementV1::Operation::Representation + + end + end + + class LoadBalancerBackend + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :display_name, as: 'displayName' + collection :health_check_allowing_firewall_rules, as: 'healthCheckAllowingFirewallRules' + collection :health_check_blocking_firewall_rules, as: 'healthCheckBlockingFirewallRules' + property :health_check_firewall_state, as: 'healthCheckFirewallState' + property :uri, as: 'uri' + end + end + + class LoadBalancerInfo + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :backend_type, as: 'backendType' + property :backend_uri, as: 'backendUri' + collection :backends, as: 'backends', class: Google::Apis::NetworkmanagementV1::LoadBalancerBackend, decorator: Google::Apis::NetworkmanagementV1::LoadBalancerBackend::Representation + + property :health_check_uri, as: 'healthCheckUri' + property :load_balancer_type, as: 'loadBalancerType' + end + end + + class Location + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :display_name, as: 'displayName' + hash :labels, as: 'labels' + property :location_id, as: 'locationId' + hash :metadata, as: 'metadata' + property :name, as: 'name' + end + end + + class NetworkInfo + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :display_name, as: 'displayName' + property :matched_ip_range, as: 'matchedIpRange' + property :uri, as: 'uri' + end + end + + class Operation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :done, as: 'done' + property :error, as: 'error', class: Google::Apis::NetworkmanagementV1::Status, decorator: Google::Apis::NetworkmanagementV1::Status::Representation + + hash :metadata, as: 'metadata' + property :name, as: 'name' + hash :response, as: 'response' + end + end + + class OperationMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :api_version, as: 'apiVersion' + property :cancel_requested, as: 'cancelRequested' + property :create_time, as: 'createTime' + property :end_time, as: 'endTime' + property :status_detail, as: 'statusDetail' + property :target, as: 'target' + property :verb, as: 'verb' + end + end + + class Policy + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :audit_configs, as: 'auditConfigs', class: Google::Apis::NetworkmanagementV1::AuditConfig, decorator: Google::Apis::NetworkmanagementV1::AuditConfig::Representation + + collection :bindings, as: 'bindings', class: Google::Apis::NetworkmanagementV1::Binding, decorator: Google::Apis::NetworkmanagementV1::Binding::Representation + + property :etag, :base64 => true, as: 'etag' + property :version, as: 'version' + end + end + + class ReachabilityDetails + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :error, as: 'error', class: Google::Apis::NetworkmanagementV1::Status, decorator: Google::Apis::NetworkmanagementV1::Status::Representation + + property :result, as: 'result' + collection :traces, as: 'traces', class: Google::Apis::NetworkmanagementV1::Trace, decorator: Google::Apis::NetworkmanagementV1::Trace::Representation + + property :verify_time, as: 'verifyTime' + end + end + + class RerunConnectivityTestRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class RouteInfo + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :dest_ip_range, as: 'destIpRange' + property :display_name, as: 'displayName' + collection :instance_tags, as: 'instanceTags' + property :network_uri, as: 'networkUri' + property :next_hop, as: 'nextHop' + property :next_hop_type, as: 'nextHopType' + property :priority, as: 'priority' + property :route_type, as: 'routeType' + property :uri, as: 'uri' + end + end + + class SetIamPolicyRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :policy, as: 'policy', class: Google::Apis::NetworkmanagementV1::Policy, decorator: Google::Apis::NetworkmanagementV1::Policy::Representation + + property :update_mask, as: 'updateMask' + end + end + + class Status + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :code, as: 'code' + collection :details, as: 'details' + property :message, as: 'message' + end + end + + class Step + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :abort, as: 'abort', class: Google::Apis::NetworkmanagementV1::AbortInfo, decorator: Google::Apis::NetworkmanagementV1::AbortInfo::Representation + + property :causes_drop, as: 'causesDrop' + property :deliver, as: 'deliver', class: Google::Apis::NetworkmanagementV1::DeliverInfo, decorator: Google::Apis::NetworkmanagementV1::DeliverInfo::Representation + + property :description, as: 'description' + property :drop, as: 'drop', class: Google::Apis::NetworkmanagementV1::DropInfo, decorator: Google::Apis::NetworkmanagementV1::DropInfo::Representation + + property :endpoint, as: 'endpoint', class: Google::Apis::NetworkmanagementV1::EndpointInfo, decorator: Google::Apis::NetworkmanagementV1::EndpointInfo::Representation + + property :firewall, as: 'firewall', class: Google::Apis::NetworkmanagementV1::FirewallInfo, decorator: Google::Apis::NetworkmanagementV1::FirewallInfo::Representation + + property :forward, as: 'forward', class: Google::Apis::NetworkmanagementV1::ForwardInfo, decorator: Google::Apis::NetworkmanagementV1::ForwardInfo::Representation + + property :forwarding_rule, as: 'forwardingRule', class: Google::Apis::NetworkmanagementV1::ForwardingRuleInfo, decorator: Google::Apis::NetworkmanagementV1::ForwardingRuleInfo::Representation + + property :instance, as: 'instance', class: Google::Apis::NetworkmanagementV1::InstanceInfo, decorator: Google::Apis::NetworkmanagementV1::InstanceInfo::Representation + + property :load_balancer, as: 'loadBalancer', class: Google::Apis::NetworkmanagementV1::LoadBalancerInfo, decorator: Google::Apis::NetworkmanagementV1::LoadBalancerInfo::Representation + + property :network, as: 'network', class: Google::Apis::NetworkmanagementV1::NetworkInfo, decorator: Google::Apis::NetworkmanagementV1::NetworkInfo::Representation + + property :project_id, as: 'projectId' + property :route, as: 'route', class: Google::Apis::NetworkmanagementV1::RouteInfo, decorator: Google::Apis::NetworkmanagementV1::RouteInfo::Representation + + property :state, as: 'state' + property :vpn_gateway, as: 'vpnGateway', class: Google::Apis::NetworkmanagementV1::VpnGatewayInfo, decorator: Google::Apis::NetworkmanagementV1::VpnGatewayInfo::Representation + + property :vpn_tunnel, as: 'vpnTunnel', class: Google::Apis::NetworkmanagementV1::VpnTunnelInfo, decorator: Google::Apis::NetworkmanagementV1::VpnTunnelInfo::Representation + + end + end + + class TestIamPermissionsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :permissions, as: 'permissions' + end + end + + class TestIamPermissionsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :permissions, as: 'permissions' + end + end + + class Trace + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :endpoint_info, as: 'endpointInfo', class: Google::Apis::NetworkmanagementV1::EndpointInfo, decorator: Google::Apis::NetworkmanagementV1::EndpointInfo::Representation + + collection :steps, as: 'steps', class: Google::Apis::NetworkmanagementV1::Step, decorator: Google::Apis::NetworkmanagementV1::Step::Representation + + end + end + + class VpnGatewayInfo + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :display_name, as: 'displayName' + property :ip_address, as: 'ipAddress' + property :network_uri, as: 'networkUri' + property :region, as: 'region' + property :uri, as: 'uri' + property :vpn_tunnel_uri, as: 'vpnTunnelUri' + end + end + + class VpnTunnelInfo + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :display_name, as: 'displayName' + property :network_uri, as: 'networkUri' + property :region, as: 'region' + property :remote_gateway, as: 'remoteGateway' + property :remote_gateway_ip, as: 'remoteGatewayIp' + property :routing_type, as: 'routingType' + property :source_gateway, as: 'sourceGateway' + property :source_gateway_ip, as: 'sourceGatewayIp' + property :uri, as: 'uri' + end + end + end + end +end diff --git a/generated/google/apis/networkmanagement_v1/service.rb b/generated/google/apis/networkmanagement_v1/service.rb new file mode 100644 index 000000000..a1ed1d177 --- /dev/null +++ b/generated/google/apis/networkmanagement_v1/service.rb @@ -0,0 +1,667 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module NetworkmanagementV1 + # Network Management API + # + # The Network Management API provides a collection of network performance + # monitoring and diagnostic capabilities. + # + # @example + # require 'google/apis/networkmanagement_v1' + # + # Networkmanagement = Google::Apis::NetworkmanagementV1 # Alias the module + # service = Networkmanagement::NetworkManagementService.new + # + # @see https://cloud.google.com/ + class NetworkManagementService < Google::Apis::Core::BaseService + # @return [String] + # API key. Your API key identifies your project and provides you with API access, + # quota, and reports. Required unless you provide an OAuth 2.0 token. + attr_accessor :key + + # @return [String] + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + attr_accessor :quota_user + + def initialize + super('https://networkmanagement.googleapis.com/', '') + @batch_path = 'batch' + end + + # Gets information about a location. + # @param [String] name + # Resource name for the location. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::NetworkmanagementV1::Location] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::NetworkmanagementV1::Location] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}', options) + command.response_representation = Google::Apis::NetworkmanagementV1::Location::Representation + command.response_class = Google::Apis::NetworkmanagementV1::Location + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists information about the supported locations for this service. + # @param [String] name + # The resource that owns the locations collection, if applicable. + # @param [String] filter + # The standard list filter. + # @param [Fixnum] page_size + # The standard list page size. + # @param [String] page_token + # The standard list page token. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::NetworkmanagementV1::ListLocationsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::NetworkmanagementV1::ListLocationsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_locations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}/locations', options) + command.response_representation = Google::Apis::NetworkmanagementV1::ListLocationsResponse::Representation + command.response_class = Google::Apis::NetworkmanagementV1::ListLocationsResponse + command.params['name'] = name unless name.nil? + command.query['filter'] = filter unless filter.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a new Connectivity Test. + # After you create a test, the reachability analysis is performed as part + # of the long running operation, which completes when the analysis completes. + # If the endpoint specifications in `ConnectivityTest` are invalid + # (for example, containing non-existent resources in the network, or you + # don't have read permissions to the network configurations of listed + # projects), then the reachability result returns a value of `UNKNOWN`. + # If the endpoint specifications in `ConnectivityTest` are + # incomplete, the reachability result returns a value of + # AMBIGUOUS. For more information, + # see the Connectivity Test documentation. + # @param [String] parent + # Required. The parent resource of the Connectivity Test to create: + # `projects/`project_id`/locations/global` + # @param [Google::Apis::NetworkmanagementV1::ConnectivityTest] connectivity_test_object + # @param [String] test_id + # Required. The logical name of the Connectivity Test in your project + # with the following restrictions: + # * Must contain only lowercase letters, numbers, and hyphens. + # * Must start with a letter. + # * Must be between 1-40 characters. + # * Must end with a number or a letter. + # * Must be unique within the customer project + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::NetworkmanagementV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::NetworkmanagementV1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_project_location_global_connectivity_test(parent, connectivity_test_object = nil, test_id: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+parent}/connectivityTests', options) + command.request_representation = Google::Apis::NetworkmanagementV1::ConnectivityTest::Representation + command.request_object = connectivity_test_object + command.response_representation = Google::Apis::NetworkmanagementV1::Operation::Representation + command.response_class = Google::Apis::NetworkmanagementV1::Operation + command.params['parent'] = parent unless parent.nil? + command.query['testId'] = test_id unless test_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a specific `ConnectivityTest`. + # @param [String] name + # Required. Connectivity Test resource name using the form: + # `projects/`project_id`/locations/global/connectivityTests/`test_id`` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::NetworkmanagementV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::NetworkmanagementV1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_project_location_global_connectivity_test(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/{+name}', options) + command.response_representation = Google::Apis::NetworkmanagementV1::Operation::Representation + command.response_class = Google::Apis::NetworkmanagementV1::Operation + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets the details of a specific Connectivity Test. + # @param [String] name + # Required. `ConnectivityTest` resource name using the form: + # `projects/`project_id`/locations/global/connectivityTests/`test_id`` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::NetworkmanagementV1::ConnectivityTest] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::NetworkmanagementV1::ConnectivityTest] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location_global_connectivity_test(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}', options) + command.response_representation = Google::Apis::NetworkmanagementV1::ConnectivityTest::Representation + command.response_class = Google::Apis::NetworkmanagementV1::ConnectivityTest + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets the access control policy for a resource. + # Returns an empty policy if the resource exists and does not have a policy + # set. + # @param [String] resource + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param [Fixnum] options_requested_policy_version + # Optional. The policy format version to be returned. + # Valid values are 0, 1, and 3. Requests specifying an invalid value will be + # rejected. + # Requests for policies with any conditional bindings must specify version 3. + # Policies without any conditional bindings may specify any valid value or + # leave the field unset. + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::NetworkmanagementV1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::NetworkmanagementV1::Policy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location_global_connectivity_test_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+resource}:getIamPolicy', options) + command.response_representation = Google::Apis::NetworkmanagementV1::Policy::Representation + command.response_class = Google::Apis::NetworkmanagementV1::Policy + command.params['resource'] = resource unless resource.nil? + command.query['options.requestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists all Connectivity Tests owned by a project. + # @param [String] parent + # Required. The parent resource of the Connectivity Tests: + # `projects/`project_id`/locations/global` + # @param [String] filter + # Lists the `ConnectivityTests` that match the filter expression. A filter + # expression filters the resources listed in the response. The expression + # must be of the form ` ` where operators: `<`, `>`, + # `<=`, + # `>=`, + # `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is + # roughly synonymous with equality). can refer to a proto or JSON + # field, or a synthetic field. Field names can be camelCase or snake_case. + # Examples: + # - Filter by name: + # name = "projects/proj-1/locations/global/connectivityTests/test-1 + # - Filter by labels: + # - Resources that have a key called `foo` + # labels.foo:* + # - Resources that have a key called `foo` whose value is `bar` + # labels.foo = bar + # @param [String] order_by + # Field to use to sort the list. + # @param [Fixnum] page_size + # Number of `ConnectivityTests` to return. + # @param [String] page_token + # Page token from an earlier query, as returned in `next_page_token`. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::NetworkmanagementV1::ListConnectivityTestsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::NetworkmanagementV1::ListConnectivityTestsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_location_global_connectivity_tests(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+parent}/connectivityTests', options) + command.response_representation = Google::Apis::NetworkmanagementV1::ListConnectivityTestsResponse::Representation + command.response_class = Google::Apis::NetworkmanagementV1::ListConnectivityTestsResponse + command.params['parent'] = parent unless parent.nil? + command.query['filter'] = filter unless filter.nil? + command.query['orderBy'] = order_by unless order_by.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates the configuration of an existing `ConnectivityTest`. + # After you update a test, the reachability analysis is performed as part + # of the long running operation, which completes when the analysis completes. + # The Reachability state in the test resource is updated with the new result. + # If the endpoint specifications in `ConnectivityTest` are invalid + # (for example, they contain non-existent resources in the network, or the + # user does not have read permissions to the network configurations of + # listed projects), then the reachability result returns a value of + # UNKNOWN. + # If the endpoint specifications in `ConnectivityTest` are incomplete, the + # reachability result returns a value of `AMBIGUOUS`. See the documentation + # in `ConnectivityTest` for for more details. + # @param [String] name + # Required. Unique name of the resource using the form: + # `projects/`project_id`/locations/global/connectivityTests/`test_id`` + # @param [Google::Apis::NetworkmanagementV1::ConnectivityTest] connectivity_test_object + # @param [String] update_mask + # Required. Mask of fields to update. At least one path must be supplied in + # this field. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::NetworkmanagementV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::NetworkmanagementV1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def patch_project_location_global_connectivity_test(name, connectivity_test_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1/{+name}', options) + command.request_representation = Google::Apis::NetworkmanagementV1::ConnectivityTest::Representation + command.request_object = connectivity_test_object + command.response_representation = Google::Apis::NetworkmanagementV1::Operation::Representation + command.response_class = Google::Apis::NetworkmanagementV1::Operation + command.params['name'] = name unless name.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Rerun an existing `ConnectivityTest`. + # After the user triggers the rerun, the reachability analysis is performed + # as part of the long running operation, which completes when the analysis + # completes. + # Even though the test configuration remains the same, the reachability + # result may change due to underlying network configuration changes. + # If the endpoint specifications in `ConnectivityTest` become invalid (for + # example, specified resources are deleted in the network, or you lost + # read permissions to the network configurations of listed projects), then + # the reachability result returns a value of `UNKNOWN`. + # @param [String] name + # Required. Connectivity Test resource name using the form: + # `projects/`project_id`/locations/global/connectivityTests/`test_id`` + # @param [Google::Apis::NetworkmanagementV1::RerunConnectivityTestRequest] rerun_connectivity_test_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::NetworkmanagementV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::NetworkmanagementV1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def rerun_connectivity_test(name, rerun_connectivity_test_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+name}:rerun', options) + command.request_representation = Google::Apis::NetworkmanagementV1::RerunConnectivityTestRequest::Representation + command.request_object = rerun_connectivity_test_request_object + command.response_representation = Google::Apis::NetworkmanagementV1::Operation::Representation + command.response_class = Google::Apis::NetworkmanagementV1::Operation + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Sets the access control policy on the specified resource. Replaces any + # existing policy. + # Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. + # @param [String] resource + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param [Google::Apis::NetworkmanagementV1::SetIamPolicyRequest] set_iam_policy_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::NetworkmanagementV1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::NetworkmanagementV1::Policy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def set_connectivity_test_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options) + command.request_representation = Google::Apis::NetworkmanagementV1::SetIamPolicyRequest::Representation + command.request_object = set_iam_policy_request_object + command.response_representation = Google::Apis::NetworkmanagementV1::Policy::Representation + command.response_class = Google::Apis::NetworkmanagementV1::Policy + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Returns permissions that a caller has on the specified resource. + # If the resource does not exist, this will return an empty set of + # permissions, not a `NOT_FOUND` error. + # Note: This operation is designed to be used for building permission-aware + # UIs and command-line tools, not for authorization checking. This operation + # may "fail open" without warning. + # @param [String] resource + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param [Google::Apis::NetworkmanagementV1::TestIamPermissionsRequest] test_iam_permissions_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::NetworkmanagementV1::TestIamPermissionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::NetworkmanagementV1::TestIamPermissionsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def test_connectivity_test_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options) + command.request_representation = Google::Apis::NetworkmanagementV1::TestIamPermissionsRequest::Representation + command.request_object = test_iam_permissions_request_object + command.response_representation = Google::Apis::NetworkmanagementV1::TestIamPermissionsResponse::Representation + command.response_class = Google::Apis::NetworkmanagementV1::TestIamPermissionsResponse + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an Operation.error value with a google.rpc.Status.code of 1, + # corresponding to `Code.CANCELLED`. + # @param [String] name + # The name of the operation resource to be cancelled. + # @param [Google::Apis::NetworkmanagementV1::CancelOperationRequest] cancel_operation_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::NetworkmanagementV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::NetworkmanagementV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+name}:cancel', options) + command.request_representation = Google::Apis::NetworkmanagementV1::CancelOperationRequest::Representation + command.request_object = cancel_operation_request_object + command.response_representation = Google::Apis::NetworkmanagementV1::Empty::Representation + command.response_class = Google::Apis::NetworkmanagementV1::Empty + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # @param [String] name + # The name of the operation resource to be deleted. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::NetworkmanagementV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::NetworkmanagementV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_project_location_global_operation(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/{+name}', options) + command.response_representation = Google::Apis::NetworkmanagementV1::Empty::Representation + command.response_class = Google::Apis::NetworkmanagementV1::Empty + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # @param [String] name + # The name of the operation resource. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::NetworkmanagementV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::NetworkmanagementV1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location_global_operation(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}', options) + command.response_representation = Google::Apis::NetworkmanagementV1::Operation::Representation + command.response_class = Google::Apis::NetworkmanagementV1::Operation + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # NOTE: the `name` binding allows API services to override the binding + # to use different resource name schemes, such as `users/*/operations`. To + # override the binding, API services can add a binding such as + # `"/v1/`name=users/*`/operations"` to their service configuration. + # For backwards compatibility, the default name includes the operations + # collection id, however overriding users must ensure the name binding + # is the parent resource, without the operations collection id. + # @param [String] name + # The name of the operation's parent resource. + # @param [String] filter + # The standard list filter. + # @param [Fixnum] page_size + # The standard list page size. + # @param [String] page_token + # The standard list page token. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::NetworkmanagementV1::ListOperationsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::NetworkmanagementV1::ListOperationsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_location_global_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}/operations', options) + command.response_representation = Google::Apis::NetworkmanagementV1::ListOperationsResponse::Representation + command.response_class = Google::Apis::NetworkmanagementV1::ListOperationsResponse + command.params['name'] = name unless name.nil? + command.query['filter'] = filter unless filter.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + protected + + def apply_command_defaults(command) + command.query['key'] = key unless key.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + end + end + end + end +end diff --git a/generated/google/apis/pagespeedonline_v1/classes.rb b/generated/google/apis/pagespeedonline_v1/classes.rb deleted file mode 100644 index 38a275732..000000000 --- a/generated/google/apis/pagespeedonline_v1/classes.rb +++ /dev/null @@ -1,542 +0,0 @@ -# Copyright 2015 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -require 'date' -require 'google/apis/core/base_service' -require 'google/apis/core/json_representation' -require 'google/apis/core/hashable' -require 'google/apis/errors' - -module Google - module Apis - module PagespeedonlineV1 - - # - class Result - include Google::Apis::Core::Hashable - - # The captcha verify result - # Corresponds to the JSON property `captchaResult` - # @return [String] - attr_accessor :captcha_result - - # Localized PageSpeed results. Contains a ruleResults entry for each PageSpeed - # rule instantiated and run by the server. - # Corresponds to the JSON property `formattedResults` - # @return [Google::Apis::PagespeedonlineV1::Result::FormattedResults] - attr_accessor :formatted_results - - # Canonicalized and final URL for the document, after following page redirects ( - # if any). - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # List of rules that were specified in the request, but which the server did not - # know how to instantiate. - # Corresponds to the JSON property `invalidRules` - # @return [Array] - attr_accessor :invalid_rules - - # Kind of result. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Summary statistics for the page, such as number of JavaScript bytes, number of - # HTML bytes, etc. - # Corresponds to the JSON property `pageStats` - # @return [Google::Apis::PagespeedonlineV1::Result::PageStats] - attr_accessor :page_stats - - # Response code for the document. 200 indicates a normal page load. 4xx/5xx - # indicates an error. - # Corresponds to the JSON property `responseCode` - # @return [Fixnum] - attr_accessor :response_code - - # The PageSpeed Score (0-100), which indicates how much faster a page could be. - # A high score indicates little room for improvement, while a lower score - # indicates more room for improvement. - # Corresponds to the JSON property `score` - # @return [Fixnum] - attr_accessor :score - - # Base64-encoded screenshot of the page that was analyzed. - # Corresponds to the JSON property `screenshot` - # @return [Google::Apis::PagespeedonlineV1::Result::Screenshot] - attr_accessor :screenshot - - # Title of the page, as displayed in the browser's title bar. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # The version of PageSpeed used to generate these results. - # Corresponds to the JSON property `version` - # @return [Google::Apis::PagespeedonlineV1::Result::Version] - attr_accessor :version - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @captcha_result = args[:captcha_result] if args.key?(:captcha_result) - @formatted_results = args[:formatted_results] if args.key?(:formatted_results) - @id = args[:id] if args.key?(:id) - @invalid_rules = args[:invalid_rules] if args.key?(:invalid_rules) - @kind = args[:kind] if args.key?(:kind) - @page_stats = args[:page_stats] if args.key?(:page_stats) - @response_code = args[:response_code] if args.key?(:response_code) - @score = args[:score] if args.key?(:score) - @screenshot = args[:screenshot] if args.key?(:screenshot) - @title = args[:title] if args.key?(:title) - @version = args[:version] if args.key?(:version) - end - - # Localized PageSpeed results. Contains a ruleResults entry for each PageSpeed - # rule instantiated and run by the server. - class FormattedResults - include Google::Apis::Core::Hashable - - # The locale of the formattedResults, e.g. "en_US". - # Corresponds to the JSON property `locale` - # @return [String] - attr_accessor :locale - - # Dictionary of formatted rule results, with one entry for each PageSpeed rule - # instantiated and run by the server. - # Corresponds to the JSON property `ruleResults` - # @return [Hash] - attr_accessor :rule_results - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @locale = args[:locale] if args.key?(:locale) - @rule_results = args[:rule_results] if args.key?(:rule_results) - end - - # The enum-like identifier for this rule. For instance "EnableKeepAlive" or " - # AvoidCssImport". Not localized. - class RuleResult - include Google::Apis::Core::Hashable - - # Localized name of the rule, intended for presentation to a user. - # Corresponds to the JSON property `localizedRuleName` - # @return [String] - attr_accessor :localized_rule_name - - # The impact (unbounded floating point value) that implementing the suggestions - # for this rule would have on making the page faster. Impact is comparable - # between rules to determine which rule's suggestions would have a higher or - # lower impact on making a page faster. For instance, if enabling compression - # would save 1MB, while optimizing images would save 500kB, the enable - # compression rule would have 2x the impact of the image optimization rule, all - # other things being equal. - # Corresponds to the JSON property `ruleImpact` - # @return [Float] - attr_accessor :rule_impact - - # List of blocks of URLs. Each block may contain a heading and a list of URLs. - # Each URL may optionally include additional details. - # Corresponds to the JSON property `urlBlocks` - # @return [Array] - attr_accessor :url_blocks - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @localized_rule_name = args[:localized_rule_name] if args.key?(:localized_rule_name) - @rule_impact = args[:rule_impact] if args.key?(:rule_impact) - @url_blocks = args[:url_blocks] if args.key?(:url_blocks) - end - - # - class UrlBlock - include Google::Apis::Core::Hashable - - # Heading to be displayed with the list of URLs. - # Corresponds to the JSON property `header` - # @return [Google::Apis::PagespeedonlineV1::Result::FormattedResults::RuleResult::UrlBlock::Header] - attr_accessor :header - - # List of entries that provide information about URLs in the url block. Optional. - # Corresponds to the JSON property `urls` - # @return [Array] - attr_accessor :urls - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @header = args[:header] if args.key?(:header) - @urls = args[:urls] if args.key?(:urls) - end - - # Heading to be displayed with the list of URLs. - class Header - include Google::Apis::Core::Hashable - - # List of arguments for the format string. - # Corresponds to the JSON property `args` - # @return [Array] - attr_accessor :args - - # A localized format string with $N placeholders, where N is the 1-indexed - # argument number, e.g. 'Minifying the following $1 resources would save a total - # of $2 bytes'. - # Corresponds to the JSON property `format` - # @return [String] - attr_accessor :format - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @args = args[:args] if args.key?(:args) - @format = args[:format] if args.key?(:format) - end - - # - class Arg - include Google::Apis::Core::Hashable - - # Type of argument. One of URL, STRING_LITERAL, INT_LITERAL, BYTES, or DURATION. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Argument value, as a localized string. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @type = args[:type] if args.key?(:type) - @value = args[:value] if args.key?(:value) - end - end - end - - # - class Url - include Google::Apis::Core::Hashable - - # List of entries that provide additional details about a single URL. Optional. - # Corresponds to the JSON property `details` - # @return [Array] - attr_accessor :details - - # A format string that gives information about the URL, and a list of arguments - # for that format string. - # Corresponds to the JSON property `result` - # @return [Google::Apis::PagespeedonlineV1::Result::FormattedResults::RuleResult::UrlBlock::Url::Result] - attr_accessor :result - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @details = args[:details] if args.key?(:details) - @result = args[:result] if args.key?(:result) - end - - # - class Detail - include Google::Apis::Core::Hashable - - # List of arguments for the format string. - # Corresponds to the JSON property `args` - # @return [Array] - attr_accessor :args - - # A localized format string with $N placeholders, where N is the 1-indexed - # argument number, e.g. 'Unnecessary metadata for this resource adds an - # additional $1 bytes to its download size'. - # Corresponds to the JSON property `format` - # @return [String] - attr_accessor :format - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @args = args[:args] if args.key?(:args) - @format = args[:format] if args.key?(:format) - end - - # - class Arg - include Google::Apis::Core::Hashable - - # Type of argument. One of URL, STRING_LITERAL, INT_LITERAL, BYTES, or DURATION. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Argument value, as a localized string. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @type = args[:type] if args.key?(:type) - @value = args[:value] if args.key?(:value) - end - end - end - - # A format string that gives information about the URL, and a list of arguments - # for that format string. - class Result - include Google::Apis::Core::Hashable - - # List of arguments for the format string. - # Corresponds to the JSON property `args` - # @return [Array] - attr_accessor :args - - # A localized format string with $N placeholders, where N is the 1-indexed - # argument number, e.g. 'Minifying the resource at URL $1 can save $2 bytes'. - # Corresponds to the JSON property `format` - # @return [String] - attr_accessor :format - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @args = args[:args] if args.key?(:args) - @format = args[:format] if args.key?(:format) - end - - # - class Arg - include Google::Apis::Core::Hashable - - # Type of argument. One of URL, STRING_LITERAL, INT_LITERAL, BYTES, or DURATION. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Argument value, as a localized string. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @type = args[:type] if args.key?(:type) - @value = args[:value] if args.key?(:value) - end - end - end - end - end - end - end - - # Summary statistics for the page, such as number of JavaScript bytes, number of - # HTML bytes, etc. - class PageStats - include Google::Apis::Core::Hashable - - # Number of uncompressed response bytes for CSS resources on the page. - # Corresponds to the JSON property `cssResponseBytes` - # @return [Fixnum] - attr_accessor :css_response_bytes - - # Number of response bytes for flash resources on the page. - # Corresponds to the JSON property `flashResponseBytes` - # @return [Fixnum] - attr_accessor :flash_response_bytes - - # Number of uncompressed response bytes for the main HTML document and all - # iframes on the page. - # Corresponds to the JSON property `htmlResponseBytes` - # @return [Fixnum] - attr_accessor :html_response_bytes - - # Number of response bytes for image resources on the page. - # Corresponds to the JSON property `imageResponseBytes` - # @return [Fixnum] - attr_accessor :image_response_bytes - - # Number of uncompressed response bytes for JS resources on the page. - # Corresponds to the JSON property `javascriptResponseBytes` - # @return [Fixnum] - attr_accessor :javascript_response_bytes - - # Number of CSS resources referenced by the page. - # Corresponds to the JSON property `numberCssResources` - # @return [Fixnum] - attr_accessor :number_css_resources - - # Number of unique hosts referenced by the page. - # Corresponds to the JSON property `numberHosts` - # @return [Fixnum] - attr_accessor :number_hosts - - # Number of JavaScript resources referenced by the page. - # Corresponds to the JSON property `numberJsResources` - # @return [Fixnum] - attr_accessor :number_js_resources - - # Number of HTTP resources loaded by the page. - # Corresponds to the JSON property `numberResources` - # @return [Fixnum] - attr_accessor :number_resources - - # Number of static (i.e. cacheable) resources on the page. - # Corresponds to the JSON property `numberStaticResources` - # @return [Fixnum] - attr_accessor :number_static_resources - - # Number of response bytes for other resources on the page. - # Corresponds to the JSON property `otherResponseBytes` - # @return [Fixnum] - attr_accessor :other_response_bytes - - # Number of uncompressed response bytes for text resources not covered by other - # statistics (i.e non-HTML, non-script, non-CSS resources) on the page. - # Corresponds to the JSON property `textResponseBytes` - # @return [Fixnum] - attr_accessor :text_response_bytes - - # Total size of all request bytes sent by the page. - # Corresponds to the JSON property `totalRequestBytes` - # @return [Fixnum] - attr_accessor :total_request_bytes - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @css_response_bytes = args[:css_response_bytes] if args.key?(:css_response_bytes) - @flash_response_bytes = args[:flash_response_bytes] if args.key?(:flash_response_bytes) - @html_response_bytes = args[:html_response_bytes] if args.key?(:html_response_bytes) - @image_response_bytes = args[:image_response_bytes] if args.key?(:image_response_bytes) - @javascript_response_bytes = args[:javascript_response_bytes] if args.key?(:javascript_response_bytes) - @number_css_resources = args[:number_css_resources] if args.key?(:number_css_resources) - @number_hosts = args[:number_hosts] if args.key?(:number_hosts) - @number_js_resources = args[:number_js_resources] if args.key?(:number_js_resources) - @number_resources = args[:number_resources] if args.key?(:number_resources) - @number_static_resources = args[:number_static_resources] if args.key?(:number_static_resources) - @other_response_bytes = args[:other_response_bytes] if args.key?(:other_response_bytes) - @text_response_bytes = args[:text_response_bytes] if args.key?(:text_response_bytes) - @total_request_bytes = args[:total_request_bytes] if args.key?(:total_request_bytes) - end - end - - # Base64-encoded screenshot of the page that was analyzed. - class Screenshot - include Google::Apis::Core::Hashable - - # Image data base64 encoded. - # Corresponds to the JSON property `data` - # NOTE: Values are automatically base64 encoded/decoded in the client library. - # @return [String] - attr_accessor :data - - # Height of screenshot in pixels. - # Corresponds to the JSON property `height` - # @return [Fixnum] - attr_accessor :height - - # Mime type of image data. E.g. "image/jpeg". - # Corresponds to the JSON property `mime_type` - # @return [String] - attr_accessor :mime_type - - # Width of screenshot in pixels. - # Corresponds to the JSON property `width` - # @return [Fixnum] - attr_accessor :width - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @data = args[:data] if args.key?(:data) - @height = args[:height] if args.key?(:height) - @mime_type = args[:mime_type] if args.key?(:mime_type) - @width = args[:width] if args.key?(:width) - end - end - - # The version of PageSpeed used to generate these results. - class Version - include Google::Apis::Core::Hashable - - # The major version number of PageSpeed used to generate these results. - # Corresponds to the JSON property `major` - # @return [Fixnum] - attr_accessor :major - - # The minor version number of PageSpeed used to generate these results. - # Corresponds to the JSON property `minor` - # @return [Fixnum] - attr_accessor :minor - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @major = args[:major] if args.key?(:major) - @minor = args[:minor] if args.key?(:minor) - end - end - end - end - end -end diff --git a/generated/google/apis/pagespeedonline_v1/representations.rb b/generated/google/apis/pagespeedonline_v1/representations.rb deleted file mode 100644 index 59604c3cb..000000000 --- a/generated/google/apis/pagespeedonline_v1/representations.rb +++ /dev/null @@ -1,258 +0,0 @@ -# Copyright 2015 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -require 'date' -require 'google/apis/core/base_service' -require 'google/apis/core/json_representation' -require 'google/apis/core/hashable' -require 'google/apis/errors' - -module Google - module Apis - module PagespeedonlineV1 - - class Result - class Representation < Google::Apis::Core::JsonRepresentation; end - - class FormattedResults - class Representation < Google::Apis::Core::JsonRepresentation; end - - class RuleResult - class Representation < Google::Apis::Core::JsonRepresentation; end - - class UrlBlock - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Header - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Arg - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - include Google::Apis::Core::JsonObjectSupport - end - - class Url - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Detail - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Arg - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - include Google::Apis::Core::JsonObjectSupport - end - - class Result - class Representation < Google::Apis::Core::JsonRepresentation; end - - class Arg - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - include Google::Apis::Core::JsonObjectSupport - end - - include Google::Apis::Core::JsonObjectSupport - end - - include Google::Apis::Core::JsonObjectSupport - end - - include Google::Apis::Core::JsonObjectSupport - end - - include Google::Apis::Core::JsonObjectSupport - end - - class PageStats - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Screenshot - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Version - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - include Google::Apis::Core::JsonObjectSupport - end - - class Result - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :captcha_result, as: 'captchaResult' - property :formatted_results, as: 'formattedResults', class: Google::Apis::PagespeedonlineV1::Result::FormattedResults, decorator: Google::Apis::PagespeedonlineV1::Result::FormattedResults::Representation - - property :id, as: 'id' - collection :invalid_rules, as: 'invalidRules' - property :kind, as: 'kind' - property :page_stats, as: 'pageStats', class: Google::Apis::PagespeedonlineV1::Result::PageStats, decorator: Google::Apis::PagespeedonlineV1::Result::PageStats::Representation - - property :response_code, as: 'responseCode' - property :score, as: 'score' - property :screenshot, as: 'screenshot', class: Google::Apis::PagespeedonlineV1::Result::Screenshot, decorator: Google::Apis::PagespeedonlineV1::Result::Screenshot::Representation - - property :title, as: 'title' - property :version, as: 'version', class: Google::Apis::PagespeedonlineV1::Result::Version, decorator: Google::Apis::PagespeedonlineV1::Result::Version::Representation - - end - - class FormattedResults - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :locale, as: 'locale' - hash :rule_results, as: 'ruleResults', class: Google::Apis::PagespeedonlineV1::Result::FormattedResults::RuleResult, decorator: Google::Apis::PagespeedonlineV1::Result::FormattedResults::RuleResult::Representation - - end - - class RuleResult - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :localized_rule_name, as: 'localizedRuleName' - property :rule_impact, as: 'ruleImpact' - collection :url_blocks, as: 'urlBlocks', class: Google::Apis::PagespeedonlineV1::Result::FormattedResults::RuleResult::UrlBlock, decorator: Google::Apis::PagespeedonlineV1::Result::FormattedResults::RuleResult::UrlBlock::Representation - - end - - class UrlBlock - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :header, as: 'header', class: Google::Apis::PagespeedonlineV1::Result::FormattedResults::RuleResult::UrlBlock::Header, decorator: Google::Apis::PagespeedonlineV1::Result::FormattedResults::RuleResult::UrlBlock::Header::Representation - - collection :urls, as: 'urls', class: Google::Apis::PagespeedonlineV1::Result::FormattedResults::RuleResult::UrlBlock::Url, decorator: Google::Apis::PagespeedonlineV1::Result::FormattedResults::RuleResult::UrlBlock::Url::Representation - - end - - class Header - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :args, as: 'args', class: Google::Apis::PagespeedonlineV1::Result::FormattedResults::RuleResult::UrlBlock::Header::Arg, decorator: Google::Apis::PagespeedonlineV1::Result::FormattedResults::RuleResult::UrlBlock::Header::Arg::Representation - - property :format, as: 'format' - end - - class Arg - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :type, as: 'type' - property :value, as: 'value' - end - end - end - - class Url - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :details, as: 'details', class: Google::Apis::PagespeedonlineV1::Result::FormattedResults::RuleResult::UrlBlock::Url::Detail, decorator: Google::Apis::PagespeedonlineV1::Result::FormattedResults::RuleResult::UrlBlock::Url::Detail::Representation - - property :result, as: 'result', class: Google::Apis::PagespeedonlineV1::Result::FormattedResults::RuleResult::UrlBlock::Url::Result, decorator: Google::Apis::PagespeedonlineV1::Result::FormattedResults::RuleResult::UrlBlock::Url::Result::Representation - - end - - class Detail - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :args, as: 'args', class: Google::Apis::PagespeedonlineV1::Result::FormattedResults::RuleResult::UrlBlock::Url::Detail::Arg, decorator: Google::Apis::PagespeedonlineV1::Result::FormattedResults::RuleResult::UrlBlock::Url::Detail::Arg::Representation - - property :format, as: 'format' - end - - class Arg - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :type, as: 'type' - property :value, as: 'value' - end - end - end - - class Result - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :args, as: 'args', class: Google::Apis::PagespeedonlineV1::Result::FormattedResults::RuleResult::UrlBlock::Url::Result::Arg, decorator: Google::Apis::PagespeedonlineV1::Result::FormattedResults::RuleResult::UrlBlock::Url::Result::Arg::Representation - - property :format, as: 'format' - end - - class Arg - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :type, as: 'type' - property :value, as: 'value' - end - end - end - end - end - end - end - - class PageStats - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :css_response_bytes, :numeric_string => true, as: 'cssResponseBytes' - property :flash_response_bytes, :numeric_string => true, as: 'flashResponseBytes' - property :html_response_bytes, :numeric_string => true, as: 'htmlResponseBytes' - property :image_response_bytes, :numeric_string => true, as: 'imageResponseBytes' - property :javascript_response_bytes, :numeric_string => true, as: 'javascriptResponseBytes' - property :number_css_resources, as: 'numberCssResources' - property :number_hosts, as: 'numberHosts' - property :number_js_resources, as: 'numberJsResources' - property :number_resources, as: 'numberResources' - property :number_static_resources, as: 'numberStaticResources' - property :other_response_bytes, :numeric_string => true, as: 'otherResponseBytes' - property :text_response_bytes, :numeric_string => true, as: 'textResponseBytes' - property :total_request_bytes, :numeric_string => true, as: 'totalRequestBytes' - end - end - - class Screenshot - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :data, :base64 => true, as: 'data' - property :height, as: 'height' - property :mime_type, as: 'mime_type' - property :width, as: 'width' - end - end - - class Version - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :major, as: 'major' - property :minor, as: 'minor' - end - end - end - end - end -end diff --git a/generated/google/apis/pagespeedonline_v1/service.rb b/generated/google/apis/pagespeedonline_v1/service.rb deleted file mode 100644 index 9aaaf58e8..000000000 --- a/generated/google/apis/pagespeedonline_v1/service.rb +++ /dev/null @@ -1,116 +0,0 @@ -# Copyright 2015 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -require 'google/apis/core/base_service' -require 'google/apis/core/json_representation' -require 'google/apis/core/hashable' -require 'google/apis/errors' - -module Google - module Apis - module PagespeedonlineV1 - # PageSpeed Insights API - # - # Analyzes the performance of a web page and provides tailored suggestions to - # make that page faster. - # - # @example - # require 'google/apis/pagespeedonline_v1' - # - # Pagespeedonline = Google::Apis::PagespeedonlineV1 # Alias the module - # service = Pagespeedonline::PagespeedonlineService.new - # - # @see https://developers.google.com/speed/docs/insights/v1/getting_started - class PagespeedonlineService < Google::Apis::Core::BaseService - # @return [String] - # API key. Your API key identifies your project and provides you with API access, - # quota, and reports. Required unless you provide an OAuth 2.0 token. - attr_accessor :key - - # @return [String] - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - attr_accessor :quota_user - - # @return [String] - # Deprecated. Please use quotaUser instead. - attr_accessor :user_ip - - def initialize - super('https://www.googleapis.com/', 'pagespeedonline/v1/') - @batch_path = 'batch/pagespeedonline/v1' - end - - # Runs PageSpeed analysis on the page at the specified URL, and returns a - # PageSpeed score, a list of suggestions to make that page faster, and other - # information. - # @param [String] url - # The URL to fetch and analyze - # @param [Boolean] filter_third_party_resources - # Indicates if third party resources should be filtered out before PageSpeed - # analysis. - # @param [String] locale - # The locale used to localize formatted results - # @param [Array, String] rule - # A PageSpeed rule to run; if none are given, all rules are run - # @param [Boolean] screenshot - # Indicates if binary data containing a screenshot should be included - # @param [String] strategy - # The analysis strategy to use - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PagespeedonlineV1::Result] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PagespeedonlineV1::Result] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def runpagespeed_pagespeedapi(url, filter_third_party_resources: nil, locale: nil, rule: nil, screenshot: nil, strategy: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:get, 'runPagespeed', options) - command.response_representation = Google::Apis::PagespeedonlineV1::Result::Representation - command.response_class = Google::Apis::PagespeedonlineV1::Result - command.query['filter_third_party_resources'] = filter_third_party_resources unless filter_third_party_resources.nil? - command.query['locale'] = locale unless locale.nil? - command.query['rule'] = rule unless rule.nil? - command.query['screenshot'] = screenshot unless screenshot.nil? - command.query['strategy'] = strategy unless strategy.nil? - command.query['url'] = url unless url.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - protected - - def apply_command_defaults(command) - command.query['key'] = key unless key.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - end - end - end - end -end