diff --git a/api_names_out.yaml b/api_names_out.yaml index 7651f756f..dc35c491a 100644 --- a/api_names_out.yaml +++ b/api_names_out.yaml @@ -38974,6 +38974,11 @@ "/dataproc:v1/AcceleratorConfig": accelerator_config "/dataproc:v1/AcceleratorConfig/acceleratorCount": accelerator_count "/dataproc:v1/AcceleratorConfig/acceleratorTypeUri": accelerator_type_uri +"/dataproc:v1/Binding": binding +"/dataproc:v1/Binding/condition": condition +"/dataproc:v1/Binding/members": members +"/dataproc:v1/Binding/members/member": member +"/dataproc:v1/Binding/role": role "/dataproc:v1/CancelJobRequest": cancel_job_request "/dataproc:v1/Cluster": cluster "/dataproc:v1/Cluster/clusterName": cluster_name @@ -38988,6 +38993,7 @@ "/dataproc:v1/Cluster/statusHistory/status_history": status_history "/dataproc:v1/ClusterConfig": cluster_config "/dataproc:v1/ClusterConfig/configBucket": config_bucket +"/dataproc:v1/ClusterConfig/encryptionConfig": encryption_config "/dataproc:v1/ClusterConfig/gceClusterConfig": gce_cluster_config "/dataproc:v1/ClusterConfig/initializationActions": initialization_actions "/dataproc:v1/ClusterConfig/initializationActions/initialization_action": initialization_action @@ -39034,6 +39040,13 @@ "/dataproc:v1/DiskConfig/bootDiskType": boot_disk_type "/dataproc:v1/DiskConfig/numLocalSsds": num_local_ssds "/dataproc:v1/Empty": empty +"/dataproc:v1/EncryptionConfig": encryption_config +"/dataproc:v1/EncryptionConfig/gcePdKmsKeyName": gce_pd_kms_key_name +"/dataproc:v1/Expr": expr +"/dataproc:v1/Expr/description": description +"/dataproc:v1/Expr/expression": expression +"/dataproc:v1/Expr/location": location +"/dataproc:v1/Expr/title": title "/dataproc:v1/GceClusterConfig": gce_cluster_config "/dataproc:v1/GceClusterConfig/internalIpOnly": internal_ip_only "/dataproc:v1/GceClusterConfig/metadata": metadata @@ -39046,6 +39059,7 @@ "/dataproc:v1/GceClusterConfig/tags": tags "/dataproc:v1/GceClusterConfig/tags/tag": tag "/dataproc:v1/GceClusterConfig/zoneUri": zone_uri +"/dataproc:v1/GetIamPolicyRequest": get_iam_policy_request "/dataproc:v1/HadoopJob": hadoop_job "/dataproc:v1/HadoopJob/archiveUris": archive_uris "/dataproc:v1/HadoopJob/archiveUris/archive_uri": archive_uri @@ -39153,6 +39167,11 @@ "/dataproc:v1/PigJob/queryList": query_list "/dataproc:v1/PigJob/scriptVariables": script_variables "/dataproc:v1/PigJob/scriptVariables/script_variable": script_variable +"/dataproc:v1/Policy": policy +"/dataproc:v1/Policy/bindings": bindings +"/dataproc:v1/Policy/bindings/binding": binding +"/dataproc:v1/Policy/etag": etag +"/dataproc:v1/Policy/version": version "/dataproc:v1/PySparkJob": py_spark_job "/dataproc:v1/PySparkJob/archiveUris": archive_uris "/dataproc:v1/PySparkJob/archiveUris/archive_uri": archive_uri @@ -39171,6 +39190,8 @@ "/dataproc:v1/QueryList": query_list "/dataproc:v1/QueryList/queries": queries "/dataproc:v1/QueryList/queries/query": query +"/dataproc:v1/SetIamPolicyRequest": set_iam_policy_request +"/dataproc:v1/SetIamPolicyRequest/policy": policy "/dataproc:v1/SoftwareConfig": software_config "/dataproc:v1/SoftwareConfig/imageVersion": image_version "/dataproc:v1/SoftwareConfig/properties": properties @@ -39208,6 +39229,12 @@ "/dataproc:v1/SubmitJobRequest": submit_job_request "/dataproc:v1/SubmitJobRequest/job": job "/dataproc:v1/SubmitJobRequest/requestId": request_id +"/dataproc:v1/TestIamPermissionsRequest": test_iam_permissions_request +"/dataproc:v1/TestIamPermissionsRequest/permissions": permissions +"/dataproc:v1/TestIamPermissionsRequest/permissions/permission": permission +"/dataproc:v1/TestIamPermissionsResponse": test_iam_permissions_response +"/dataproc:v1/TestIamPermissionsResponse/permissions": permissions +"/dataproc:v1/TestIamPermissionsResponse/permissions/permission": permission "/dataproc:v1/WorkflowGraph": workflow_graph "/dataproc:v1/WorkflowGraph/nodes": nodes "/dataproc:v1/WorkflowGraph/nodes/node": node @@ -39233,6 +39260,12 @@ "/dataproc:v1/YarnApplication/progress": progress "/dataproc:v1/YarnApplication/state": state "/dataproc:v1/YarnApplication/trackingUrl": tracking_url +"/dataproc:v1/dataproc.projects.locations.workflowTemplates.getIamPolicy": get_project_location_workflow_template_iam_policy +"/dataproc:v1/dataproc.projects.locations.workflowTemplates.getIamPolicy/resource": resource +"/dataproc:v1/dataproc.projects.locations.workflowTemplates.setIamPolicy": set_project_location_workflow_template_iam_policy +"/dataproc:v1/dataproc.projects.locations.workflowTemplates.setIamPolicy/resource": resource +"/dataproc:v1/dataproc.projects.locations.workflowTemplates.testIamPermissions": test_project_location_workflow_template_iam_permissions +"/dataproc:v1/dataproc.projects.locations.workflowTemplates.testIamPermissions/resource": resource "/dataproc:v1/dataproc.projects.regions.clusters.create": create_cluster "/dataproc:v1/dataproc.projects.regions.clusters.create/projectId": project_id "/dataproc:v1/dataproc.projects.regions.clusters.create/region": region @@ -39251,6 +39284,8 @@ "/dataproc:v1/dataproc.projects.regions.clusters.get/clusterName": cluster_name "/dataproc:v1/dataproc.projects.regions.clusters.get/projectId": project_id "/dataproc:v1/dataproc.projects.regions.clusters.get/region": region +"/dataproc:v1/dataproc.projects.regions.clusters.getIamPolicy": get_cluster_iam_policy +"/dataproc:v1/dataproc.projects.regions.clusters.getIamPolicy/resource": resource "/dataproc:v1/dataproc.projects.regions.clusters.list": list_clusters "/dataproc:v1/dataproc.projects.regions.clusters.list/filter": filter "/dataproc:v1/dataproc.projects.regions.clusters.list/pageSize": page_size @@ -39264,6 +39299,10 @@ "/dataproc:v1/dataproc.projects.regions.clusters.patch/region": region "/dataproc:v1/dataproc.projects.regions.clusters.patch/requestId": request_id "/dataproc:v1/dataproc.projects.regions.clusters.patch/updateMask": update_mask +"/dataproc:v1/dataproc.projects.regions.clusters.setIamPolicy": set_cluster_iam_policy +"/dataproc:v1/dataproc.projects.regions.clusters.setIamPolicy/resource": resource +"/dataproc:v1/dataproc.projects.regions.clusters.testIamPermissions": test_cluster_iam_permissions +"/dataproc:v1/dataproc.projects.regions.clusters.testIamPermissions/resource": resource "/dataproc:v1/dataproc.projects.regions.jobs.cancel": cancel_job "/dataproc:v1/dataproc.projects.regions.jobs.cancel/jobId": job_id "/dataproc:v1/dataproc.projects.regions.jobs.cancel/projectId": project_id @@ -39276,6 +39315,8 @@ "/dataproc:v1/dataproc.projects.regions.jobs.get/jobId": job_id "/dataproc:v1/dataproc.projects.regions.jobs.get/projectId": project_id "/dataproc:v1/dataproc.projects.regions.jobs.get/region": region +"/dataproc:v1/dataproc.projects.regions.jobs.getIamPolicy": get_job_iam_policy +"/dataproc:v1/dataproc.projects.regions.jobs.getIamPolicy/resource": resource "/dataproc:v1/dataproc.projects.regions.jobs.list": list_jobs "/dataproc:v1/dataproc.projects.regions.jobs.list/clusterName": cluster_name "/dataproc:v1/dataproc.projects.regions.jobs.list/filter": filter @@ -39289,20 +39330,36 @@ "/dataproc:v1/dataproc.projects.regions.jobs.patch/projectId": project_id "/dataproc:v1/dataproc.projects.regions.jobs.patch/region": region "/dataproc:v1/dataproc.projects.regions.jobs.patch/updateMask": update_mask +"/dataproc:v1/dataproc.projects.regions.jobs.setIamPolicy": set_job_iam_policy +"/dataproc:v1/dataproc.projects.regions.jobs.setIamPolicy/resource": resource "/dataproc:v1/dataproc.projects.regions.jobs.submit": submit_job "/dataproc:v1/dataproc.projects.regions.jobs.submit/projectId": project_id "/dataproc:v1/dataproc.projects.regions.jobs.submit/region": region +"/dataproc:v1/dataproc.projects.regions.jobs.testIamPermissions": test_job_iam_permissions +"/dataproc:v1/dataproc.projects.regions.jobs.testIamPermissions/resource": resource "/dataproc:v1/dataproc.projects.regions.operations.cancel": cancel_operation "/dataproc:v1/dataproc.projects.regions.operations.cancel/name": name "/dataproc:v1/dataproc.projects.regions.operations.delete": delete_operation "/dataproc:v1/dataproc.projects.regions.operations.delete/name": name "/dataproc:v1/dataproc.projects.regions.operations.get": get_operation "/dataproc:v1/dataproc.projects.regions.operations.get/name": name +"/dataproc:v1/dataproc.projects.regions.operations.getIamPolicy": get_operation_iam_policy +"/dataproc:v1/dataproc.projects.regions.operations.getIamPolicy/resource": resource "/dataproc:v1/dataproc.projects.regions.operations.list": list_operations "/dataproc:v1/dataproc.projects.regions.operations.list/filter": filter "/dataproc:v1/dataproc.projects.regions.operations.list/name": name "/dataproc:v1/dataproc.projects.regions.operations.list/pageSize": page_size "/dataproc:v1/dataproc.projects.regions.operations.list/pageToken": page_token +"/dataproc:v1/dataproc.projects.regions.operations.setIamPolicy": set_operation_iam_policy +"/dataproc:v1/dataproc.projects.regions.operations.setIamPolicy/resource": resource +"/dataproc:v1/dataproc.projects.regions.operations.testIamPermissions": test_operation_iam_permissions +"/dataproc:v1/dataproc.projects.regions.operations.testIamPermissions/resource": resource +"/dataproc:v1/dataproc.projects.regions.workflowTemplates.getIamPolicy": get_project_region_workflow_template_iam_policy +"/dataproc:v1/dataproc.projects.regions.workflowTemplates.getIamPolicy/resource": resource +"/dataproc:v1/dataproc.projects.regions.workflowTemplates.setIamPolicy": set_project_region_workflow_template_iam_policy +"/dataproc:v1/dataproc.projects.regions.workflowTemplates.setIamPolicy/resource": resource +"/dataproc:v1/dataproc.projects.regions.workflowTemplates.testIamPermissions": test_project_region_workflow_template_iam_permissions +"/dataproc:v1/dataproc.projects.regions.workflowTemplates.testIamPermissions/resource": resource "/dataproc:v1/fields": fields "/dataproc:v1/key": key "/dataproc:v1/quotaUser": quota_user @@ -56592,6 +56649,21 @@ "/dialogflow:v2beta1/dialogflow.projects.agent.sessions.entityTypes.patch/updateMask": update_mask "/dialogflow:v2beta1/dialogflow.projects.agent.train": train_agent "/dialogflow:v2beta1/dialogflow.projects.agent.train/parent": parent +"/dialogflow:v2beta1/dialogflow.projects.conversations.contexts.create": create_project_conversation_context +"/dialogflow:v2beta1/dialogflow.projects.conversations.contexts.create/parent": parent +"/dialogflow:v2beta1/dialogflow.projects.conversations.contexts.delete": delete_project_conversation_context +"/dialogflow:v2beta1/dialogflow.projects.conversations.contexts.delete/name": name +"/dialogflow:v2beta1/dialogflow.projects.conversations.contexts.get": get_project_conversation_context +"/dialogflow:v2beta1/dialogflow.projects.conversations.contexts.get/name": name +"/dialogflow:v2beta1/dialogflow.projects.conversations.contexts.list": list_project_conversation_contexts +"/dialogflow:v2beta1/dialogflow.projects.conversations.contexts.list/pageSize": page_size +"/dialogflow:v2beta1/dialogflow.projects.conversations.contexts.list/pageToken": page_token +"/dialogflow:v2beta1/dialogflow.projects.conversations.contexts.list/parent": parent +"/dialogflow:v2beta1/dialogflow.projects.conversations.contexts.patch": patch_project_conversation_context +"/dialogflow:v2beta1/dialogflow.projects.conversations.contexts.patch/name": name +"/dialogflow:v2beta1/dialogflow.projects.conversations.contexts.patch/updateMask": update_mask +"/dialogflow:v2beta1/dialogflow.projects.conversations.deleteContexts": delete_project_conversation_contexts +"/dialogflow:v2beta1/dialogflow.projects.conversations.deleteContexts/parent": parent "/dialogflow:v2beta1/dialogflow.projects.getAgent": get_project_agent "/dialogflow:v2beta1/dialogflow.projects.getAgent/parent": parent "/dialogflow:v2beta1/dialogflow.projects.knowledgeBases.create": create_project_knowledge_basis @@ -81246,6 +81318,7 @@ "/storage:v1/Bucket/lifecycle/rule/rule/condition/age": age "/storage:v1/Bucket/lifecycle/rule/rule/condition/createdBefore": created_before "/storage:v1/Bucket/lifecycle/rule/rule/condition/isLive": is_live +"/storage:v1/Bucket/lifecycle/rule/rule/condition/matchesPattern": matches_pattern "/storage:v1/Bucket/lifecycle/rule/rule/condition/matchesStorageClass": matches_storage_class "/storage:v1/Bucket/lifecycle/rule/rule/condition/matchesStorageClass/matches_storage_class": matches_storage_class "/storage:v1/Bucket/lifecycle/rule/rule/condition/numNewerVersions": num_newer_versions diff --git a/generated/google/apis/dataproc_v1.rb b/generated/google/apis/dataproc_v1.rb index b36889c3e..431b3f287 100644 --- a/generated/google/apis/dataproc_v1.rb +++ b/generated/google/apis/dataproc_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/dataproc/ module DataprocV1 VERSION = 'V1' - REVISION = '20180702' + REVISION = '20180824' # 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/dataproc_v1/classes.rb b/generated/google/apis/dataproc_v1/classes.rb index df054efe4..0f6c7dbbd 100644 --- a/generated/google/apis/dataproc_v1/classes.rb +++ b/generated/google/apis/dataproc_v1/classes.rb @@ -55,6 +55,54 @@ module Google end end + # Associates members with a role. + class Binding + include Google::Apis::Core::Hashable + + # Represents an expression text. Example: + # title: "User account presence" + # description: "Determines whether the request has a user account" + # expression: "size(request.user) > 0" + # Corresponds to the JSON property `condition` + # @return [Google::Apis::DataprocV1::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@gmail.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. + # domain:`domain`: A Google Apps domain name 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 request to cancel a job. class CancelJobRequest include Google::Apis::Core::Hashable @@ -152,6 +200,11 @@ module Google # @return [String] attr_accessor :config_bucket + # Encryption settings for the cluster. + # Corresponds to the JSON property `encryptionConfig` + # @return [Google::Apis::DataprocV1::EncryptionConfig] + attr_accessor :encryption_config + # Common config settings for resources of Compute Engine cluster instances, # applicable to all instances in the cluster. # Corresponds to the JSON property `gceClusterConfig` @@ -203,6 +256,7 @@ module Google # Update properties of this object def update!(**args) @config_bucket = args[:config_bucket] if args.key?(:config_bucket) + @encryption_config = args[:encryption_config] if args.key?(:encryption_config) @gce_cluster_config = args[:gce_cluster_config] if args.key?(:gce_cluster_config) @initialization_actions = args[:initialization_actions] if args.key?(:initialization_actions) @master_config = args[:master_config] if args.key?(:master_config) @@ -496,6 +550,71 @@ module Google end end + # Encryption settings for the cluster. + class EncryptionConfig + include Google::Apis::Core::Hashable + + # Optional. The Cloud KMS key name to use for PD disk encryption for all + # instances in the cluster. + # Corresponds to the JSON property `gcePdKmsKeyName` + # @return [String] + attr_accessor :gce_pd_kms_key_name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @gce_pd_kms_key_name = args[:gce_pd_kms_key_name] if args.key?(:gce_pd_kms_key_name) + end + end + + # Represents an expression text. Example: + # title: "User account presence" + # description: "Determines whether the request has a user account" + # expression: "size(request.user) > 0" + class Expr + include Google::Apis::Core::Hashable + + # An 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. + # The application context of the containing message determines which well-known + # feature set of CEL is supported. + # Corresponds to the JSON property `expression` + # @return [String] + attr_accessor :expression + + # An 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 + + # An 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 + # Common config settings for resources of Compute Engine cluster instances, # applicable to all instances in the cluster. class GceClusterConfig @@ -602,6 +721,19 @@ module Google end end + # Request message for GetIamPolicy method. + class GetIamPolicyRequest + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + # A Cloud Dataproc job for running Apache Hadoop MapReduce (https://hadoop. # apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/ # MapReduceTutorial.html) jobs on Apache Hadoop YARN (https://hadoop.apache.org/ @@ -1358,6 +1490,80 @@ module Google end end + # Defines an Identity and Access Management (IAM) policy. It is used to specify + # access control policies for Cloud Platform resources.A Policy consists of a + # list of bindings. A binding binds a list of members to a role, where the + # members can be user accounts, Google groups, Google domains, and service + # accounts. A role is a named list of permissions defined by IAM.JSON Example + # ` + # "bindings": [ + # ` + # "role": "roles/owner", + # "members": [ + # "user:mike@example.com", + # "group:admins@example.com", + # "domain:google.com", + # "serviceAccount:my-other-app@appspot.gserviceaccount.com" + # ] + # `, + # ` + # "role": "roles/viewer", + # "members": ["user:sean@example.com"] + # ` + # ] + # ` + # YAML Example + # bindings: + # - members: + # - user:mike@example.com + # - group:admins@example.com + # - domain:google.com + # - serviceAccount:my-other-app@appspot.gserviceaccount.com + # role: roles/owner + # - members: + # - user:sean@example.com + # role: roles/viewer + # For a description of IAM and its features, see the IAM developer's guide ( + # https://cloud.google.com/iam/docs). + class Policy + include Google::Apis::Core::Hashable + + # Associates a list of members to a role. bindings with no members will result + # in an error. + # 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.If no etag is provided in the call to setIamPolicy, + # then the existing policy is overwritten blindly. + # Corresponds to the JSON property `etag` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :etag + + # Deprecated. + # 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 Cloud Dataproc job for running Apache PySpark (https://spark.apache.org/docs/ # 0.9.0/python-programming-guide.html) applications on YARN. class PySparkJob @@ -1461,6 +1667,59 @@ module Google end end + # Request message for SetIamPolicy method. + class SetIamPolicyRequest + include Google::Apis::Core::Hashable + + # Defines an Identity and Access Management (IAM) policy. It is used to specify + # access control policies for Cloud Platform resources.A Policy consists of a + # list of bindings. A binding binds a list of members to a role, where the + # members can be user accounts, Google groups, Google domains, and service + # accounts. A role is a named list of permissions defined by IAM.JSON Example + # ` + # "bindings": [ + # ` + # "role": "roles/owner", + # "members": [ + # "user:mike@example.com", + # "group:admins@example.com", + # "domain:google.com", + # "serviceAccount:my-other-app@appspot.gserviceaccount.com" + # ] + # `, + # ` + # "role": "roles/viewer", + # "members": ["user:sean@example.com"] + # ` + # ] + # ` + # YAML Example + # bindings: + # - members: + # - user:mike@example.com + # - group:admins@example.com + # - domain:google.com + # - serviceAccount:my-other-app@appspot.gserviceaccount.com + # role: roles/owner + # - members: + # - user:sean@example.com + # role: roles/viewer + # For a description of IAM and its features, see the IAM developer's guide ( + # https://cloud.google.com/iam/docs). + # Corresponds to the JSON property `policy` + # @return [Google::Apis::DataprocV1::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 + # Specifies the selection and config of software inside the cluster. class SoftwareConfig include Google::Apis::Core::Hashable @@ -1723,6 +1982,46 @@ module Google 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 workflow graph. class WorkflowGraph include Google::Apis::Core::Hashable diff --git a/generated/google/apis/dataproc_v1/representations.rb b/generated/google/apis/dataproc_v1/representations.rb index cde5090a4..74b3ab39c 100644 --- a/generated/google/apis/dataproc_v1/representations.rb +++ b/generated/google/apis/dataproc_v1/representations.rb @@ -28,6 +28,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class Binding + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class CancelJobRequest class Representation < Google::Apis::Core::JsonRepresentation; end @@ -100,12 +106,30 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class EncryptionConfig + 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 GceClusterConfig class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class GetIamPolicyRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class HadoopJob class Representation < Google::Apis::Core::JsonRepresentation; end @@ -202,6 +226,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class Policy + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class PySparkJob class Representation < Google::Apis::Core::JsonRepresentation; end @@ -214,6 +244,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class SetIamPolicyRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class SoftwareConfig class Representation < Google::Apis::Core::JsonRepresentation; end @@ -244,6 +280,18 @@ module Google 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 WorkflowGraph class Representation < Google::Apis::Core::JsonRepresentation; end @@ -276,6 +324,16 @@ module Google end end + class Binding + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :condition, as: 'condition', class: Google::Apis::DataprocV1::Expr, decorator: Google::Apis::DataprocV1::Expr::Representation + + collection :members, as: 'members' + property :role, as: 'role' + end + end + class CancelJobRequest # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -304,6 +362,8 @@ module Google # @private class Representation < Google::Apis::Core::JsonRepresentation property :config_bucket, as: 'configBucket' + property :encryption_config, as: 'encryptionConfig', class: Google::Apis::DataprocV1::EncryptionConfig, decorator: Google::Apis::DataprocV1::EncryptionConfig::Representation + property :gce_cluster_config, as: 'gceClusterConfig', class: Google::Apis::DataprocV1::GceClusterConfig, decorator: Google::Apis::DataprocV1::GceClusterConfig::Representation collection :initialization_actions, as: 'initializationActions', class: Google::Apis::DataprocV1::NodeInitializationAction, decorator: Google::Apis::DataprocV1::NodeInitializationAction::Representation @@ -400,6 +460,23 @@ module Google end end + class EncryptionConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :gce_pd_kms_key_name, as: 'gcePdKmsKeyName' + 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 GceClusterConfig # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -414,6 +491,12 @@ module Google end end + class GetIamPolicyRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + class HadoopJob # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -602,6 +685,16 @@ module Google end end + class Policy + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :bindings, as: 'bindings', class: Google::Apis::DataprocV1::Binding, decorator: Google::Apis::DataprocV1::Binding::Representation + + property :etag, :base64 => true, as: 'etag' + property :version, as: 'version' + end + end + class PySparkJob # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -624,6 +717,14 @@ module Google end end + class SetIamPolicyRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :policy, as: 'policy', class: Google::Apis::DataprocV1::Policy, decorator: Google::Apis::DataprocV1::Policy::Representation + + end + end + class SoftwareConfig # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -679,6 +780,20 @@ module Google 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 WorkflowGraph # @private class Representation < Google::Apis::Core::JsonRepresentation diff --git a/generated/google/apis/dataproc_v1/service.rb b/generated/google/apis/dataproc_v1/service.rb index 10979a055..14d95492c 100644 --- a/generated/google/apis/dataproc_v1/service.rb +++ b/generated/google/apis/dataproc_v1/service.rb @@ -47,6 +47,114 @@ module Google @batch_path = 'batch' 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 [Google::Apis::DataprocV1::GetIamPolicyRequest] get_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::DataprocV1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DataprocV1::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_workflow_template_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options) + command.request_representation = Google::Apis::DataprocV1::GetIamPolicyRequest::Representation + command.request_object = get_iam_policy_request_object + command.response_representation = Google::Apis::DataprocV1::Policy::Representation + command.response_class = Google::Apis::DataprocV1::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 + + # Sets the access control policy on the specified resource. Replaces any + # existing policy. + # @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::DataprocV1::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::DataprocV1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DataprocV1::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_project_location_workflow_template_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::DataprocV1::SetIamPolicyRequest::Representation + command.request_object = set_iam_policy_request_object + command.response_representation = Google::Apis::DataprocV1::Policy::Representation + command.response_class = Google::Apis::DataprocV1::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::DataprocV1::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::DataprocV1::TestIamPermissionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DataprocV1::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_project_location_workflow_template_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::DataprocV1::TestIamPermissionsRequest::Representation + command.request_object = test_iam_permissions_request_object + command.response_representation = Google::Apis::DataprocV1::TestIamPermissionsResponse::Representation + command.response_class = Google::Apis::DataprocV1::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 + # Creates a cluster in a project. # @param [String] project_id # Required. The ID of the Google Cloud Platform project that the cluster belongs @@ -221,6 +329,41 @@ module Google 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 [Google::Apis::DataprocV1::GetIamPolicyRequest] get_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::DataprocV1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DataprocV1::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_cluster_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options) + command.request_representation = Google::Apis::DataprocV1::GetIamPolicyRequest::Representation + command.request_object = get_iam_policy_request_object + command.response_representation = Google::Apis::DataprocV1::Policy::Representation + command.response_class = Google::Apis::DataprocV1::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 + # Lists all regions/`region`/clusters in a project. # @param [String] project_id # Required. The ID of the Google Cloud Platform project that the cluster belongs @@ -360,6 +503,79 @@ module Google execute_or_queue_command(command, &block) end + # Sets the access control policy on the specified resource. Replaces any + # existing policy. + # @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::DataprocV1::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::DataprocV1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DataprocV1::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_cluster_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::DataprocV1::SetIamPolicyRequest::Representation + command.request_object = set_iam_policy_request_object + command.response_representation = Google::Apis::DataprocV1::Policy::Representation + command.response_class = Google::Apis::DataprocV1::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::DataprocV1::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::DataprocV1::TestIamPermissionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DataprocV1::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_cluster_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::DataprocV1::TestIamPermissionsRequest::Representation + command.request_object = test_iam_permissions_request_object + command.response_representation = Google::Apis::DataprocV1::TestIamPermissionsResponse::Representation + command.response_class = Google::Apis::DataprocV1::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 a job cancellation request. To access the job resource after # cancellation, call regions/`region`/jobs.list or regions/`region`/jobs.get. # @param [String] project_id @@ -473,6 +689,41 @@ module Google 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 [Google::Apis::DataprocV1::GetIamPolicyRequest] get_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::DataprocV1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DataprocV1::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_job_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options) + command.request_representation = Google::Apis::DataprocV1::GetIamPolicyRequest::Representation + command.request_object = get_iam_policy_request_object + command.response_representation = Google::Apis::DataprocV1::Policy::Representation + command.response_class = Google::Apis::DataprocV1::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 + # Lists regions/`region`/jobs in a project. # @param [String] project_id # Required. The ID of the Google Cloud Platform project that the job belongs to. @@ -576,6 +827,41 @@ module Google execute_or_queue_command(command, &block) end + # Sets the access control policy on the specified resource. Replaces any + # existing policy. + # @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::DataprocV1::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::DataprocV1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DataprocV1::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_job_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::DataprocV1::SetIamPolicyRequest::Representation + command.request_object = set_iam_policy_request_object + command.response_representation = Google::Apis::DataprocV1::Policy::Representation + command.response_class = Google::Apis::DataprocV1::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 + # Submits a job to a cluster. # @param [String] project_id # Required. The ID of the Google Cloud Platform project that the job belongs to. @@ -612,6 +898,44 @@ module Google 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::DataprocV1::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::DataprocV1::TestIamPermissionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DataprocV1::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_job_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::DataprocV1::TestIamPermissionsRequest::Representation + command.request_object = test_iam_permissions_request_object + command.response_representation = Google::Apis::DataprocV1::TestIamPermissionsResponse::Representation + command.response_class = Google::Apis::DataprocV1::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. @@ -713,6 +1037,41 @@ module Google 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 [Google::Apis::DataprocV1::GetIamPolicyRequest] get_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::DataprocV1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DataprocV1::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_operation_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options) + command.request_representation = Google::Apis::DataprocV1::GetIamPolicyRequest::Representation + command.request_object = get_iam_policy_request_object + command.response_representation = Google::Apis::DataprocV1::Policy::Representation + command.response_class = Google::Apis::DataprocV1::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 + # 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 @@ -758,6 +1117,187 @@ module Google 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. + # @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::DataprocV1::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::DataprocV1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DataprocV1::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_operation_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::DataprocV1::SetIamPolicyRequest::Representation + command.request_object = set_iam_policy_request_object + command.response_representation = Google::Apis::DataprocV1::Policy::Representation + command.response_class = Google::Apis::DataprocV1::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::DataprocV1::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::DataprocV1::TestIamPermissionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DataprocV1::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_operation_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::DataprocV1::TestIamPermissionsRequest::Representation + command.request_object = test_iam_permissions_request_object + command.response_representation = Google::Apis::DataprocV1::TestIamPermissionsResponse::Representation + command.response_class = Google::Apis::DataprocV1::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 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 [Google::Apis::DataprocV1::GetIamPolicyRequest] get_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::DataprocV1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DataprocV1::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_region_workflow_template_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options) + command.request_representation = Google::Apis::DataprocV1::GetIamPolicyRequest::Representation + command.request_object = get_iam_policy_request_object + command.response_representation = Google::Apis::DataprocV1::Policy::Representation + command.response_class = Google::Apis::DataprocV1::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 + + # Sets the access control policy on the specified resource. Replaces any + # existing policy. + # @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::DataprocV1::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::DataprocV1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DataprocV1::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_project_region_workflow_template_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::DataprocV1::SetIamPolicyRequest::Representation + command.request_object = set_iam_policy_request_object + command.response_representation = Google::Apis::DataprocV1::Policy::Representation + command.response_class = Google::Apis::DataprocV1::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::DataprocV1::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::DataprocV1::TestIamPermissionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DataprocV1::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_project_region_workflow_template_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::DataprocV1::TestIamPermissionsRequest::Representation + command.request_object = test_iam_permissions_request_object + command.response_representation = Google::Apis::DataprocV1::TestIamPermissionsResponse::Representation + command.response_class = Google::Apis::DataprocV1::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 protected diff --git a/generated/google/apis/dataproc_v1beta2.rb b/generated/google/apis/dataproc_v1beta2.rb index f94f3aaa3..2ba7ee381 100644 --- a/generated/google/apis/dataproc_v1beta2.rb +++ b/generated/google/apis/dataproc_v1beta2.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/dataproc/ module DataprocV1beta2 VERSION = 'V1beta2' - REVISION = '20180803' + REVISION = '20180824' # 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/dialogflow_v2beta1.rb b/generated/google/apis/dialogflow_v2beta1.rb index fb3551723..4cb4fb8cb 100644 --- a/generated/google/apis/dialogflow_v2beta1.rb +++ b/generated/google/apis/dialogflow_v2beta1.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/dialogflow-enterprise/ module DialogflowV2beta1 VERSION = 'V2beta1' - REVISION = '20180814' + REVISION = '20180828' # 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/dialogflow_v2beta1/classes.rb b/generated/google/apis/dialogflow_v2beta1/classes.rb index 862a3c79b..439dd4857 100644 --- a/generated/google/apis/dialogflow_v2beta1/classes.rb +++ b/generated/google/apis/dialogflow_v2beta1/classes.rb @@ -3877,9 +3877,6 @@ module Google # Optional. KnowledgeBases to get alternative results from. If not set, the # KnowledgeBases enabled in the agent (through UI) will be used. # Format: `projects//knowledgeBases/`. - # Note: This field is `repeated` for forward compatibility, currently only - # the first one is supported, we may return an error if multiple - # KnowledgeBases are specified. # Corresponds to the JSON property `knowledgeBaseNames` # @return [Array] attr_accessor :knowledge_base_names diff --git a/generated/google/apis/dialogflow_v2beta1/service.rb b/generated/google/apis/dialogflow_v2beta1/service.rb index de7a83e7b..65a9ea3d6 100644 --- a/generated/google/apis/dialogflow_v2beta1/service.rb +++ b/generated/google/apis/dialogflow_v2beta1/service.rb @@ -2139,6 +2139,232 @@ module Google execute_or_queue_command(command, &block) end + # Deletes all active contexts in the specified session. + # @param [String] parent + # Required. The name of the session to delete all contexts from. Format: + # `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified we assume default 'draft' + # environment. If `User ID` is not specified, we assume default '-' user. + # @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::DialogflowV2beta1::GoogleProtobufEmpty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DialogflowV2beta1::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 delete_project_conversation_contexts(parent, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v2beta1/{+parent}/contexts', options) + command.response_representation = Google::Apis::DialogflowV2beta1::GoogleProtobufEmpty::Representation + command.response_class = Google::Apis::DialogflowV2beta1::GoogleProtobufEmpty + command.params['parent'] = parent unless parent.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 context. + # @param [String] parent + # Required. The session to create a context for. + # Format: `projects//agent/sessions/` or + # `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume + # default 'draft' environment. If `User ID` is not specified, we assume + # default '-' user. + # @param [Google::Apis::DialogflowV2beta1::GoogleCloudDialogflowV2beta1Context] google_cloud_dialogflow_v2beta1_context_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::DialogflowV2beta1::GoogleCloudDialogflowV2beta1Context] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DialogflowV2beta1::GoogleCloudDialogflowV2beta1Context] + # + # @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_conversation_context(parent, google_cloud_dialogflow_v2beta1_context_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2beta1/{+parent}/contexts', options) + command.request_representation = Google::Apis::DialogflowV2beta1::GoogleCloudDialogflowV2beta1Context::Representation + command.request_object = google_cloud_dialogflow_v2beta1_context_object + command.response_representation = Google::Apis::DialogflowV2beta1::GoogleCloudDialogflowV2beta1Context::Representation + command.response_class = Google::Apis::DialogflowV2beta1::GoogleCloudDialogflowV2beta1Context + command.params['parent'] = parent unless parent.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 the specified context. + # @param [String] name + # Required. The name of the context to delete. Format: + # `projects//agent/sessions//contexts/` + # or `projects//agent/environments//users//sessions//contexts/`. If `Environment ID` is + # not specified, we assume default 'draft' environment. If `User ID` is not + # specified, we assume default '-' user. + # @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::DialogflowV2beta1::GoogleProtobufEmpty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DialogflowV2beta1::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 delete_project_conversation_context(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v2beta1/{+name}', options) + command.response_representation = Google::Apis::DialogflowV2beta1::GoogleProtobufEmpty::Representation + command.response_class = Google::Apis::DialogflowV2beta1::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 + + # Retrieves the specified context. + # @param [String] name + # Required. The name of the context. Format: + # `projects//agent/sessions//contexts/` + # or `projects//agent/environments//users//sessions//contexts/`. If `Environment ID` is + # not specified, we assume default 'draft' environment. If `User ID` is not + # specified, we assume default '-' user. + # @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::DialogflowV2beta1::GoogleCloudDialogflowV2beta1Context] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DialogflowV2beta1::GoogleCloudDialogflowV2beta1Context] + # + # @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_conversation_context(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2beta1/{+name}', options) + command.response_representation = Google::Apis::DialogflowV2beta1::GoogleCloudDialogflowV2beta1Context::Representation + command.response_class = Google::Apis::DialogflowV2beta1::GoogleCloudDialogflowV2beta1Context + 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 + + # Returns the list of all contexts in the specified session. + # @param [String] parent + # Required. The session to list all contexts from. + # Format: `projects//agent/sessions/` or + # `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume + # default 'draft' environment. If `User ID` is not specified, we assume + # default '-' user. + # @param [Fixnum] page_size + # Optional. The maximum number of items to return in a single page. By + # default 100 and at most 1000. + # @param [String] page_token + # Optional. The next_page_token value returned from a previous list request. + # @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::DialogflowV2beta1::GoogleCloudDialogflowV2beta1ListContextsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DialogflowV2beta1::GoogleCloudDialogflowV2beta1ListContextsResponse] + # + # @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_conversation_contexts(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2beta1/{+parent}/contexts', options) + command.response_representation = Google::Apis::DialogflowV2beta1::GoogleCloudDialogflowV2beta1ListContextsResponse::Representation + command.response_class = Google::Apis::DialogflowV2beta1::GoogleCloudDialogflowV2beta1ListContextsResponse + 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 the specified context. + # @param [String] name + # 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. If `Environment ID` is not specified, we + # assume default 'draft' environment. If `User ID` is not specified, we + # assume default '-' user. + # @param [Google::Apis::DialogflowV2beta1::GoogleCloudDialogflowV2beta1Context] google_cloud_dialogflow_v2beta1_context_object + # @param [String] update_mask + # Optional. The mask to control which fields get updated. + # @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::DialogflowV2beta1::GoogleCloudDialogflowV2beta1Context] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DialogflowV2beta1::GoogleCloudDialogflowV2beta1Context] + # + # @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_conversation_context(name, google_cloud_dialogflow_v2beta1_context_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v2beta1/{+name}', options) + command.request_representation = Google::Apis::DialogflowV2beta1::GoogleCloudDialogflowV2beta1Context::Representation + command.request_object = google_cloud_dialogflow_v2beta1_context_object + command.response_representation = Google::Apis::DialogflowV2beta1::GoogleCloudDialogflowV2beta1Context::Representation + command.response_class = Google::Apis::DialogflowV2beta1::GoogleCloudDialogflowV2beta1Context + 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 + # Creates a knowledge base. # @param [String] parent # Required. The project to create a knowledge base for. diff --git a/generated/google/apis/mybusiness_v3.rb b/generated/google/apis/mybusiness_v3.rb deleted file mode 100644 index 75fd91ef9..000000000 --- a/generated/google/apis/mybusiness_v3.rb +++ /dev/null @@ -1,32 +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/mybusiness_v3/service.rb' -require 'google/apis/mybusiness_v3/classes.rb' -require 'google/apis/mybusiness_v3/representations.rb' - -module Google - module Apis - # Google My Business API - # - # The Google My Business API provides an interface for managing business - # location information on Google. - # - # @see https://developers.google.com/my-business/ - module MybusinessV3 - VERSION = 'V3' - REVISION = '0' - end - end -end diff --git a/generated/google/apis/mybusiness_v3/classes.rb b/generated/google/apis/mybusiness_v3/classes.rb deleted file mode 100644 index d692dc0ab..000000000 --- a/generated/google/apis/mybusiness_v3/classes.rb +++ /dev/null @@ -1,1864 +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 MybusinessV3 - - # An account is a container for your business's locations. If you are the only - # user who manages locations for your business, you can use your personal - # Google Account. To share management of locations with multiple users, - # [create a business account] - # (https://support.google.com/business/answer/6085339). - class Account - include Google::Apis::Core::Hashable - - # The name of the account. Note: For an account with AccountType `PERSONAL`, - # this is the first - # and last name of the user account. - # Corresponds to the JSON property `accountName` - # @return [String] - attr_accessor :account_name - - # The resource name, in the format `accounts/`account_id``. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Specifies the AccountRole - # the caller has for this account. - # @OutputOnly - # Corresponds to the JSON property `role` - # @return [String] - attr_accessor :role - - # Indicates status of the account, such as whether the account - # has been verified by Google. - # Corresponds to the JSON property `state` - # @return [Google::Apis::MybusinessV3::AccountState] - attr_accessor :state - - # Specifies the AccountType - # of this account. - # @OutputOnly - # 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) - @account_name = args[:account_name] if args.key?(:account_name) - @name = args[:name] if args.key?(:name) - @role = args[:role] if args.key?(:role) - @state = args[:state] if args.key?(:state) - @type = args[:type] if args.key?(:type) - end - end - - # Indicates status of the account, such as whether the account - # has been verified by Google. - class AccountState - include Google::Apis::Core::Hashable - - # If verified, future locations that are created are automatically - # be connected to maps, and have Google+ pages created, without requiring - # moderation. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @status = args[:status] if args.key?(:status) - end - end - - # Additional information that is surfaced in AdWords. - class AdWordsLocationExtensions - include Google::Apis::Core::Hashable - - # An alternate phone number to display on AdWords location extensions - # instead of the location's primary phone number. - # Corresponds to the JSON property `adPhone` - # @return [String] - attr_accessor :ad_phone - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @ad_phone = args[:ad_phone] if args.key?(:ad_phone) - end - end - - # Represents the physical location of the business. - # Example addresses: - # address_lines: "1600 Amphitheatre Parkway" - # locality: Mountain View - # administrative_area: CA - # country: US - # postal_code: 94043 - # address_lines: "A-205, Natasha Apartments", "2, Inner Ring Road" - # sub_locality: Domlur - # locality: Bangalore - # administrative_area: Karnataka - # country: IN - # postal_code: 560071 - class Address - include Google::Apis::Core::Hashable - - # The precise address information for the business below the sub-locality - # level. For most countries, the first line should include a street number - # and street name. Suite numbers, floors, building numbers, etc., may also be - # included. Imprecise information like cross-streets and nearby landmarks - # should only be included in regions where the official street address does - # not accurately pinpoint the business's location. Maximum 80 characters. - # Corresponds to the JSON property `addressLines` - # @return [Array] - attr_accessor :address_lines - - # The state or province where the business is located. Using the common - # abbreviation is generally preferred, such as CA for California or NSW - # for New South Wales. - # Not all countries require this field. Use the address editor in the - # product to determine whether it is appropriate for an address in a - # particular country. - # Also known as: - # "area" (Hong Kong), "county" (Ireland, Taiwan, United Kingdom), - # "department" (Colombia, Nicaragua), "district" (Indonesia), - # "do/si" (South Korea), "emirate" (United Arab Emirates), "island," - # "oblast" (Russia, Ukraine), "parish," "prefecture" (Japan). - # Examples: - # California (United States), Ontario (Canada), Uttar Pradesh (India). - # Maximum 80 characters. - # Corresponds to the JSON property `administrativeArea` - # @return [String] - attr_accessor :administrative_area - - # The ISO 3166-1 alpha-2 country code where the business is located. Once - # a location is created, the country cannot be changed. - # Corresponds to the JSON property `country` - # @return [String] - attr_accessor :country - - # The city or town where the business is located. - # Also known as: - # "district" (Hong Kong, Turkey), "post town" (United Kingdom). - # Examples: - # Chicago (United States), Berlin (Germany), London (United Kingdom). - # Maximum 80 characters. - # Corresponds to the JSON property `locality` - # @return [String] - attr_accessor :locality - - # The postal code of the business. If the postal code begins with zero, make - # sure that your formatting does not remove the zero as the first digit. - # Also known as: "zip code" (United States), "PIN code" (India). - # Corresponds to the JSON property `postalCode` - # @return [String] - attr_accessor :postal_code - - # The suburb where the business is located. This is the division just smaller - # than a locality (city). Previously referred to in Google My Business - # Locations as "district". Maximum 80 characters. - # Also known as: "district" (South Korea), "neighborhood" (Brazil, Mexico), - # "village / township" (Malaysia). - # Examples: - # Manhattan (United States), - # Centro (Mexico), - # Songpa District (South Korea.) - # Corresponds to the JSON property `subLocality` - # @return [String] - attr_accessor :sub_locality - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @address_lines = args[:address_lines] if args.key?(:address_lines) - @administrative_area = args[:administrative_area] if args.key?(:administrative_area) - @country = args[:country] if args.key?(:country) - @locality = args[:locality] if args.key?(:locality) - @postal_code = args[:postal_code] if args.key?(:postal_code) - @sub_locality = args[:sub_locality] if args.key?(:sub_locality) - end - end - - # An administrator of an Account, or a - # Location. - class Admin - include Google::Apis::Core::Hashable - - # The name of the admin. When making the initial invitation, this is the - # invitee's email address. On `GET` calls, the user's email address is - # returned if the invitation is still pending. Otherwise, it contains - # the user's first and last names. - # Corresponds to the JSON property `adminName` - # @return [String] - attr_accessor :admin_name - - # The resource name. For account admins, this is in the form: - # `accounts/`account_id`/admins/`admin_id`` - # For location admins, this is in the form: - # `accounts/`account_id`/locations/`location_id`/admins/`admin_id`` - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Indicates whether this admin has a pending invitation for the specified - # resource. - # @OutputOnly - # Corresponds to the JSON property `pendingInvitation` - # @return [Boolean] - attr_accessor :pending_invitation - alias_method :pending_invitation?, :pending_invitation - - # Specifies the AdminRole that this - # admin uses with the specified Account - # or Location resource. - # 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) - @admin_name = args[:admin_name] if args.key?(:admin_name) - @name = args[:name] if args.key?(:name) - @pending_invitation = args[:pending_invitation] if args.key?(:pending_invitation) - @role = args[:role] if args.key?(:role) - end - end - - # Request message for MyBusiness.AssociateLocationRequest to associate a - # location to a place or indicate no match. - class AssociateLocationRequest - include Google::Apis::Core::Hashable - - # The association to establish. If not set, it indicates no match. - # Corresponds to the JSON property `placeId` - # @return [String] - attr_accessor :place_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @place_id = args[:place_id] if args.key?(:place_id) - end - end - - # A location attribute. Attributes provide additional, information about a - # location. The attributes that can be set on a location may vary based on - # the properties of that location (e.g. category). Available attributes are - # determined by Google and may be added and removed without API changes. - class Attribute - include Google::Apis::Core::Hashable - - # The id of the attribute. Attribute ids are provided by Google. - # Corresponds to the JSON property `attributeId` - # @return [String] - attr_accessor :attribute_id - - # The type of value that this attribute contains. This should be used to - # determine how to interpret the value. - # @OutputOnly - # Corresponds to the JSON property `valueType` - # @return [String] - attr_accessor :value_type - - # The values for this attribute. The type of the values supplied must match - # that expected for that attribute, see AttributeValueType. This is a - # repeated field where multiple attribute values may be provided. Current - # attribute types only support one value, but future types may support - # multiple values. - # Corresponds to the JSON property `values` - # @return [Array] - attr_accessor :values - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @attribute_id = args[:attribute_id] if args.key?(:attribute_id) - @value_type = args[:value_type] if args.key?(:value_type) - @values = args[:values] if args.key?(:values) - end - end - - # Metadata for an attribute. Contains display information for the attribute, - # including a localised name and a heading for grouping related attributes - # together. - class AttributeMetadata - include Google::Apis::Core::Hashable - - # The id of the attribute. - # Corresponds to the JSON property `attributeId` - # @return [String] - attr_accessor :attribute_id - - # The localised display name for the attribute, if available, otherwise - # the English display name. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # The localised display name of the group that contains this attribute, if - # available, otherwise the English group name. Related attributes are - # collected into group and should be displayed together under the heading - # given here. - # Corresponds to the JSON property `groupDisplayName` - # @return [String] - attr_accessor :group_display_name - - # If true, the attribute supports multiple values. If false only a single - # value should be provided. - # Corresponds to the JSON property `isRepeatable` - # @return [Boolean] - attr_accessor :is_repeatable - alias_method :is_repeatable?, :is_repeatable - - # For some types of attributes (e.g. enums) a list of supported values and - # corresponding display names for those values is provided. - # Corresponds to the JSON property `valueMetadata` - # @return [Array] - attr_accessor :value_metadata - - # The value type for the attribute. Values set and retrieved should be - # expected to be of this type. - # Corresponds to the JSON property `valueType` - # @return [String] - attr_accessor :value_type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @attribute_id = args[:attribute_id] if args.key?(:attribute_id) - @display_name = args[:display_name] if args.key?(:display_name) - @group_display_name = args[:group_display_name] if args.key?(:group_display_name) - @is_repeatable = args[:is_repeatable] if args.key?(:is_repeatable) - @value_metadata = args[:value_metadata] if args.key?(:value_metadata) - @value_type = args[:value_type] if args.key?(:value_type) - end - end - - # Metadata for supported attribute values - class AttributeValueMetadata - include Google::Apis::Core::Hashable - - # The display name for this value, localised where available otherwise in - # English. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # The attribute value - # Corresponds to the JSON property `value` - # @return [Object] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @display_name = args[:display_name] if args.key?(:display_name) - @value = args[:value] if args.key?(:value) - end - end - - # - class BatchGetLocationsRequest - include Google::Apis::Core::Hashable - - # A collection of locations to fetch, specified by their names. - # Corresponds to the JSON property `locationNames` - # @return [Array] - attr_accessor :location_names - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @location_names = args[:location_names] if args.key?(:location_names) - end - end - - # - class BatchGetLocationsResponse - include Google::Apis::Core::Hashable - - # A collection of locations. - # Corresponds to the JSON property `locations` - # @return [Array] - attr_accessor :locations - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @locations = args[:locations] if args.key?(:locations) - end - end - - # Represents the time periods that this location is open for business. - # Holds a collection of TimePeriod - # instances. - class BusinessHours - include Google::Apis::Core::Hashable - - # A collection of times that this location is open for business. Each period - # represents a range of hours when the location is open during the week. - # Corresponds to the JSON property `periods` - # @return [Array] - attr_accessor :periods - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @periods = args[:periods] if args.key?(:periods) - end - end - - # A category describing what this business is (not what it does). For a list of - # valid category IDs, and the mappings to their human readable names, see - # the [category list](/my-business/content/categories). - class Category - include Google::Apis::Core::Hashable - - # A stable ID (provided by Google) for this category. While it is possible - # to populate only the `name` field in a category, setting the `category_id` - # field is - # preferred. - # If both fields are populated, the `category_id` takes precedence, and - # the supplied `name` field is ignored, and populated based on the - # value of this field. - # Corresponds to the JSON property `categoryId` - # @return [String] - attr_accessor :category_id - - # The human-readable name of the category. - # 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) - @category_id = args[:category_id] if args.key?(:category_id) - @name = args[:name] if args.key?(:name) - end - end - - # Request message for MyBusiness.ClearLocationAssociationRequest to clear - # the association between a location to its place ID. - class ClearLocationAssociationRequest - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # Represents a whole calendar date, e.g. date of birth. The time of day and - # time zone are either specified elsewhere or are not significant. The date - # is relative to the Proleptic Gregorian Calendar. The day may be 0 to - # represent a year and month where the day is not significant, e.g. credit card - # expiration date. The year may be 0 to represent a month and day independent - # of year, e.g. anniversary date. Related types are google.type.TimeOfDay - # and `google.protobuf.Timestamp`. - class Date - include Google::Apis::Core::Hashable - - # Day of month. Must be from 1 to 31 and valid for the year and month, or 0 - # if specifying a year/month where the day is not significant. - # Corresponds to the JSON property `day` - # @return [Fixnum] - attr_accessor :day - - # Month of year. Must be from 1 to 12. - # Corresponds to the JSON property `month` - # @return [Fixnum] - attr_accessor :month - - # Year of date. Must be from 1 to 9999, or 0 if specifying a date without - # a year. - # Corresponds to the JSON property `year` - # @return [Fixnum] - attr_accessor :year - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @day = args[:day] if args.key?(:day) - @month = args[:month] if args.key?(:month) - @year = args[:year] if args.key?(:year) - end - end - - # Information about the location that this location duplicates. - class Duplicate - include Google::Apis::Core::Hashable - - # The resource name of the location that this duplicates. Only populated - # if the authenticated user has access rights to that location and that - # location is not deleted. - # Corresponds to the JSON property `locationName` - # @return [String] - attr_accessor :location_name - - # Indicates the ownership status between this location and the location - # that it duplicates. - # Corresponds to the JSON property `ownership` - # @return [String] - attr_accessor :ownership - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @location_name = args[:location_name] if args.key?(:location_name) - @ownership = args[:ownership] if args.key?(:ownership) - 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 - - # Request message for MyBusiness.FindMatchingLocations. - class FindMatchingLocationsRequest - include Google::Apis::Core::Hashable - - # The preferred language for the matching location. - # Corresponds to the JSON property `languageCode` - # @return [String] - attr_accessor :language_code - - # Indicates the duration of acceptable cache-age. If omitted, will always - # return the cached data (if available). If the cache is older than the - # provided duration, or if a cached value is not available, results will be - # re-calculated and re-cached. - # Corresponds to the JSON property `maxCacheDuration` - # @return [String] - attr_accessor :max_cache_duration - - # The number of matches to return. The default value is 3, with a maximum - # of 10. Note that latency may increase if more are requested. There is no - # pagination. This field is only respected if the cache needs to be updated. - # Corresponds to the JSON property `numResults` - # @return [Fixnum] - attr_accessor :num_results - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @language_code = args[:language_code] if args.key?(:language_code) - @max_cache_duration = args[:max_cache_duration] if args.key?(:max_cache_duration) - @num_results = args[:num_results] if args.key?(:num_results) - end - end - - # Response message for MyBusiness.FindMatchingLocations - class FindMatchingLocationsResponse - include Google::Apis::Core::Hashable - - # When the matching algorithm was last executed for this location. - # Corresponds to the JSON property `matchTime` - # @return [String] - attr_accessor :match_time - - # A collection of locations that are potential matches to the specified - # location, listed in order from best to least match. If there is an exact - # match, it will be in the first position. - # Corresponds to the JSON property `matchedLocations` - # @return [Array] - attr_accessor :matched_locations - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @match_time = args[:match_time] if args.key?(:match_time) - @matched_locations = args[:matched_locations] if args.key?(:matched_locations) - end - end - - # Represents a location that was modified by Google. - class GoogleUpdatedLocation - include Google::Apis::Core::Hashable - - # The fields that Google updated. - # Corresponds to the JSON property `diffMask` - # @return [String] - attr_accessor :diff_mask - - # A location. - # See the [help center article] - # (https://support.google.com/business/answer/3038177) for a detailed - # description of these fields, or the [category - # list](/my-business/content/categories] for a list of valid business - # categories. - # Corresponds to the JSON property `location` - # @return [Google::Apis::MybusinessV3::Location] - attr_accessor :location - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @diff_mask = args[:diff_mask] if args.key?(:diff_mask) - @location = args[:location] if args.key?(:location) - end - end - - # An object representing a latitude/longitude pair. This is expressed as a pair - # of doubles representing degrees latitude and degrees longitude. Unless - # specified otherwise, this must conform to the - # WGS84 - # standard. Values must be within normalized ranges. - # Example of normalization code in Python: - # def NormalizeLongitude(longitude): - # """Wraps decimal degrees longitude to [-180.0, 180.0].""" - # q, r = divmod(longitude, 360.0) - # if r > 180.0 or (r == 180.0 and q <= -1.0): - # return r - 360.0 - # return r - # def NormalizeLatLng(latitude, longitude): - # """Wraps decimal degrees latitude and longitude to - # [-90.0, 90.0] and [-180.0, 180.0], respectively.""" - # r = latitude % 360.0 - # if r <= 90.0: - # return r, NormalizeLongitude(longitude) - # elif r >= 270.0: - # return r - 360, NormalizeLongitude(longitude) - # else: - # return 180 - r, NormalizeLongitude(longitude + 180.0) - # assert 180.0 == NormalizeLongitude(180.0) - # assert -180.0 == NormalizeLongitude(-180.0) - # assert -179.0 == NormalizeLongitude(181.0) - # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0) - # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0) - # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0) - # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0) - # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0) - # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0) - # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0) - # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) - # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) - # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) - class LatLng - include Google::Apis::Core::Hashable - - # The latitude in degrees. It must be in the range [-90.0, +90.0]. - # Corresponds to the JSON property `latitude` - # @return [Float] - attr_accessor :latitude - - # The longitude in degrees. It must be in the range [-180.0, +180.0]. - # Corresponds to the JSON property `longitude` - # @return [Float] - attr_accessor :longitude - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @latitude = args[:latitude] if args.key?(:latitude) - @longitude = args[:longitude] if args.key?(:longitude) - end - end - - # - class ListAccountAdminsResponse - include Google::Apis::Core::Hashable - - # A collection of Admin instances. - # Corresponds to the JSON property `admins` - # @return [Array] - attr_accessor :admins - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @admins = args[:admins] if args.key?(:admins) - end - end - - # - class ListAccountsResponse - include Google::Apis::Core::Hashable - - # A collection of accounts to which the user has access. - # Corresponds to the JSON property `accounts` - # @return [Array] - attr_accessor :accounts - - # If the number of accounts exceeds the requested page size, this field is - # populated with a token to fetch the next page of accounts on a - # subsequent call to `accounts.list`. If there are no more accounts, this field - # is not present in the response. - # 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) - @accounts = args[:accounts] if args.key?(:accounts) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - - # - class ListLocationAdminsResponse - include Google::Apis::Core::Hashable - - # A collection of Admin instances. - # Corresponds to the JSON property `admins` - # @return [Array] - attr_accessor :admins - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @admins = args[:admins] if args.key?(:admins) - end - end - - # - class ListLocationAttributeMetadataResponse - include Google::Apis::Core::Hashable - - # A collection of attribute metadata for the available attributes. - # Corresponds to the JSON property `attributes` - # @return [Array] - attr_accessor :attributes - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @attributes = args[:attributes] if args.key?(:attributes) - end - end - - # - class ListLocationsResponse - include Google::Apis::Core::Hashable - - # The locations - # Corresponds to the JSON property `locations` - # @return [Array] - attr_accessor :locations - - # If the number of locations exceeded the requested page size, this field - # is populated with a token to fetch the next page of locations on a - # subsequent call to ListLocations. If there are no more locations, this - # field is not be present in the response. - # 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 - - # Response message for MyBusiness.ListReviews. - class ListReviewsResponse - include Google::Apis::Core::Hashable - - # The average star rating of all reviews for this location - # on a scale of 1 to 5. - # Corresponds to the JSON property `averageRating` - # @return [Float] - attr_accessor :average_rating - - # If the number of reviews exceeded the requested page size, this field - # is populated with a token to fetch the next page of reviews on a - # subsequent call to ListReviews. If there are no more reviews, this - # field is not be present in the response. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # The reviews. - # Corresponds to the JSON property `reviews` - # @return [Array] - attr_accessor :reviews - - # The total number of reviews for this location. - # Corresponds to the JSON property `totalReviewCount` - # @return [Fixnum] - attr_accessor :total_review_count - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @average_rating = args[:average_rating] if args.key?(:average_rating) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @reviews = args[:reviews] if args.key?(:reviews) - @total_review_count = args[:total_review_count] if args.key?(:total_review_count) - end - end - - # A location. - # See the [help center article] - # (https://support.google.com/business/answer/3038177) for a detailed - # description of these fields, or the [category - # list](/my-business/content/categories] for a list of valid business - # categories. - class Location - include Google::Apis::Core::Hashable - - # Additional information that is surfaced in AdWords. - # Corresponds to the JSON property `adWordsLocationExtensions` - # @return [Google::Apis::MybusinessV3::AdWordsLocationExtensions] - attr_accessor :ad_words_location_extensions - - # Additional categories to describe your business. - # Categories help your customers find accurate, specific results for services - # they're interested in. In order to keep your business information accurate - # and live, make sure that you use as few categories as possible to describe - # your overall core business. - # Choose categories that are as specific as possible, but representative of - # your main business. - # Corresponds to the JSON property `additionalCategories` - # @return [Array] - attr_accessor :additional_categories - - # Up to two phone numbers (mobile or landline, no fax) at which your business - # can be called, in addition to your primary phone number. - # Corresponds to the JSON property `additionalPhones` - # @return [Array] - attr_accessor :additional_phones - - # Represents the physical location of the business. - # Example addresses: - # address_lines: "1600 Amphitheatre Parkway" - # locality: Mountain View - # administrative_area: CA - # country: US - # postal_code: 94043 - # address_lines: "A-205, Natasha Apartments", "2, Inner Ring Road" - # sub_locality: Domlur - # locality: Bangalore - # administrative_area: Karnataka - # country: IN - # postal_code: 560071 - # Corresponds to the JSON property `address` - # @return [Google::Apis::MybusinessV3::Address] - attr_accessor :address - - # Attributes for this location. - # Corresponds to the JSON property `attributes` - # @return [Array] - attr_accessor :attributes - - # A collection of free-form strings to allow you to tag your business. These - # labels are NOT user facing, and are only be seen by you. - # Limited to 255 characters (per label). - # Corresponds to the JSON property `labels` - # @return [Array] - attr_accessor :labels - - # An object representing a latitude/longitude pair. This is expressed as a pair - # of doubles representing degrees latitude and degrees longitude. Unless - # specified otherwise, this must conform to the - # WGS84 - # standard. Values must be within normalized ranges. - # Example of normalization code in Python: - # def NormalizeLongitude(longitude): - # """Wraps decimal degrees longitude to [-180.0, 180.0].""" - # q, r = divmod(longitude, 360.0) - # if r > 180.0 or (r == 180.0 and q <= -1.0): - # return r - 360.0 - # return r - # def NormalizeLatLng(latitude, longitude): - # """Wraps decimal degrees latitude and longitude to - # [-90.0, 90.0] and [-180.0, 180.0], respectively.""" - # r = latitude % 360.0 - # if r <= 90.0: - # return r, NormalizeLongitude(longitude) - # elif r >= 270.0: - # return r - 360, NormalizeLongitude(longitude) - # else: - # return 180 - r, NormalizeLongitude(longitude + 180.0) - # assert 180.0 == NormalizeLongitude(180.0) - # assert -180.0 == NormalizeLongitude(-180.0) - # assert -179.0 == NormalizeLongitude(181.0) - # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0) - # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0) - # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0) - # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0) - # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0) - # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0) - # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0) - # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) - # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) - # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) - # Corresponds to the JSON property `latlng` - # @return [Google::Apis::MybusinessV3::LatLng] - attr_accessor :latlng - - # Alternate / surrogate key references for a location. - # Corresponds to the JSON property `locationKey` - # @return [Google::Apis::MybusinessV3::LocationKey] - attr_accessor :location_key - - # Location name should reflect your business's real-world name, as used - # consistently on your storefront, website, and stationery, and as known to - # customers. - # Any additional information, when relevant, can be included in other - # fields of the resource (for example, `Address`, `Categories`). - # Do not add unnecessary information to your name (for example, prefer "Google" - # over - # "Google Inc. - Mountain View Corporate Headquarters"). - # It is NOT permitted to include marketing taglines, store codes, special - # characters, hours or - # closed/open status, phone numbers, website URLs, service/product - # information, location/address or directions, or containment information - # (for example, "Chase ATM in Duane Reade"). - # Corresponds to the JSON property `locationName` - # @return [String] - attr_accessor :location_name - - # Contains a set of booleans that reflect the state of a Location. - # Corresponds to the JSON property `locationState` - # @return [Google::Apis::MybusinessV3::LocationState] - attr_accessor :location_state - - # Additional non-user-editable information about the location. - # Corresponds to the JSON property `metadata` - # @return [Google::Apis::MybusinessV3::Metadata] - attr_accessor :metadata - - # Google identifier for this location in the form: - # `accounts/`account_id`/locations/`location_id`` - # In the context of matches, this field will not be populated. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Indicates whether the location is currently open for business. - # All locations are open by default, unless updated to be closed. - # Corresponds to the JSON property `openInfo` - # @return [Google::Apis::MybusinessV3::OpenInfo] - attr_accessor :open_info - - # A collection of photos representing the business, categorized by photo type. - # The URL for each photo should point to a publicly accessible image. - # Photos should be supplied in either JPG or PNG format unless specified - # otherwise. If the photo was added by using Google My Business Locations or - # this API, the user-provided URL is used. If the photo was uploaded via the - # Google My Business Photos App, the photo uses a generated URL hosted by - # Google. Exceptions: `profile_photo_url` and `cover_photo_url` are always - # under a Google domain. - # With the exception of profile_photo_url and cover_photo_url, all photos - # must measure a minimum of 250px on the short edge, with a file size of at - # least 10240 bytes. - # Corresponds to the JSON property `photos` - # @return [Google::Apis::MybusinessV3::Photos] - attr_accessor :photos - - # A category describing what this business is (not what it does). For a list of - # valid category IDs, and the mappings to their human readable names, see - # the [category list](/my-business/content/categories). - # Corresponds to the JSON property `primaryCategory` - # @return [Google::Apis::MybusinessV3::Category] - attr_accessor :primary_category - - # A phone number that connects to your individual business location - # as directly as possible. Use a local phone number instead of a central, - # call center helpline number whenever possible. - # Corresponds to the JSON property `primaryPhone` - # @return [String] - attr_accessor :primary_phone - - # Represents the time periods that this location is open for business. - # Holds a collection of TimePeriod - # instances. - # Corresponds to the JSON property `regularHours` - # @return [Google::Apis::MybusinessV3::BusinessHours] - attr_accessor :regular_hours - - # Service area businesses provide their service at the customer's location (for - # example a locksmith or plumber). - # Corresponds to the JSON property `serviceArea` - # @return [Google::Apis::MybusinessV3::ServiceAreaBusiness] - attr_accessor :service_area - - # Represents a set of time periods when a location's operational hours differ - # from its normal business hours. - # Corresponds to the JSON property `specialHours` - # @return [Google::Apis::MybusinessV3::SpecialHours] - attr_accessor :special_hours - - # External identifier for this location, which must be unique inside a given - # account. This is a means of associating the location with your own records. - # Corresponds to the JSON property `storeCode` - # @return [String] - attr_accessor :store_code - - # A URL for this business. If possible, use a URL that represents this - # individual business location instead of a generic website/URL that represents - # all locations, or the brand. - # Corresponds to the JSON property `websiteUrl` - # @return [String] - attr_accessor :website_url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @ad_words_location_extensions = args[:ad_words_location_extensions] if args.key?(:ad_words_location_extensions) - @additional_categories = args[:additional_categories] if args.key?(:additional_categories) - @additional_phones = args[:additional_phones] if args.key?(:additional_phones) - @address = args[:address] if args.key?(:address) - @attributes = args[:attributes] if args.key?(:attributes) - @labels = args[:labels] if args.key?(:labels) - @latlng = args[:latlng] if args.key?(:latlng) - @location_key = args[:location_key] if args.key?(:location_key) - @location_name = args[:location_name] if args.key?(:location_name) - @location_state = args[:location_state] if args.key?(:location_state) - @metadata = args[:metadata] if args.key?(:metadata) - @name = args[:name] if args.key?(:name) - @open_info = args[:open_info] if args.key?(:open_info) - @photos = args[:photos] if args.key?(:photos) - @primary_category = args[:primary_category] if args.key?(:primary_category) - @primary_phone = args[:primary_phone] if args.key?(:primary_phone) - @regular_hours = args[:regular_hours] if args.key?(:regular_hours) - @service_area = args[:service_area] if args.key?(:service_area) - @special_hours = args[:special_hours] if args.key?(:special_hours) - @store_code = args[:store_code] if args.key?(:store_code) - @website_url = args[:website_url] if args.key?(:website_url) - end - end - - # Alternate / surrogate key references for a location. - class LocationKey - include Google::Apis::Core::Hashable - - # A value of true indicates that an unset place ID is deliberate, - # which is different from no association being made yet. - # @OutputOnly - # Corresponds to the JSON property `explicitNoPlaceId` - # @return [Boolean] - attr_accessor :explicit_no_place_id - alias_method :explicit_no_place_id?, :explicit_no_place_id - - # If this location has been verified and is connected to/appears on Google - # Maps, this field is populated with the place ID for the location. - # This ID can be used in various Places APIs. - # If this location is unverified, this field may be populated if the location - # has been associated with a place that appears on Google Maps. - # This field can be set during Create calls, but not for Update. - # The additional explicit_no_place_id bool qualifies whether an unset - # place ID is deliberate or not. - # Corresponds to the JSON property `placeId` - # @return [String] - attr_accessor :place_id - - # If this location has a Google+ page associated with it, this is - # populated with the Google+ page ID for this location. - # @OutputOnly - # Corresponds to the JSON property `plusPageId` - # @return [String] - attr_accessor :plus_page_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @explicit_no_place_id = args[:explicit_no_place_id] if args.key?(:explicit_no_place_id) - @place_id = args[:place_id] if args.key?(:place_id) - @plus_page_id = args[:plus_page_id] if args.key?(:plus_page_id) - end - end - - # Contains a set of booleans that reflect the state of a Location. - class LocationState - include Google::Apis::Core::Hashable - - # Indicates whether the location can be deleted using the Google My Business - # UI. - # @OutputOnly - # Corresponds to the JSON property `canDelete` - # @return [Boolean] - attr_accessor :can_delete - alias_method :can_delete?, :can_delete - - # Indicates whether the location can be updated. - # @OutputOnly - # Corresponds to the JSON property `canUpdate` - # @return [Boolean] - attr_accessor :can_update - alias_method :can_update?, :can_update - - # Indicates whether the location is a duplicate of another location. - # See metadata.duplicate for more information. - # @OutputOnly - # Corresponds to the JSON property `isDuplicate` - # @return [Boolean] - attr_accessor :is_duplicate - alias_method :is_duplicate?, :is_duplicate - - # Indicates whether the place ID associated with this location has updates. - # @OutputOnly - # Corresponds to the JSON property `isGoogleUpdated` - # @return [Boolean] - attr_accessor :is_google_updated - alias_method :is_google_updated?, :is_google_updated - - # Indicates whether the location is suspended. - # Suspended locations are not visible to end users in Google products. - # If you believe this was a mistake, see the [help center article] - # (https://support.google.com/business/answer/4569145). - # @OutputOnly - # Corresponds to the JSON property `isSuspended` - # @return [Boolean] - attr_accessor :is_suspended - alias_method :is_suspended?, :is_suspended - - # Indicates whether the location is verified. - # @OutputOnly - # Corresponds to the JSON property `isVerified` - # @return [Boolean] - attr_accessor :is_verified - alias_method :is_verified?, :is_verified - - # Indicates whether the location requires reverification. - # @OutputOnly - # Corresponds to the JSON property `needsReverification` - # @return [Boolean] - attr_accessor :needs_reverification - alias_method :needs_reverification?, :needs_reverification - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @can_delete = args[:can_delete] if args.key?(:can_delete) - @can_update = args[:can_update] if args.key?(:can_update) - @is_duplicate = args[:is_duplicate] if args.key?(:is_duplicate) - @is_google_updated = args[:is_google_updated] if args.key?(:is_google_updated) - @is_suspended = args[:is_suspended] if args.key?(:is_suspended) - @is_verified = args[:is_verified] if args.key?(:is_verified) - @needs_reverification = args[:needs_reverification] if args.key?(:needs_reverification) - end - end - - # Represents a possible match to a location. - class MatchedLocation - include Google::Apis::Core::Hashable - - # Is this an exact match? - # Corresponds to the JSON property `isExactMatch` - # @return [Boolean] - attr_accessor :is_exact_match - alias_method :is_exact_match?, :is_exact_match - - # A location. - # See the [help center article] - # (https://support.google.com/business/answer/3038177) for a detailed - # description of these fields, or the [category - # list](/my-business/content/categories] for a list of valid business - # categories. - # Corresponds to the JSON property `location` - # @return [Google::Apis::MybusinessV3::Location] - attr_accessor :location - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @is_exact_match = args[:is_exact_match] if args.key?(:is_exact_match) - @location = args[:location] if args.key?(:location) - end - end - - # Additional non-user-editable information about the location. - class Metadata - include Google::Apis::Core::Hashable - - # Information about the location that this location duplicates. - # Corresponds to the JSON property `duplicate` - # @return [Google::Apis::MybusinessV3::Duplicate] - attr_accessor :duplicate - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @duplicate = args[:duplicate] if args.key?(:duplicate) - end - end - - # Indicates whether the location is currently open for business. - # All locations are open by default, unless updated to be closed. - class OpenInfo - include Google::Apis::Core::Hashable - - # Indicates the Location OpenForBusiness status. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @status = args[:status] if args.key?(:status) - end - end - - # A collection of photos representing the business, categorized by photo type. - # The URL for each photo should point to a publicly accessible image. - # Photos should be supplied in either JPG or PNG format unless specified - # otherwise. If the photo was added by using Google My Business Locations or - # this API, the user-provided URL is used. If the photo was uploaded via the - # Google My Business Photos App, the photo uses a generated URL hosted by - # Google. Exceptions: `profile_photo_url` and `cover_photo_url` are always - # under a Google domain. - # With the exception of profile_photo_url and cover_photo_url, all photos - # must measure a minimum of 250px on the short edge, with a file size of at - # least 10240 bytes. - class Photos - include Google::Apis::Core::Hashable - - # Use the additional photos category for images that don't fit in any of the - # other categories. - # Corresponds to the JSON property `additionalPhotoUrls` - # @return [Array] - attr_accessor :additional_photo_urls - - # Common area photos show customers the common areas of your business - # location. - # Corresponds to the JSON property `commonAreasPhotoUrls` - # @return [Array] - attr_accessor :common_areas_photo_urls - - # The cover photo showcases the personality of your business. - # Cover photos must have a 16:9 aspect ratio, with a minimum size of 480px - # x 270px, and a maximum size of 2120px x 1192px. - # Corresponds to the JSON property `coverPhotoUrl` - # @return [String] - attr_accessor :cover_photo_url - - # Exterior photos help customers to recognize your business as they approach - # from different directions. - # Corresponds to the JSON property `exteriorPhotoUrls` - # @return [Array] - attr_accessor :exterior_photo_urls - - # Food and drink photos display the food and drink items served by your - # business. - # Corresponds to the JSON property `foodAndDrinkPhotoUrls` - # @return [Array] - attr_accessor :food_and_drink_photo_urls - - # Interior photos show customers what your business location looks like - # inside. - # Corresponds to the JSON property `interiorPhotoUrls` - # @return [Array] - attr_accessor :interior_photo_urls - - # The logo photo helps customers to recognize your brand. Upon upload, logo - # images are fitted into a square (transparent vertical or horizontal lines - # are added on two sides of the image if the original image is not square). - # Corresponds to the JSON property `logoPhotoUrl` - # @return [String] - attr_accessor :logo_photo_url - - # Menu photos show customers what your food menu looks like. - # Corresponds to the JSON property `menuPhotoUrls` - # @return [Array] - attr_accessor :menu_photo_urls - - # At work photos show you and your employees serving your customers. - # Corresponds to the JSON property `photosAtWorkUrls` - # @return [Array] - attr_accessor :photos_at_work_urls - - # Indicate which photo should be shown first in Google Maps and Search. - # Corresponds to the JSON property `preferredPhoto` - # @return [String] - attr_accessor :preferred_photo - - # Product photos showcase the products sold by your business. - # Corresponds to the JSON property `productPhotoUrls` - # @return [Array] - attr_accessor :product_photo_urls - - # The profile photo helps people recognize your business across Google. - # Profile photos must be square, with a minimum size of 250px and a maximum - # size of 500px. Allowed formats are JPG, PNG, and GIF. - # Corresponds to the JSON property `profilePhotoUrl` - # @return [String] - attr_accessor :profile_photo_url - - # Room photos show customers the inside of your guest rooms. - # Corresponds to the JSON property `roomsPhotoUrls` - # @return [Array] - attr_accessor :rooms_photo_urls - - # Team photos show your management team and your employees. - # Corresponds to the JSON property `teamPhotoUrls` - # @return [Array] - attr_accessor :team_photo_urls - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @additional_photo_urls = args[:additional_photo_urls] if args.key?(:additional_photo_urls) - @common_areas_photo_urls = args[:common_areas_photo_urls] if args.key?(:common_areas_photo_urls) - @cover_photo_url = args[:cover_photo_url] if args.key?(:cover_photo_url) - @exterior_photo_urls = args[:exterior_photo_urls] if args.key?(:exterior_photo_urls) - @food_and_drink_photo_urls = args[:food_and_drink_photo_urls] if args.key?(:food_and_drink_photo_urls) - @interior_photo_urls = args[:interior_photo_urls] if args.key?(:interior_photo_urls) - @logo_photo_url = args[:logo_photo_url] if args.key?(:logo_photo_url) - @menu_photo_urls = args[:menu_photo_urls] if args.key?(:menu_photo_urls) - @photos_at_work_urls = args[:photos_at_work_urls] if args.key?(:photos_at_work_urls) - @preferred_photo = args[:preferred_photo] if args.key?(:preferred_photo) - @product_photo_urls = args[:product_photo_urls] if args.key?(:product_photo_urls) - @profile_photo_url = args[:profile_photo_url] if args.key?(:profile_photo_url) - @rooms_photo_urls = args[:rooms_photo_urls] if args.key?(:rooms_photo_urls) - @team_photo_urls = args[:team_photo_urls] if args.key?(:team_photo_urls) - end - end - - # Defines an area that's represented by a place ID. - class PlaceInfo - include Google::Apis::Core::Hashable - - # The localized name of the place. For example, `Scottsdale, AZ`. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The ID of the place. - # Corresponds to the JSON property `placeId` - # @return [String] - attr_accessor :place_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @name = args[:name] if args.key?(:name) - @place_id = args[:place_id] if args.key?(:place_id) - end - end - - # Defines the union of areas represented by a set of places. - class Places - include Google::Apis::Core::Hashable - - # The areas represented by place IDs. - # Corresponds to the JSON property `placeInfos` - # @return [Array] - attr_accessor :place_infos - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @place_infos = args[:place_infos] if args.key?(:place_infos) - end - end - - # A radius around a particular point (latitude/longitude). - class PointRadius - include Google::Apis::Core::Hashable - - # An object representing a latitude/longitude pair. This is expressed as a pair - # of doubles representing degrees latitude and degrees longitude. Unless - # specified otherwise, this must conform to the - # WGS84 - # standard. Values must be within normalized ranges. - # Example of normalization code in Python: - # def NormalizeLongitude(longitude): - # """Wraps decimal degrees longitude to [-180.0, 180.0].""" - # q, r = divmod(longitude, 360.0) - # if r > 180.0 or (r == 180.0 and q <= -1.0): - # return r - 360.0 - # return r - # def NormalizeLatLng(latitude, longitude): - # """Wraps decimal degrees latitude and longitude to - # [-90.0, 90.0] and [-180.0, 180.0], respectively.""" - # r = latitude % 360.0 - # if r <= 90.0: - # return r, NormalizeLongitude(longitude) - # elif r >= 270.0: - # return r - 360, NormalizeLongitude(longitude) - # else: - # return 180 - r, NormalizeLongitude(longitude + 180.0) - # assert 180.0 == NormalizeLongitude(180.0) - # assert -180.0 == NormalizeLongitude(-180.0) - # assert -179.0 == NormalizeLongitude(181.0) - # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0) - # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0) - # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0) - # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0) - # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0) - # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0) - # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0) - # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) - # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) - # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) - # Corresponds to the JSON property `latlng` - # @return [Google::Apis::MybusinessV3::LatLng] - attr_accessor :latlng - - # The distance in kilometers of the area around the point. - # Corresponds to the JSON property `radiusKm` - # @return [Float] - attr_accessor :radius_km - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @latlng = args[:latlng] if args.key?(:latlng) - @radius_km = args[:radius_km] if args.key?(:radius_km) - end - end - - # Represents a review for a location. - # @OutputOnly - class Review - include Google::Apis::Core::Hashable - - # The body of the review as plain text with markups. - # Corresponds to the JSON property `comment` - # @return [String] - attr_accessor :comment - - # The timestamp for when the review was written. - # Corresponds to the JSON property `createTime` - # @return [String] - attr_accessor :create_time - - # The encrypted unique identifier. - # Corresponds to the JSON property `reviewId` - # @return [String] - attr_accessor :review_id - - # Represents the location owner/manager's reply to a review - # Corresponds to the JSON property `reviewReply` - # @return [Google::Apis::MybusinessV3::ReviewReply] - attr_accessor :review_reply - - # Represents the author of reviews. - # Corresponds to the JSON property `reviewer` - # @return [Google::Apis::MybusinessV3::Reviewer] - attr_accessor :reviewer - - # Star rating of the review. - # Corresponds to the JSON property `starRating` - # @return [String] - attr_accessor :star_rating - - # The timestamp for when the review was last modified. - # 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) - @comment = args[:comment] if args.key?(:comment) - @create_time = args[:create_time] if args.key?(:create_time) - @review_id = args[:review_id] if args.key?(:review_id) - @review_reply = args[:review_reply] if args.key?(:review_reply) - @reviewer = args[:reviewer] if args.key?(:reviewer) - @star_rating = args[:star_rating] if args.key?(:star_rating) - @update_time = args[:update_time] if args.key?(:update_time) - end - end - - # Represents the location owner/manager's reply to a review - class ReviewReply - include Google::Apis::Core::Hashable - - # The body of the review as plain text with markups. - # The maximum length is 4096 bytes. - # Corresponds to the JSON property `comment` - # @return [String] - attr_accessor :comment - - # The timestamp for when the review was last modified. - # @OutputOnly - # 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) - @comment = args[:comment] if args.key?(:comment) - @update_time = args[:update_time] if args.key?(:update_time) - end - end - - # Represents the author of reviews. - class Reviewer - include Google::Apis::Core::Hashable - - # The name of the reviewer. - # Only populated with the reviewer's real name if is_anonymous is false. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # Indicates whether the reviewer has opted to remain anonymous. - # Corresponds to the JSON property `isAnonymous` - # @return [Boolean] - attr_accessor :is_anonymous - alias_method :is_anonymous?, :is_anonymous - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @display_name = args[:display_name] if args.key?(:display_name) - @is_anonymous = args[:is_anonymous] if args.key?(:is_anonymous) - end - end - - # Service area businesses provide their service at the customer's location (for - # example a locksmith or plumber). - class ServiceAreaBusiness - include Google::Apis::Core::Hashable - - # Indicates the type of the service area - # business. - # Corresponds to the JSON property `businessType` - # @return [String] - attr_accessor :business_type - - # Defines the union of areas represented by a set of places. - # Corresponds to the JSON property `places` - # @return [Google::Apis::MybusinessV3::Places] - attr_accessor :places - - # A radius around a particular point (latitude/longitude). - # Corresponds to the JSON property `radius` - # @return [Google::Apis::MybusinessV3::PointRadius] - attr_accessor :radius - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @business_type = args[:business_type] if args.key?(:business_type) - @places = args[:places] if args.key?(:places) - @radius = args[:radius] if args.key?(:radius) - end - end - - # Represents a single time period when a location's operational hours differ - # from its normal business hours. - # A special hour period must represent a range of less than 24 hours. - # The `open_time` and `start_date` must predate the `close_time` and `end_date`. - # The `close_time` and `end_date` can extend to 11:59 a.m. on the day after - # the specified `start_date`. - # For example, the following inputs are valid: - # start_date=2015-11-23, open_time=08:00, close_time=18:00 - # start_date=2015-11-23, end_date=2015-11-23, open_time=08:00, close_time=18: - # 00 - # start_date=2015-11-23, end_date=2015-11-24, open_time=13:00, close_time=11: - # 59 - # The following inputs are NOT valid: - # start_date=2015-11-23, open_time=13:00, close_time=11:59 - # start_date=2015-11-23, end_date=2015-11-24, open_time=13:00, close_time=12: - # 00 - # start_date=2015-11-23, end_date=2015-11-25, open_time=08:00, close_time=18: - # 00 - class SpecialHourPeriod - include Google::Apis::Core::Hashable - - # The wall time on end_date when a location closes, expressed in - # 24hr ISO 8601 extended format. (hh:mm) Valid values are 00:00-24:00, - # where 24:00 represents midnight at the end of the specified day field. - # Must be specified if is_closed is false. - # Corresponds to the JSON property `closeTime` - # @return [String] - attr_accessor :close_time - - # Represents a whole calendar date, e.g. date of birth. The time of day and - # time zone are either specified elsewhere or are not significant. The date - # is relative to the Proleptic Gregorian Calendar. The day may be 0 to - # represent a year and month where the day is not significant, e.g. credit card - # expiration date. The year may be 0 to represent a month and day independent - # of year, e.g. anniversary date. Related types are google.type.TimeOfDay - # and `google.protobuf.Timestamp`. - # Corresponds to the JSON property `endDate` - # @return [Google::Apis::MybusinessV3::Date] - attr_accessor :end_date - - # If true, end_date, open_time, and close_time are ignored, - # and the date specified in start_date is treated as the location being - # closed for the entire day. - # Corresponds to the JSON property `isClosed` - # @return [Boolean] - attr_accessor :is_closed - alias_method :is_closed?, :is_closed - - # The wall time on `start_date` when a location opens, expressed in - # 24hr ISO 8601 extended format. (hh:mm) Valid values are 00:00-24:00, - # where 24:00 represents midnight at the end of the specified day field. - # Must be specified if `is_closed` is false. - # Corresponds to the JSON property `openTime` - # @return [String] - attr_accessor :open_time - - # Represents a whole calendar date, e.g. date of birth. The time of day and - # time zone are either specified elsewhere or are not significant. The date - # is relative to the Proleptic Gregorian Calendar. The day may be 0 to - # represent a year and month where the day is not significant, e.g. credit card - # expiration date. The year may be 0 to represent a month and day independent - # of year, e.g. anniversary date. Related types are google.type.TimeOfDay - # and `google.protobuf.Timestamp`. - # Corresponds to the JSON property `startDate` - # @return [Google::Apis::MybusinessV3::Date] - attr_accessor :start_date - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @close_time = args[:close_time] if args.key?(:close_time) - @end_date = args[:end_date] if args.key?(:end_date) - @is_closed = args[:is_closed] if args.key?(:is_closed) - @open_time = args[:open_time] if args.key?(:open_time) - @start_date = args[:start_date] if args.key?(:start_date) - end - end - - # Represents a set of time periods when a location's operational hours differ - # from its normal business hours. - class SpecialHours - include Google::Apis::Core::Hashable - - # A list of exceptions to the business's regular hours. - # Corresponds to the JSON property `specialHourPeriods` - # @return [Array] - attr_accessor :special_hour_periods - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @special_hour_periods = args[:special_hour_periods] if args.key?(:special_hour_periods) - end - end - - # Represents a span of time that the business is open, starting on the - # specified open - # day/time and closing on the specified close day/time. - # The closing time must occur after the opening time, for example later in the - # same day, or on a subsequent day. - class TimePeriod - include Google::Apis::Core::Hashable - - # Indicates the day of the week this period ends - # on. - # Corresponds to the JSON property `closeDay` - # @return [String] - attr_accessor :close_day - - # Time in 24hr ISO 8601 extended format (hh:mm). Valid values are - # 00:00-24:00, where 24:00 represents midnight at the end of the specified day - # field. - # Corresponds to the JSON property `closeTime` - # @return [String] - attr_accessor :close_time - - # Indicates the day of the week this period starts - # on. - # Corresponds to the JSON property `openDay` - # @return [String] - attr_accessor :open_day - - # Time in 24hr ISO 8601 extended format (hh:mm). Valid values are 00:00-24:00, - # where 24:00 represents midnight at the end of the specified day field. - # Corresponds to the JSON property `openTime` - # @return [String] - attr_accessor :open_time - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @close_day = args[:close_day] if args.key?(:close_day) - @close_time = args[:close_time] if args.key?(:close_time) - @open_day = args[:open_day] if args.key?(:open_day) - @open_time = args[:open_time] if args.key?(:open_time) - end - end - - # Request message for MyBusiness.TransferLocation to transfer a location from - # its current account to another. - class TransferLocationRequest - include Google::Apis::Core::Hashable - - # Name of the account resource to transfer the location to (e.g. - # "accounts/8675309") - # Corresponds to the JSON property `toAccount` - # @return [String] - attr_accessor :to_account - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @to_account = args[:to_account] if args.key?(:to_account) - end - end - end - end -end diff --git a/generated/google/apis/mybusiness_v3/representations.rb b/generated/google/apis/mybusiness_v3/representations.rb deleted file mode 100644 index ae5deef20..000000000 --- a/generated/google/apis/mybusiness_v3/representations.rb +++ /dev/null @@ -1,741 +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 MybusinessV3 - - class Account - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AccountState - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AdWordsLocationExtensions - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Address - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Admin - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AssociateLocationRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Attribute - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AttributeMetadata - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AttributeValueMetadata - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BatchGetLocationsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BatchGetLocationsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BusinessHours - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Category - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ClearLocationAssociationRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Date - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Duplicate - 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 FindMatchingLocationsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class FindMatchingLocationsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class GoogleUpdatedLocation - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class LatLng - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListAccountAdminsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListAccountsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListLocationAdminsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListLocationAttributeMetadataResponse - 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 ListReviewsResponse - 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 LocationKey - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class LocationState - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class MatchedLocation - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Metadata - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class OpenInfo - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Photos - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class PlaceInfo - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Places - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class PointRadius - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Review - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ReviewReply - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Reviewer - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ServiceAreaBusiness - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SpecialHourPeriod - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SpecialHours - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class TimePeriod - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class TransferLocationRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Account - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :account_name, as: 'accountName' - property :name, as: 'name' - property :role, as: 'role' - property :state, as: 'state', class: Google::Apis::MybusinessV3::AccountState, decorator: Google::Apis::MybusinessV3::AccountState::Representation - - property :type, as: 'type' - end - end - - class AccountState - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :status, as: 'status' - end - end - - class AdWordsLocationExtensions - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :ad_phone, as: 'adPhone' - end - end - - class Address - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :address_lines, as: 'addressLines' - property :administrative_area, as: 'administrativeArea' - property :country, as: 'country' - property :locality, as: 'locality' - property :postal_code, as: 'postalCode' - property :sub_locality, as: 'subLocality' - end - end - - class Admin - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :admin_name, as: 'adminName' - property :name, as: 'name' - property :pending_invitation, as: 'pendingInvitation' - property :role, as: 'role' - end - end - - class AssociateLocationRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :place_id, as: 'placeId' - end - end - - class Attribute - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :attribute_id, as: 'attributeId' - property :value_type, as: 'valueType' - collection :values, as: 'values' - end - end - - class AttributeMetadata - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :attribute_id, as: 'attributeId' - property :display_name, as: 'displayName' - property :group_display_name, as: 'groupDisplayName' - property :is_repeatable, as: 'isRepeatable' - collection :value_metadata, as: 'valueMetadata', class: Google::Apis::MybusinessV3::AttributeValueMetadata, decorator: Google::Apis::MybusinessV3::AttributeValueMetadata::Representation - - property :value_type, as: 'valueType' - end - end - - class AttributeValueMetadata - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :display_name, as: 'displayName' - property :value, as: 'value' - end - end - - class BatchGetLocationsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :location_names, as: 'locationNames' - end - end - - class BatchGetLocationsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :locations, as: 'locations', class: Google::Apis::MybusinessV3::Location, decorator: Google::Apis::MybusinessV3::Location::Representation - - end - end - - class BusinessHours - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :periods, as: 'periods', class: Google::Apis::MybusinessV3::TimePeriod, decorator: Google::Apis::MybusinessV3::TimePeriod::Representation - - end - end - - class Category - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :category_id, as: 'categoryId' - property :name, as: 'name' - end - end - - class ClearLocationAssociationRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end - end - - class Date - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :day, as: 'day' - property :month, as: 'month' - property :year, as: 'year' - end - end - - class Duplicate - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :location_name, as: 'locationName' - property :ownership, as: 'ownership' - end - end - - class Empty - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end - end - - class FindMatchingLocationsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :language_code, as: 'languageCode' - property :max_cache_duration, as: 'maxCacheDuration' - property :num_results, as: 'numResults' - end - end - - class FindMatchingLocationsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :match_time, as: 'matchTime' - collection :matched_locations, as: 'matchedLocations', class: Google::Apis::MybusinessV3::MatchedLocation, decorator: Google::Apis::MybusinessV3::MatchedLocation::Representation - - end - end - - class GoogleUpdatedLocation - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :diff_mask, as: 'diffMask' - property :location, as: 'location', class: Google::Apis::MybusinessV3::Location, decorator: Google::Apis::MybusinessV3::Location::Representation - - end - end - - class LatLng - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :latitude, as: 'latitude' - property :longitude, as: 'longitude' - end - end - - class ListAccountAdminsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :admins, as: 'admins', class: Google::Apis::MybusinessV3::Admin, decorator: Google::Apis::MybusinessV3::Admin::Representation - - end - end - - class ListAccountsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :accounts, as: 'accounts', class: Google::Apis::MybusinessV3::Account, decorator: Google::Apis::MybusinessV3::Account::Representation - - property :next_page_token, as: 'nextPageToken' - end - end - - class ListLocationAdminsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :admins, as: 'admins', class: Google::Apis::MybusinessV3::Admin, decorator: Google::Apis::MybusinessV3::Admin::Representation - - end - end - - class ListLocationAttributeMetadataResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :attributes, as: 'attributes', class: Google::Apis::MybusinessV3::AttributeMetadata, decorator: Google::Apis::MybusinessV3::AttributeMetadata::Representation - - end - end - - class ListLocationsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :locations, as: 'locations', class: Google::Apis::MybusinessV3::Location, decorator: Google::Apis::MybusinessV3::Location::Representation - - property :next_page_token, as: 'nextPageToken' - end - end - - class ListReviewsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :average_rating, as: 'averageRating' - property :next_page_token, as: 'nextPageToken' - collection :reviews, as: 'reviews', class: Google::Apis::MybusinessV3::Review, decorator: Google::Apis::MybusinessV3::Review::Representation - - property :total_review_count, as: 'totalReviewCount' - end - end - - class Location - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :ad_words_location_extensions, as: 'adWordsLocationExtensions', class: Google::Apis::MybusinessV3::AdWordsLocationExtensions, decorator: Google::Apis::MybusinessV3::AdWordsLocationExtensions::Representation - - collection :additional_categories, as: 'additionalCategories', class: Google::Apis::MybusinessV3::Category, decorator: Google::Apis::MybusinessV3::Category::Representation - - collection :additional_phones, as: 'additionalPhones' - property :address, as: 'address', class: Google::Apis::MybusinessV3::Address, decorator: Google::Apis::MybusinessV3::Address::Representation - - collection :attributes, as: 'attributes', class: Google::Apis::MybusinessV3::Attribute, decorator: Google::Apis::MybusinessV3::Attribute::Representation - - collection :labels, as: 'labels' - property :latlng, as: 'latlng', class: Google::Apis::MybusinessV3::LatLng, decorator: Google::Apis::MybusinessV3::LatLng::Representation - - property :location_key, as: 'locationKey', class: Google::Apis::MybusinessV3::LocationKey, decorator: Google::Apis::MybusinessV3::LocationKey::Representation - - property :location_name, as: 'locationName' - property :location_state, as: 'locationState', class: Google::Apis::MybusinessV3::LocationState, decorator: Google::Apis::MybusinessV3::LocationState::Representation - - property :metadata, as: 'metadata', class: Google::Apis::MybusinessV3::Metadata, decorator: Google::Apis::MybusinessV3::Metadata::Representation - - property :name, as: 'name' - property :open_info, as: 'openInfo', class: Google::Apis::MybusinessV3::OpenInfo, decorator: Google::Apis::MybusinessV3::OpenInfo::Representation - - property :photos, as: 'photos', class: Google::Apis::MybusinessV3::Photos, decorator: Google::Apis::MybusinessV3::Photos::Representation - - property :primary_category, as: 'primaryCategory', class: Google::Apis::MybusinessV3::Category, decorator: Google::Apis::MybusinessV3::Category::Representation - - property :primary_phone, as: 'primaryPhone' - property :regular_hours, as: 'regularHours', class: Google::Apis::MybusinessV3::BusinessHours, decorator: Google::Apis::MybusinessV3::BusinessHours::Representation - - property :service_area, as: 'serviceArea', class: Google::Apis::MybusinessV3::ServiceAreaBusiness, decorator: Google::Apis::MybusinessV3::ServiceAreaBusiness::Representation - - property :special_hours, as: 'specialHours', class: Google::Apis::MybusinessV3::SpecialHours, decorator: Google::Apis::MybusinessV3::SpecialHours::Representation - - property :store_code, as: 'storeCode' - property :website_url, as: 'websiteUrl' - end - end - - class LocationKey - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :explicit_no_place_id, as: 'explicitNoPlaceId' - property :place_id, as: 'placeId' - property :plus_page_id, as: 'plusPageId' - end - end - - class LocationState - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :can_delete, as: 'canDelete' - property :can_update, as: 'canUpdate' - property :is_duplicate, as: 'isDuplicate' - property :is_google_updated, as: 'isGoogleUpdated' - property :is_suspended, as: 'isSuspended' - property :is_verified, as: 'isVerified' - property :needs_reverification, as: 'needsReverification' - end - end - - class MatchedLocation - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :is_exact_match, as: 'isExactMatch' - property :location, as: 'location', class: Google::Apis::MybusinessV3::Location, decorator: Google::Apis::MybusinessV3::Location::Representation - - end - end - - class Metadata - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :duplicate, as: 'duplicate', class: Google::Apis::MybusinessV3::Duplicate, decorator: Google::Apis::MybusinessV3::Duplicate::Representation - - end - end - - class OpenInfo - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :status, as: 'status' - end - end - - class Photos - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :additional_photo_urls, as: 'additionalPhotoUrls' - collection :common_areas_photo_urls, as: 'commonAreasPhotoUrls' - property :cover_photo_url, as: 'coverPhotoUrl' - collection :exterior_photo_urls, as: 'exteriorPhotoUrls' - collection :food_and_drink_photo_urls, as: 'foodAndDrinkPhotoUrls' - collection :interior_photo_urls, as: 'interiorPhotoUrls' - property :logo_photo_url, as: 'logoPhotoUrl' - collection :menu_photo_urls, as: 'menuPhotoUrls' - collection :photos_at_work_urls, as: 'photosAtWorkUrls' - property :preferred_photo, as: 'preferredPhoto' - collection :product_photo_urls, as: 'productPhotoUrls' - property :profile_photo_url, as: 'profilePhotoUrl' - collection :rooms_photo_urls, as: 'roomsPhotoUrls' - collection :team_photo_urls, as: 'teamPhotoUrls' - end - end - - class PlaceInfo - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - property :place_id, as: 'placeId' - end - end - - class Places - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :place_infos, as: 'placeInfos', class: Google::Apis::MybusinessV3::PlaceInfo, decorator: Google::Apis::MybusinessV3::PlaceInfo::Representation - - end - end - - class PointRadius - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :latlng, as: 'latlng', class: Google::Apis::MybusinessV3::LatLng, decorator: Google::Apis::MybusinessV3::LatLng::Representation - - property :radius_km, as: 'radiusKm' - end - end - - class Review - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :comment, as: 'comment' - property :create_time, as: 'createTime' - property :review_id, as: 'reviewId' - property :review_reply, as: 'reviewReply', class: Google::Apis::MybusinessV3::ReviewReply, decorator: Google::Apis::MybusinessV3::ReviewReply::Representation - - property :reviewer, as: 'reviewer', class: Google::Apis::MybusinessV3::Reviewer, decorator: Google::Apis::MybusinessV3::Reviewer::Representation - - property :star_rating, as: 'starRating' - property :update_time, as: 'updateTime' - end - end - - class ReviewReply - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :comment, as: 'comment' - property :update_time, as: 'updateTime' - end - end - - class Reviewer - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :display_name, as: 'displayName' - property :is_anonymous, as: 'isAnonymous' - end - end - - class ServiceAreaBusiness - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :business_type, as: 'businessType' - property :places, as: 'places', class: Google::Apis::MybusinessV3::Places, decorator: Google::Apis::MybusinessV3::Places::Representation - - property :radius, as: 'radius', class: Google::Apis::MybusinessV3::PointRadius, decorator: Google::Apis::MybusinessV3::PointRadius::Representation - - end - end - - class SpecialHourPeriod - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :close_time, as: 'closeTime' - property :end_date, as: 'endDate', class: Google::Apis::MybusinessV3::Date, decorator: Google::Apis::MybusinessV3::Date::Representation - - property :is_closed, as: 'isClosed' - property :open_time, as: 'openTime' - property :start_date, as: 'startDate', class: Google::Apis::MybusinessV3::Date, decorator: Google::Apis::MybusinessV3::Date::Representation - - end - end - - class SpecialHours - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :special_hour_periods, as: 'specialHourPeriods', class: Google::Apis::MybusinessV3::SpecialHourPeriod, decorator: Google::Apis::MybusinessV3::SpecialHourPeriod::Representation - - end - end - - class TimePeriod - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :close_day, as: 'closeDay' - property :close_time, as: 'closeTime' - property :open_day, as: 'openDay' - property :open_time, as: 'openTime' - end - end - - class TransferLocationRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :to_account, as: 'toAccount' - end - end - end - end -end diff --git a/generated/google/apis/mybusiness_v3/service.rb b/generated/google/apis/mybusiness_v3/service.rb deleted file mode 100644 index 7cb636ee3..000000000 --- a/generated/google/apis/mybusiness_v3/service.rb +++ /dev/null @@ -1,961 +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 MybusinessV3 - # Google My Business API - # - # The Google My Business API provides an interface for managing business - # location information on Google. - # - # @example - # require 'google/apis/mybusiness_v3' - # - # Mybusiness = Google::Apis::MybusinessV3 # Alias the module - # service = Mybusiness::MybusinessService.new - # - # @see https://developers.google.com/my-business/ - class MybusinessService < 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://mybusiness.googleapis.com/', '') - @batch_path = 'batch' - end - - # Gets the specified account. Returns `NOT_FOUND` if the - # account does not exist or if the caller does not have access rights to it. - # @param [String] name - # The name of the account to fetch. - # @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::MybusinessV3::Account] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MybusinessV3::Account] - # - # @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_account(name, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v3/{+name}', options) - command.response_representation = Google::Apis::MybusinessV3::Account::Representation - command.response_class = Google::Apis::MybusinessV3::Account - 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 all of the accounts for the authenticated user. This includes all - # accounts that the user owns, as well as any accounts for which the user - # has management rights. - # @param [Fixnum] page_size - # How many accounts to fetch per page. Default is 50, - # minimum is 1, and maximum page size is 50. - # @param [String] page_token - # If specified, the next page of accounts is retrieved. The `pageToken` is - # returned when a call to `accounts.list` returns more results than can fit - # into the requested page size. - # @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::MybusinessV3::ListAccountsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MybusinessV3::ListAccountsResponse] - # - # @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_accounts(page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v3/accounts', options) - command.response_representation = Google::Apis::MybusinessV3::ListAccountsResponse::Representation - command.response_class = Google::Apis::MybusinessV3::ListAccountsResponse - 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 specified business account. Personal accounts cannot be - # updated using this method. - # Note: At this time the only editable field for an account is - # `account_name`. - # Any other fields passed in (such as `type`, `role`, and `verified`) is - # ignored. - # @param [String] name - # The name of the account to update. - # @param [Google::Apis::MybusinessV3::Account] account_object - # @param [String] language_code - # The language of the account update. - # @param [Boolean] validate_only - # If true, the request is validated without actually updating the account. - # @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::MybusinessV3::Account] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MybusinessV3::Account] - # - # @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 update_account(name, account_object = nil, language_code: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:put, 'v3/{+name}', options) - command.request_representation = Google::Apis::MybusinessV3::Account::Representation - command.request_object = account_object - command.response_representation = Google::Apis::MybusinessV3::Account::Representation - command.response_class = Google::Apis::MybusinessV3::Account - command.params['name'] = name unless name.nil? - command.query['languageCode'] = language_code unless language_code.nil? - command.query['validateOnly'] = validate_only unless validate_only.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Invites the specified user to become an administrator on the specified - # account. The invitee must accept the invitation in order to be granted - # access to the account. - # @param [String] name - # The resource name. For account admins, this is in the form: - # `accounts/`account_id`/admins/`admin_id`` - # For location admins, this is in the form: - # `accounts/`account_id`/locations/`location_id`/admins/`admin_id`` - # @param [Google::Apis::MybusinessV3::Admin] admin_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::MybusinessV3::Admin] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MybusinessV3::Admin] - # - # @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_account_admin(name, admin_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v3/{+name}/admins', options) - command.request_representation = Google::Apis::MybusinessV3::Admin::Representation - command.request_object = admin_object - command.response_representation = Google::Apis::MybusinessV3::Admin::Representation - command.response_class = Google::Apis::MybusinessV3::Admin - 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 - - # Removes the specified admin from the specified account. - # @param [String] name - # The resource name of the admin to remove from the account. - # @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::MybusinessV3::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MybusinessV3::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_account_admin(name, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:delete, 'v3/{+name}', options) - command.response_representation = Google::Apis::MybusinessV3::Empty::Representation - command.response_class = Google::Apis::MybusinessV3::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 the admins for the specified account. - # @param [String] name - # The name of the account from which to retrieve a list of admins. - # @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::MybusinessV3::ListAccountAdminsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MybusinessV3::ListAccountAdminsResponse] - # - # @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_account_admins(name, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v3/{+name}/admins', options) - command.response_representation = Google::Apis::MybusinessV3::ListAccountAdminsResponse::Representation - command.response_class = Google::Apis::MybusinessV3::ListAccountAdminsResponse - 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 - - # Associates a location to a place ID. Any previous association is - # overwritten. This operation is only valid if the location is unverified. - # The association must be valid, i.e. appear in the list of - # FindMatchingLocations. - # @param [String] name - # The resource name of the location to associate. - # @param [Google::Apis::MybusinessV3::AssociateLocationRequest] associate_location_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::MybusinessV3::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MybusinessV3::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 associate_location(name, associate_location_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v3/{+name}:associate', options) - command.request_representation = Google::Apis::MybusinessV3::AssociateLocationRequest::Representation - command.request_object = associate_location_request_object - command.response_representation = Google::Apis::MybusinessV3::Empty::Representation - command.response_class = Google::Apis::MybusinessV3::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 all of the specified locations in the given account. - # @param [String] name - # The name of the account from which to fetch locations. - # @param [Google::Apis::MybusinessV3::BatchGetLocationsRequest] batch_get_locations_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::MybusinessV3::BatchGetLocationsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MybusinessV3::BatchGetLocationsResponse] - # - # @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 batch_get_locations(name, batch_get_locations_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v3/{+name}/locations:batchGet', options) - command.request_representation = Google::Apis::MybusinessV3::BatchGetLocationsRequest::Representation - command.request_object = batch_get_locations_request_object - command.response_representation = Google::Apis::MybusinessV3::BatchGetLocationsResponse::Representation - command.response_class = Google::Apis::MybusinessV3::BatchGetLocationsResponse - 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 - - # Clears an assocation between a location and its place ID. This - # operation is only valid if the location is unverified. - # @param [String] name - # The resource name of the location to disassociate. - # @param [Google::Apis::MybusinessV3::ClearLocationAssociationRequest] clear_location_association_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::MybusinessV3::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MybusinessV3::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 clear_account_location_association(name, clear_location_association_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v3/{+name}:clearAssociation', options) - command.request_representation = Google::Apis::MybusinessV3::ClearLocationAssociationRequest::Representation - command.request_object = clear_location_association_request_object - command.response_representation = Google::Apis::MybusinessV3::Empty::Representation - command.response_class = Google::Apis::MybusinessV3::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 - - # Creates a new location owned by the - # specified account, and returns it. - # @param [String] name - # The name of the account in which to create this location. - # @param [Google::Apis::MybusinessV3::Location] location_object - # @param [String] language_code - # The language of the location update. Currently this is used to disambiguate - # what localized categories are valid for this create request. - # @param [String] request_id - # A unique request ID for the server to detect duplicated requests. UUIDs are - # recommended. Max length is 50 characters. - # @param [Boolean] validate_only - # If true, the request is validated without actually creating 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::MybusinessV3::Location] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MybusinessV3::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 create_account_location(name, location_object = nil, language_code: nil, request_id: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v3/{+name}/locations', options) - command.request_representation = Google::Apis::MybusinessV3::Location::Representation - command.request_object = location_object - command.response_representation = Google::Apis::MybusinessV3::Location::Representation - command.response_class = Google::Apis::MybusinessV3::Location - command.params['name'] = name unless name.nil? - command.query['languageCode'] = language_code unless language_code.nil? - command.query['requestId'] = request_id unless request_id.nil? - command.query['validateOnly'] = validate_only unless validate_only.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 location. Note: If this location has an associated Google+ page, as - # indicated by a `plus_page_id` in the LocationKey, it cannot be deleted using - # the API, it - # must be done using the [Google My Business] - # (https://www.google.com/local/manage/) website. - # Returns `NOT_FOUND` if the location does not exist. - # @param [String] name - # The name of the location 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::MybusinessV3::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MybusinessV3::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_account_location(name, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:delete, 'v3/{+name}', options) - command.response_representation = Google::Apis::MybusinessV3::Empty::Representation - command.response_class = Google::Apis::MybusinessV3::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 - - # Finds all of the possible locations that are a match to the specified - # location. This operation is only valid if the location is unverified. - # @param [String] name - # The resource name of the location to find matches for. - # @param [Google::Apis::MybusinessV3::FindMatchingLocationsRequest] find_matching_locations_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::MybusinessV3::FindMatchingLocationsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MybusinessV3::FindMatchingLocationsResponse] - # - # @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 find_account_location_matches(name, find_matching_locations_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v3/{+name}:findMatches', options) - command.request_representation = Google::Apis::MybusinessV3::FindMatchingLocationsRequest::Representation - command.request_object = find_matching_locations_request_object - command.response_representation = Google::Apis::MybusinessV3::FindMatchingLocationsResponse::Representation - command.response_class = Google::Apis::MybusinessV3::FindMatchingLocationsResponse - 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 specified location. Returns `NOT_FOUND` if the - # location does not exist. - # @param [String] name - # The name of the location to fetch. - # @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::MybusinessV3::Location] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MybusinessV3::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_account_location(name, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v3/{+name}', options) - command.response_representation = Google::Apis::MybusinessV3::Location::Representation - command.response_class = Google::Apis::MybusinessV3::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 - - # Gets the Google updated version of the specified location. - # Returns `NOT_FOUND` if the location does not exist. - # @param [String] name - # The name of the location to fetch. - # @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::MybusinessV3::GoogleUpdatedLocation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MybusinessV3::GoogleUpdatedLocation] - # - # @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_google_updated_account_location(name, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v3/{+name}:googleUpdated', options) - command.response_representation = Google::Apis::MybusinessV3::GoogleUpdatedLocation::Representation - command.response_class = Google::Apis::MybusinessV3::GoogleUpdatedLocation - 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 the locations for the specified account. - # @param [String] name - # The name of the account to fetch locations from. - # @param [String] filter - # A filter constraining the locations to return. The response includes - # only entries that match the filter. If `filter` is empty, then - # constraints are applied and all locations (paginated) are retrieved for - # the requested account. - # Further information on valid filter fields and example usage is available - # [here](https://developers.google.com/my-business/content/location-data# - # filter_results_when_listing_locations) - # . - # @param [Fixnum] page_size - # How many locations to fetch per page. Default is 100, - # minimum is 1, and maximum page size is 100. - # @param [String] page_token - # If specified, it fetches the next `page` of locations. The page token - # is returned by previous calls to ListLocations when there were more - # locations than could fit in the requested page size. - # @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::MybusinessV3::ListLocationsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MybusinessV3::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_account_locations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v3/{+name}/locations', options) - command.response_representation = Google::Apis::MybusinessV3::ListLocationsResponse::Representation - command.response_class = Google::Apis::MybusinessV3::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 - - # Updates the specified location. - # Photos are only allowed on a location that has a Google+ page. - # Returns `NOT_FOUND` if the location does not exist. - # @param [String] name - # The name of the location to update. - # @param [Google::Apis::MybusinessV3::Location] location_object - # @param [String] field_mask - # The specific fields to update. If no mask is specified, then this is - # treated as a full update and all fields are set to the values passed - # in, which may include unsetting empty fields in the request. - # @param [String] language_code - # The language of the location update. Currently this is used to disambiguate - # what localized categories are valid for this update request. - # @param [Boolean] validate_only - # If true, the request is validated without actually updating 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::MybusinessV3::Location] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MybusinessV3::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 patch_account_location(name, location_object = nil, field_mask: nil, language_code: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:patch, 'v3/{+name}', options) - command.request_representation = Google::Apis::MybusinessV3::Location::Representation - command.request_object = location_object - command.response_representation = Google::Apis::MybusinessV3::Location::Representation - command.response_class = Google::Apis::MybusinessV3::Location - command.params['name'] = name unless name.nil? - command.query['fieldMask'] = field_mask unless field_mask.nil? - command.query['languageCode'] = language_code unless language_code.nil? - command.query['validateOnly'] = validate_only unless validate_only.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Transfer a location from one account to another. The current account that - # the location is associated with and the destination account must have the - # same ultimate owner. Returns the Location with its new resource name. - # @param [String] name - # The name of the location to transfer. - # @param [Google::Apis::MybusinessV3::TransferLocationRequest] transfer_location_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::MybusinessV3::Location] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MybusinessV3::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 transfer_location(name, transfer_location_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v3/{+name}:transfer', options) - command.request_representation = Google::Apis::MybusinessV3::TransferLocationRequest::Representation - command.request_object = transfer_location_request_object - command.response_representation = Google::Apis::MybusinessV3::Location::Representation - command.response_class = Google::Apis::MybusinessV3::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 - - # Invites the specified user to become an administrator on the specified - # location. The invitee must accept the invitation in order to be granted - # access to the location. - # @param [String] name - # The resource name. For account admins, this is in the form: - # `accounts/`account_id`/admins/`admin_id`` - # For location admins, this is in the form: - # `accounts/`account_id`/locations/`location_id`/admins/`admin_id`` - # @param [Google::Apis::MybusinessV3::Admin] admin_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::MybusinessV3::Admin] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MybusinessV3::Admin] - # - # @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_account_location_admin(name, admin_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v3/{+name}/admins', options) - command.request_representation = Google::Apis::MybusinessV3::Admin::Representation - command.request_object = admin_object - command.response_representation = Google::Apis::MybusinessV3::Admin::Representation - command.response_class = Google::Apis::MybusinessV3::Admin - 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 - - # Removes the specified admin as a manager of the specified location. - # @param [String] name - # The resource name of the admin to remove from 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::MybusinessV3::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MybusinessV3::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_account_location_admin(name, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:delete, 'v3/{+name}', options) - command.response_representation = Google::Apis::MybusinessV3::Empty::Representation - command.response_class = Google::Apis::MybusinessV3::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 all of the admins for the specified location. - # @param [String] name - # The name of the location to list admins of. - # @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::MybusinessV3::ListLocationAdminsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MybusinessV3::ListLocationAdminsResponse] - # - # @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_account_location_admins(name, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v3/{+name}/admins', options) - command.response_representation = Google::Apis::MybusinessV3::ListLocationAdminsResponse::Representation - command.response_class = Google::Apis::MybusinessV3::ListLocationAdminsResponse - 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 the response to the specified review. - # This operation is only valid if the specified location is verified. - # @param [String] name - # The name of the review reply 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::MybusinessV3::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MybusinessV3::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_reply(name, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:delete, 'v3/{+name}/reply', options) - command.response_representation = Google::Apis::MybusinessV3::Empty::Representation - command.response_class = Google::Apis::MybusinessV3::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 - - # Returns the specified review. - # This operation is only valid if the specified location is verified. - # Returns `NOT_FOUND` if the review does not exist, or has been deleted. - # @param [String] name - # The name of the review to fetch. - # @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::MybusinessV3::Review] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MybusinessV3::Review] - # - # @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_review(name, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v3/{+name}', options) - command.response_representation = Google::Apis::MybusinessV3::Review::Representation - command.response_class = Google::Apis::MybusinessV3::Review - 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 - - # Returns the paginated list of reviews for the specified location. - # This operation is only valid if the specified location is verified. - # @param [String] name - # The name of the location to fetch reviews for. - # @param [String] order_by - # Specifies the field to sort reviews by. - # If unspecified, the order of reviews returned will - # default to "update_timedesc". - # Valid orders to sort by are `rating` and `ratingdesc` and `update_timedesc`. - # @param [Fixnum] page_size - # How many reviews to fetch per page. The maximum page_size is 200. - # @param [String] page_token - # If specified, it fetches the next ‘page’ of reviews. - # @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::MybusinessV3::ListReviewsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MybusinessV3::ListReviewsResponse] - # - # @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_reviews(name, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v3/{+name}/reviews', options) - command.response_representation = Google::Apis::MybusinessV3::ListReviewsResponse::Representation - command.response_class = Google::Apis::MybusinessV3::ListReviewsResponse - command.params['name'] = name unless name.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 reply to the specified review. - # A reply is created if one does not exist. - # This operation is only valid if the specified location is verified. - # @param [String] name - # The name of the review to respond to. - # @param [Google::Apis::MybusinessV3::ReviewReply] review_reply_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::MybusinessV3::ReviewReply] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MybusinessV3::ReviewReply] - # - # @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 reply_to_review(name, review_reply_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v3/{+name}/reply', options) - command.request_representation = Google::Apis::MybusinessV3::ReviewReply::Representation - command.request_object = review_reply_object - command.response_representation = Google::Apis::MybusinessV3::ReviewReply::Representation - command.response_class = Google::Apis::MybusinessV3::ReviewReply - 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 - - # Returns the list of available attributes that would be available for a - # location with the given primary category and country. - # @param [String] category_id - # The primary category stable id to find available attributes. - # @param [String] country - # The ISO 3166-1 alpha-2 country code to find available attributes. - # @param [String] language_code - # The BCP 47 code of language to get attribute display names in. If this - # language is not available, they will be provided in English. - # @param [String] name - # Resource name of the location to lookup available attributes. - # @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::MybusinessV3::ListLocationAttributeMetadataResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MybusinessV3::ListLocationAttributeMetadataResponse] - # - # @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_attributes(category_id: nil, country: nil, language_code: nil, name: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v3/attributes', options) - command.response_representation = Google::Apis::MybusinessV3::ListLocationAttributeMetadataResponse::Representation - command.response_class = Google::Apis::MybusinessV3::ListLocationAttributeMetadataResponse - command.query['categoryId'] = category_id unless category_id.nil? - command.query['country'] = country unless country.nil? - command.query['languageCode'] = language_code unless language_code.nil? - command.query['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 - - 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/servicemanagement_v1.rb b/generated/google/apis/servicemanagement_v1.rb index 933049eb6..a7f408ae8 100644 --- a/generated/google/apis/servicemanagement_v1.rb +++ b/generated/google/apis/servicemanagement_v1.rb @@ -27,7 +27,7 @@ module Google # @see https://cloud.google.com/service-management/ module ServicemanagementV1 VERSION = 'V1' - REVISION = '20180813' + REVISION = '20180825' # 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/servicemanagement_v1/classes.rb b/generated/google/apis/servicemanagement_v1/classes.rb index fd85d6729..6a7f835df 100644 --- a/generated/google/apis/servicemanagement_v1/classes.rb +++ b/generated/google/apis/servicemanagement_v1/classes.rb @@ -3704,7 +3704,7 @@ module Google # A unique ID for a specific instance of this message, typically assigned # by the client for tracking purpose. If empty, the server may choose to - # generate one instead. + # generate one instead. Must be no longer than 60 characters. # Corresponds to the JSON property `id` # @return [String] attr_accessor :id diff --git a/generated/google/apis/servicemanagement_v1/service.rb b/generated/google/apis/servicemanagement_v1/service.rb index c6df669c9..9ea23fd9d 100644 --- a/generated/google/apis/servicemanagement_v1/service.rb +++ b/generated/google/apis/servicemanagement_v1/service.rb @@ -356,6 +356,8 @@ module Google # for naming requirements. For example: `example.googleapis.com`. # @param [String] config_id # The id of the service configuration resource. + # This field must be specified for the server to return all fields, including + # `SourceInfo`. # @param [String] view # Specifies which parts of the Service Config should be returned in the # response. @@ -628,6 +630,8 @@ module Google # for naming requirements. For example: `example.googleapis.com`. # @param [String] config_id # The id of the service configuration resource. + # This field must be specified for the server to return all fields, including + # `SourceInfo`. # @param [String] view # Specifies which parts of the Service Config should be returned in the # response. diff --git a/generated/google/apis/serviceuser_v1.rb b/generated/google/apis/serviceuser_v1.rb index 0d581a137..1c3e2be6e 100644 --- a/generated/google/apis/serviceuser_v1.rb +++ b/generated/google/apis/serviceuser_v1.rb @@ -27,7 +27,7 @@ module Google # @see https://cloud.google.com/service-management/ module ServiceuserV1 VERSION = 'V1' - REVISION = '20180813' + REVISION = '20180824' # 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/serviceuser_v1/classes.rb b/generated/google/apis/serviceuser_v1/classes.rb index 0e612f707..4ab2d1eac 100644 --- a/generated/google/apis/serviceuser_v1/classes.rb +++ b/generated/google/apis/serviceuser_v1/classes.rb @@ -2952,7 +2952,7 @@ module Google # A unique ID for a specific instance of this message, typically assigned # by the client for tracking purpose. If empty, the server may choose to - # generate one instead. + # generate one instead. Must be no longer than 60 characters. # Corresponds to the JSON property `id` # @return [String] attr_accessor :id diff --git a/generated/google/apis/storage_v1.rb b/generated/google/apis/storage_v1.rb index 32f8f726e..9233c2ef7 100644 --- a/generated/google/apis/storage_v1.rb +++ b/generated/google/apis/storage_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/storage/docs/json_api/ module StorageV1 VERSION = 'V1' - REVISION = '20180620' + REVISION = '20180824' # 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/storage_v1/classes.rb b/generated/google/apis/storage_v1/classes.rb index 217675bca..ddda012db 100644 --- a/generated/google/apis/storage_v1/classes.rb +++ b/generated/google/apis/storage_v1/classes.rb @@ -384,6 +384,15 @@ module Google attr_accessor :is_live alias_method :is_live?, :is_live + # A regular expression that satisfies the RE2 syntax language. This condition is + # satisfied when the name of the object matches the RE2 pattern. Note: This + # feature is currently in the "Early Access" launch stage and is only available + # to a whitelisted set of users; that means that this feature may changed in + # backward-incompatible ways and that it is not guaranteed to be released. + # Corresponds to the JSON property `matchesPattern` + # @return [String] + attr_accessor :matches_pattern + # Objects having any of the storage classes specified by this condition will be # matched. Values include MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, STANDARD, # and DURABLE_REDUCED_AVAILABILITY. @@ -407,6 +416,7 @@ module Google @age = args[:age] if args.key?(:age) @created_before = args[:created_before] if args.key?(:created_before) @is_live = args[:is_live] if args.key?(:is_live) + @matches_pattern = args[:matches_pattern] if args.key?(:matches_pattern) @matches_storage_class = args[:matches_storage_class] if args.key?(:matches_storage_class) @num_newer_versions = args[:num_newer_versions] if args.key?(:num_newer_versions) end @@ -1095,7 +1105,7 @@ module Google attr_accessor :kind # Cloud KMS Key used to encrypt this object, if the object is encrypted by such - # a key. Limited availability; usable only by enabled projects. + # a key. # Corresponds to the JSON property `kmsKeyName` # @return [String] attr_accessor :kms_key_name diff --git a/generated/google/apis/storage_v1/representations.rb b/generated/google/apis/storage_v1/representations.rb index 3d63c146f..5c84f8903 100644 --- a/generated/google/apis/storage_v1/representations.rb +++ b/generated/google/apis/storage_v1/representations.rb @@ -329,6 +329,7 @@ module Google property :created_before, as: 'createdBefore', type: Date property :is_live, as: 'isLive' + property :matches_pattern, as: 'matchesPattern' collection :matches_storage_class, as: 'matchesStorageClass' property :num_newer_versions, as: 'numNewerVersions' end diff --git a/generated/google/apis/storage_v1/service.rb b/generated/google/apis/storage_v1/service.rb index a9687e19b..be9400ae0 100644 --- a/generated/google/apis/storage_v1/service.rb +++ b/generated/google/apis/storage_v1/service.rb @@ -1832,8 +1832,7 @@ module Google # @param [String] kms_key_name # Resource name of the Cloud KMS key, of the form projects/my-project/locations/ # global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the - # object. Overrides the object metadata's kms_key_name value, if any. Limited - # availability; usable only by enabled projects. + # object. Overrides the object metadata's kms_key_name value, if any. # @param [String] name # Name of the object. Required when the object metadata is not otherwise # provided. Overrides the object metadata's name value, if any. For information