From c6e1a022f393e225b3e22d7b78c727e40ea2fde1 Mon Sep 17 00:00:00 2001 From: Google APIs Date: Fri, 7 Sep 2018 00:36:30 +0000 Subject: [PATCH] Autogenerated update (2018-09-07) Update: - container_v1 - language_v1beta2 - logging_v2 - logging_v2beta1 - ml_v1 - websecurityscanner_v1alpha --- api_names_out.yaml | 102 +++ generated/google/apis/container_v1.rb | 2 +- generated/google/apis/container_v1/classes.rb | 1 + generated/google/apis/language_v1beta2.rb | 2 +- .../google/apis/language_v1beta2/classes.rb | 12 +- generated/google/apis/logging_v2.rb | 2 +- generated/google/apis/logging_v2/classes.rb | 9 +- generated/google/apis/logging_v2beta1.rb | 2 +- .../google/apis/logging_v2beta1/classes.rb | 9 +- generated/google/apis/ml_v1.rb | 2 +- generated/google/apis/ml_v1/classes.rb | 30 +- generated/google/apis/redis_v1.rb | 35 + generated/google/apis/redis_v1/classes.rb | 597 ++++++++++++++++++ .../google/apis/redis_v1/representations.rb | 207 ++++++ generated/google/apis/redis_v1/service.rb | 498 +++++++++++++++ .../google/apis/websecurityscanner_v1alpha.rb | 2 +- 16 files changed, 1492 insertions(+), 20 deletions(-) create mode 100644 generated/google/apis/redis_v1.rb create mode 100644 generated/google/apis/redis_v1/classes.rb create mode 100644 generated/google/apis/redis_v1/representations.rb create mode 100644 generated/google/apis/redis_v1/service.rb diff --git a/api_names_out.yaml b/api_names_out.yaml index b03fa8010..de1e1cf9f 100644 --- a/api_names_out.yaml +++ b/api_names_out.yaml @@ -73517,6 +73517,108 @@ "/qpxExpress:v1/qpxExpress.trips.search": search_trips "/qpxExpress:v1/quotaUser": quota_user "/qpxExpress:v1/userIp": user_ip +"/redis:v1/Empty": empty +"/redis:v1/GoogleCloudRedisV1LocationMetadata": google_cloud_redis_v1_location_metadata +"/redis:v1/GoogleCloudRedisV1LocationMetadata/availableZones": available_zones +"/redis:v1/GoogleCloudRedisV1LocationMetadata/availableZones/available_zone": available_zone +"/redis:v1/GoogleCloudRedisV1OperationMetadata": google_cloud_redis_v1_operation_metadata +"/redis:v1/GoogleCloudRedisV1OperationMetadata/apiVersion": api_version +"/redis:v1/GoogleCloudRedisV1OperationMetadata/cancelRequested": cancel_requested +"/redis:v1/GoogleCloudRedisV1OperationMetadata/createTime": create_time +"/redis:v1/GoogleCloudRedisV1OperationMetadata/endTime": end_time +"/redis:v1/GoogleCloudRedisV1OperationMetadata/statusDetail": status_detail +"/redis:v1/GoogleCloudRedisV1OperationMetadata/target": target +"/redis:v1/GoogleCloudRedisV1OperationMetadata/verb": verb +"/redis:v1/GoogleCloudRedisV1ZoneMetadata": google_cloud_redis_v1_zone_metadata +"/redis:v1/Instance": instance +"/redis:v1/Instance/alternativeLocationId": alternative_location_id +"/redis:v1/Instance/authorizedNetwork": authorized_network +"/redis:v1/Instance/createTime": create_time +"/redis:v1/Instance/currentLocationId": current_location_id +"/redis:v1/Instance/displayName": display_name +"/redis:v1/Instance/host": host +"/redis:v1/Instance/labels": labels +"/redis:v1/Instance/labels/label": label +"/redis:v1/Instance/locationId": location_id +"/redis:v1/Instance/memorySizeGb": memory_size_gb +"/redis:v1/Instance/name": name +"/redis:v1/Instance/port": port +"/redis:v1/Instance/redisConfigs": redis_configs +"/redis:v1/Instance/redisConfigs/redis_config": redis_config +"/redis:v1/Instance/redisVersion": redis_version +"/redis:v1/Instance/reservedIpRange": reserved_ip_range +"/redis:v1/Instance/state": state +"/redis:v1/Instance/statusMessage": status_message +"/redis:v1/Instance/tier": tier +"/redis:v1/ListInstancesResponse": list_instances_response +"/redis:v1/ListInstancesResponse/instances": instances +"/redis:v1/ListInstancesResponse/instances/instance": instance +"/redis:v1/ListInstancesResponse/nextPageToken": next_page_token +"/redis:v1/ListLocationsResponse": list_locations_response +"/redis:v1/ListLocationsResponse/locations": locations +"/redis:v1/ListLocationsResponse/locations/location": location +"/redis:v1/ListLocationsResponse/nextPageToken": next_page_token +"/redis:v1/ListOperationsResponse": list_operations_response +"/redis:v1/ListOperationsResponse/nextPageToken": next_page_token +"/redis:v1/ListOperationsResponse/operations": operations +"/redis:v1/ListOperationsResponse/operations/operation": operation +"/redis:v1/Location": location +"/redis:v1/Location/displayName": display_name +"/redis:v1/Location/labels": labels +"/redis:v1/Location/labels/label": label +"/redis:v1/Location/locationId": location_id +"/redis:v1/Location/metadata": metadata +"/redis:v1/Location/metadata/metadatum": metadatum +"/redis:v1/Location/name": name +"/redis:v1/Operation": operation +"/redis:v1/Operation/done": done +"/redis:v1/Operation/error": error +"/redis:v1/Operation/metadata": metadata +"/redis:v1/Operation/metadata/metadatum": metadatum +"/redis:v1/Operation/name": name +"/redis:v1/Operation/response": response +"/redis:v1/Operation/response/response": response +"/redis:v1/Status": status +"/redis:v1/Status/code": code +"/redis:v1/Status/details": details +"/redis:v1/Status/details/detail": detail +"/redis:v1/Status/details/detail/detail": detail +"/redis:v1/Status/message": message +"/redis:v1/fields": fields +"/redis:v1/key": key +"/redis:v1/quotaUser": quota_user +"/redis:v1/redis.projects.locations.get": get_project_location +"/redis:v1/redis.projects.locations.get/name": name +"/redis:v1/redis.projects.locations.instances.create": create_project_location_instance +"/redis:v1/redis.projects.locations.instances.create/instanceId": instance_id +"/redis:v1/redis.projects.locations.instances.create/parent": parent +"/redis:v1/redis.projects.locations.instances.delete": delete_project_location_instance +"/redis:v1/redis.projects.locations.instances.delete/name": name +"/redis:v1/redis.projects.locations.instances.get": get_project_location_instance +"/redis:v1/redis.projects.locations.instances.get/name": name +"/redis:v1/redis.projects.locations.instances.list": list_project_location_instances +"/redis:v1/redis.projects.locations.instances.list/pageSize": page_size +"/redis:v1/redis.projects.locations.instances.list/pageToken": page_token +"/redis:v1/redis.projects.locations.instances.list/parent": parent +"/redis:v1/redis.projects.locations.instances.patch": patch_project_location_instance +"/redis:v1/redis.projects.locations.instances.patch/name": name +"/redis:v1/redis.projects.locations.instances.patch/updateMask": update_mask +"/redis:v1/redis.projects.locations.list": list_project_locations +"/redis:v1/redis.projects.locations.list/filter": filter +"/redis:v1/redis.projects.locations.list/name": name +"/redis:v1/redis.projects.locations.list/pageSize": page_size +"/redis:v1/redis.projects.locations.list/pageToken": page_token +"/redis:v1/redis.projects.locations.operations.cancel": cancel_project_location_operation +"/redis:v1/redis.projects.locations.operations.cancel/name": name +"/redis:v1/redis.projects.locations.operations.delete": delete_project_location_operation +"/redis:v1/redis.projects.locations.operations.delete/name": name +"/redis:v1/redis.projects.locations.operations.get": get_project_location_operation +"/redis:v1/redis.projects.locations.operations.get/name": name +"/redis:v1/redis.projects.locations.operations.list": list_project_location_operations +"/redis:v1/redis.projects.locations.operations.list/filter": filter +"/redis:v1/redis.projects.locations.operations.list/name": name +"/redis:v1/redis.projects.locations.operations.list/pageSize": page_size +"/redis:v1/redis.projects.locations.operations.list/pageToken": page_token "/redis:v1beta1/Empty": empty "/redis:v1beta1/GoogleCloudCommonOperationMetadata": google_cloud_common_operation_metadata "/redis:v1beta1/GoogleCloudCommonOperationMetadata/apiVersion": api_version diff --git a/generated/google/apis/container_v1.rb b/generated/google/apis/container_v1.rb index 8a20c054a..6eaeaf382 100644 --- a/generated/google/apis/container_v1.rb +++ b/generated/google/apis/container_v1.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/container-engine/ module ContainerV1 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/container_v1/classes.rb b/generated/google/apis/container_v1/classes.rb index be9a2cd74..b5622343c 100644 --- a/generated/google/apis/container_v1/classes.rb +++ b/generated/google/apis/container_v1/classes.rb @@ -1377,6 +1377,7 @@ module Google # "cluster-name" # "cluster-uid" # "configure-sh" + # "enable-os-login" # "gci-update-strategy" # "gci-ensure-gke-docker" # "instance-template" diff --git a/generated/google/apis/language_v1beta2.rb b/generated/google/apis/language_v1beta2.rb index 8aa748b59..c4275d7c0 100644 --- a/generated/google/apis/language_v1beta2.rb +++ b/generated/google/apis/language_v1beta2.rb @@ -27,7 +27,7 @@ module Google # @see https://cloud.google.com/natural-language/ module LanguageV1beta2 VERSION = 'V1beta2' - REVISION = '20180827' + REVISION = '20180903' # Apply machine learning models to reveal the structure and meaning of text AUTH_CLOUD_LANGUAGE = 'https://www.googleapis.com/auth/cloud-language' diff --git a/generated/google/apis/language_v1beta2/classes.rb b/generated/google/apis/language_v1beta2/classes.rb index d8f60ae66..f0481f12c 100644 --- a/generated/google/apis/language_v1beta2/classes.rb +++ b/generated/google/apis/language_v1beta2/classes.rb @@ -161,7 +161,7 @@ module Google # Represents the feeling associated with the entire text or entities in # the text. - # Next ID: 5 + # Next ID: 6 # Corresponds to the JSON property `documentSentiment` # @return [Google::Apis::LanguageV1beta2::Sentiment] attr_accessor :document_sentiment @@ -295,7 +295,7 @@ module Google # Represents the feeling associated with the entire text or entities in # the text. - # Next ID: 5 + # Next ID: 6 # Corresponds to the JSON property `documentSentiment` # @return [Google::Apis::LanguageV1beta2::Sentiment] attr_accessor :document_sentiment @@ -522,7 +522,7 @@ module Google # Represents the feeling associated with the entire text or entities in # the text. - # Next ID: 5 + # Next ID: 6 # Corresponds to the JSON property `sentiment` # @return [Google::Apis::LanguageV1beta2::Sentiment] attr_accessor :sentiment @@ -554,7 +554,7 @@ module Google # Represents the feeling associated with the entire text or entities in # the text. - # Next ID: 5 + # Next ID: 6 # Corresponds to the JSON property `sentiment` # @return [Google::Apis::LanguageV1beta2::Sentiment] attr_accessor :sentiment @@ -724,7 +724,7 @@ module Google # Represents the feeling associated with the entire text or entities in # the text. - # Next ID: 5 + # Next ID: 6 # Corresponds to the JSON property `sentiment` # @return [Google::Apis::LanguageV1beta2::Sentiment] attr_accessor :sentiment @@ -747,7 +747,7 @@ module Google # Represents the feeling associated with the entire text or entities in # the text. - # Next ID: 5 + # Next ID: 6 class Sentiment include Google::Apis::Core::Hashable diff --git a/generated/google/apis/logging_v2.rb b/generated/google/apis/logging_v2.rb index 79f2102b8..b0a8a5253 100644 --- a/generated/google/apis/logging_v2.rb +++ b/generated/google/apis/logging_v2.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/logging/docs/ module LoggingV2 VERSION = 'V2' - REVISION = '20180806' + REVISION = '20180831' # 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/logging_v2/classes.rb b/generated/google/apis/logging_v2/classes.rb index e860e0d57..4ebbfce48 100644 --- a/generated/google/apis/logging_v2/classes.rb +++ b/generated/google/apis/logging_v2/classes.rb @@ -423,7 +423,9 @@ module Google # "organizations/[ORGANIZATION_ID]" # "billingAccounts/[BILLING_ACCOUNT_ID]" # "folders/[FOLDER_ID]" - # Projects listed in the project_ids field are added to this list. + # Projects listed in the project_ids field are added to this list. Only one of + # the permissions, logging.logEntries.list or logging. + # privateLogEntries.list, is needed for each parent resource. # Corresponds to the JSON property `resourceNames` # @return [Array] attr_accessor :resource_names @@ -1774,7 +1776,10 @@ module Google # "folders/[FOLDER_ID]/logs/[LOG_ID]" # [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog" # or "organizations/1234567890/logs/cloudresourcemanager.googleapis.com% - # 2Factivity". For more information about log names, see LogEntry. + # 2Factivity". The permission logging.logEntries.create is needed + # on each project, organization, billing account, or folder that is receiving + # new log entries, whether the resource is specified in logName or + # in an individual log entry. For more information about log names, see LogEntry. # Corresponds to the JSON property `logName` # @return [String] attr_accessor :log_name diff --git a/generated/google/apis/logging_v2beta1.rb b/generated/google/apis/logging_v2beta1.rb index e50457bef..3500834f0 100644 --- a/generated/google/apis/logging_v2beta1.rb +++ b/generated/google/apis/logging_v2beta1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/logging/docs/ module LoggingV2beta1 VERSION = 'V2beta1' - REVISION = '20180806' + REVISION = '20180831' # 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/logging_v2beta1/classes.rb b/generated/google/apis/logging_v2beta1/classes.rb index f247bf851..003c3259f 100644 --- a/generated/google/apis/logging_v2beta1/classes.rb +++ b/generated/google/apis/logging_v2beta1/classes.rb @@ -396,7 +396,9 @@ module Google # "organizations/[ORGANIZATION_ID]" # "billingAccounts/[BILLING_ACCOUNT_ID]" # "folders/[FOLDER_ID]" - # Projects listed in the project_ids field are added to this list. + # Projects listed in the project_ids field are added to this list. Only one of + # the permissions, logging.logEntries.list or logging. + # privateLogEntries.list, is needed for each parent resource. # Corresponds to the JSON property `resourceNames` # @return [Array] attr_accessor :resource_names @@ -1697,7 +1699,10 @@ module Google # "folders/[FOLDER_ID]/logs/[LOG_ID]" # [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog" # or "organizations/1234567890/logs/cloudresourcemanager.googleapis.com% - # 2Factivity". For more information about log names, see LogEntry. + # 2Factivity". The permission logging.logEntries.create is needed + # on each project, organization, billing account, or folder that is receiving + # new log entries, whether the resource is specified in logName or + # in an individual log entry. For more information about log names, see LogEntry. # Corresponds to the JSON property `logName` # @return [String] attr_accessor :log_name diff --git a/generated/google/apis/ml_v1.rb b/generated/google/apis/ml_v1.rb index cc2d7944e..962a267ad 100644 --- a/generated/google/apis/ml_v1.rb +++ b/generated/google/apis/ml_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/ml/ module MlV1 VERSION = 'V1' - REVISION = '20180804' + REVISION = '20180903' # 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/ml_v1/classes.rb b/generated/google/apis/ml_v1/classes.rb index 9d9f0655b..5625c8e34 100644 --- a/generated/google/apis/ml_v1/classes.rb +++ b/generated/google/apis/ml_v1/classes.rb @@ -1165,14 +1165,36 @@ module Google #
standard_p100
#
# A machine equivalent to standard that - # also includes a single NVIDIA Tesla P100 GPU. The availability of these - # GPUs is in the Beta launch stage. + # also includes a single NVIDIA Tesla P100 GPU. #
#
complex_model_m_p100
#
# A machine equivalent to complex_model_m that also includes - # four NVIDIA Tesla P100 GPUs. The availability of these GPUs is in - # the Beta launch stage. + # four NVIDIA Tesla P100 GPUs. + #
+ #
standard_v100
+ #
+ # A machine equivalent to standard that + # also includes a single NVIDIA Tesla V100 GPU. The availability of these + # GPUs is in the Beta launch stage. + #
+ #
large_model_v100
+ #
+ # A machine equivalent to large_model that + # also includes a single NVIDIA Tesla V100 GPU. The availability of these + # GPUs is in the Beta launch stage. + #
+ #
complex_model_m_v100
+ #
+ # A machine equivalent to complex_model_m that + # also includes four NVIDIA Tesla V100 GPUs. The availability of these + # GPUs is in the Beta launch stage. + #
+ #
complex_model_l_v100
+ #
+ # A machine equivalent to complex_model_l that + # also includes eight NVIDIA Tesla V100 GPUs. The availability of these + # GPUs is in the Beta launch stage. #
#
cloud_tpu
#
diff --git a/generated/google/apis/redis_v1.rb b/generated/google/apis/redis_v1.rb new file mode 100644 index 000000000..7e9b19113 --- /dev/null +++ b/generated/google/apis/redis_v1.rb @@ -0,0 +1,35 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'google/apis/redis_v1/service.rb' +require 'google/apis/redis_v1/classes.rb' +require 'google/apis/redis_v1/representations.rb' + +module Google + module Apis + # Google Cloud Memorystore for Redis API + # + # The Google Cloud Memorystore for Redis API is used for creating and managing + # Redis instances on the Google Cloud Platform. + # + # @see https://cloud.google.com/memorystore/docs/redis/ + module RedisV1 + VERSION = 'V1' + REVISION = '20180906' + + # View and manage your data across Google Cloud Platform services + AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' + end + end +end diff --git a/generated/google/apis/redis_v1/classes.rb b/generated/google/apis/redis_v1/classes.rb new file mode 100644 index 000000000..fbed0d904 --- /dev/null +++ b/generated/google/apis/redis_v1/classes.rb @@ -0,0 +1,597 @@ +# 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 RedisV1 + + # 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 + + # This location metadata represents additional configuration options for a + # given location where a Redis instance may be created. All fields are output + # only. It is returned as content of the + # `google.cloud.location.Location.metadata` field. + class GoogleCloudRedisV1LocationMetadata + include Google::Apis::Core::Hashable + + # Output only. The set of available zones in the location. The map is keyed + # by the lowercase ID of each zone, as defined by GCE. These keys can be + # specified in `location_id` or `alternative_location_id` fields when + # creating a Redis instance. + # Corresponds to the JSON property `availableZones` + # @return [Hash] + attr_accessor :available_zones + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @available_zones = args[:available_zones] if args.key?(:available_zones) + end + end + + # Represents the v1 metadata of the long-running operation. + class GoogleCloudRedisV1OperationMetadata + include Google::Apis::Core::Hashable + + # API version. + # Corresponds to the JSON property `apiVersion` + # @return [String] + attr_accessor :api_version + + # Specifies if cancellation was requested for the operaiton. + # Corresponds to the JSON property `cancelRequested` + # @return [Boolean] + attr_accessor :cancel_requested + alias_method :cancel_requested?, :cancel_requested + + # Creation timestamp. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # End timestamp. + # Corresponds to the JSON property `endTime` + # @return [String] + attr_accessor :end_time + + # Operation status details. + # Corresponds to the JSON property `statusDetail` + # @return [String] + attr_accessor :status_detail + + # Operation target. + # Corresponds to the JSON property `target` + # @return [String] + attr_accessor :target + + # Operation verb. + # Corresponds to the JSON property `verb` + # @return [String] + attr_accessor :verb + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @api_version = args[:api_version] if args.key?(:api_version) + @cancel_requested = args[:cancel_requested] if args.key?(:cancel_requested) + @create_time = args[:create_time] if args.key?(:create_time) + @end_time = args[:end_time] if args.key?(:end_time) + @status_detail = args[:status_detail] if args.key?(:status_detail) + @target = args[:target] if args.key?(:target) + @verb = args[:verb] if args.key?(:verb) + end + end + + # Defines specific information for a particular zone. Currently empty and + # reserved for future use only. + class GoogleCloudRedisV1ZoneMetadata + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # A Google Cloud Redis instance. + class Instance + include Google::Apis::Core::Hashable + + # Optional. Only applicable to STANDARD_HA tier which protects the instance + # against zonal failures by provisioning it across two zones. If provided, it + # must be a different zone from the one provided in [location_id]. + # Corresponds to the JSON property `alternativeLocationId` + # @return [String] + attr_accessor :alternative_location_id + + # Optional. The full name of the Google Compute Engine + # [network](/compute/docs/networks-and-firewalls#networks) to which the + # instance is connected. If left unspecified, the `default` network + # will be used. + # Corresponds to the JSON property `authorizedNetwork` + # @return [String] + attr_accessor :authorized_network + + # Output only. The time the instance was created. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # Output only. The current zone where the Redis endpoint is placed. For Basic + # Tier instances, this will always be the same as the [location_id] + # provided by the user at creation time. For Standard Tier instances, + # this can be either [location_id] or [alternative_location_id] and can + # change after a failover event. + # Corresponds to the JSON property `currentLocationId` + # @return [String] + attr_accessor :current_location_id + + # An arbitrary and optional user-provided name for the instance. + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # Output only. Hostname or IP address of the exposed Redis endpoint used by + # clients to connect to the service. + # Corresponds to the JSON property `host` + # @return [String] + attr_accessor :host + + # Resource labels to represent user provided metadata + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # Optional. The zone where the instance will be provisioned. If not provided, + # the service will choose a zone for the instance. For STANDARD_HA tier, + # instances will be created across two zones for protection against zonal + # failures. If [alternative_location_id] is also provided, it must be + # different from [location_id]. + # Corresponds to the JSON property `locationId` + # @return [String] + attr_accessor :location_id + + # Required. Redis memory size in GiB. + # Corresponds to the JSON property `memorySizeGb` + # @return [Fixnum] + attr_accessor :memory_size_gb + + # Required. Unique name of the resource in this scope including project and + # location using the form: + # `projects/`project_id`/locations/`location_id`/instances/`instance_id`` + # Note: Redis instances are managed and addressed at regional level so + # location_id here refers to a GCP region; however, users may choose which + # specific zone (or collection of zones for cross-zone instances) an instance + # should be provisioned in. Refer to [location_id] and + # [alternative_location_id] fields for more details. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Output only. The port number of the exposed Redis endpoint. + # Corresponds to the JSON property `port` + # @return [Fixnum] + attr_accessor :port + + # Optional. Redis configuration parameters, according to + # http://redis.io/topics/config. Currently, the only supported parameters + # are: + # * maxmemory-policy + # * notify-keyspace-events + # Corresponds to the JSON property `redisConfigs` + # @return [Hash] + attr_accessor :redis_configs + + # Optional. The version of Redis software. + # If not provided, latest supported version will be used. Updating the + # version will perform an upgrade/downgrade to the new version. Currently, + # the supported values are `REDIS_3_2` for Redis 3.2. + # Corresponds to the JSON property `redisVersion` + # @return [String] + attr_accessor :redis_version + + # Optional. The CIDR range of internal addresses that are reserved for this + # instance. If not provided, the service will choose an unused /29 block, + # for example, 10.0.0.0/29 or 192.168.0.0/29. Ranges must be unique + # and non-overlapping with existing subnets in an authorized network. + # Corresponds to the JSON property `reservedIpRange` + # @return [String] + attr_accessor :reserved_ip_range + + # Output only. The current state of this instance. + # Corresponds to the JSON property `state` + # @return [String] + attr_accessor :state + + # Output only. Additional information about the current status of this + # instance, if available. + # Corresponds to the JSON property `statusMessage` + # @return [String] + attr_accessor :status_message + + # Required. The service tier of the instance. + # Corresponds to the JSON property `tier` + # @return [String] + attr_accessor :tier + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @alternative_location_id = args[:alternative_location_id] if args.key?(:alternative_location_id) + @authorized_network = args[:authorized_network] if args.key?(:authorized_network) + @create_time = args[:create_time] if args.key?(:create_time) + @current_location_id = args[:current_location_id] if args.key?(:current_location_id) + @display_name = args[:display_name] if args.key?(:display_name) + @host = args[:host] if args.key?(:host) + @labels = args[:labels] if args.key?(:labels) + @location_id = args[:location_id] if args.key?(:location_id) + @memory_size_gb = args[:memory_size_gb] if args.key?(:memory_size_gb) + @name = args[:name] if args.key?(:name) + @port = args[:port] if args.key?(:port) + @redis_configs = args[:redis_configs] if args.key?(:redis_configs) + @redis_version = args[:redis_version] if args.key?(:redis_version) + @reserved_ip_range = args[:reserved_ip_range] if args.key?(:reserved_ip_range) + @state = args[:state] if args.key?(:state) + @status_message = args[:status_message] if args.key?(:status_message) + @tier = args[:tier] if args.key?(:tier) + end + end + + # Response for ListInstances. + class ListInstancesResponse + include Google::Apis::Core::Hashable + + # A list of Redis instances in the project in the specified location, + # or across all locations. + # If the `location_id` in the parent field of the request is "-", all regions + # available to the project are queried, and the results aggregated. + # If in such an aggregated query a location is unavailable, a dummy Redis + # entry is included in the response with the "name" field set to a value of + # the form projects/`project_id`/locations/`location_id`/instances/- and the + # "status" field set to ERROR and "status_message" field set to "location not + # available for ListInstances". + # Corresponds to the JSON property `instances` + # @return [Array] + attr_accessor :instances + + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + # 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) + @instances = args[:instances] if args.key?(:instances) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # The response message for Locations.ListLocations. + class ListLocationsResponse + include Google::Apis::Core::Hashable + + # A list of locations that matches the specified filter in the request. + # Corresponds to the JSON property `locations` + # @return [Array] + attr_accessor :locations + + # The standard List next-page token. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @locations = args[:locations] if args.key?(:locations) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # The response message for Operations.ListOperations. + class ListOperationsResponse + include Google::Apis::Core::Hashable + + # The standard List next-page token. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # A list of operations that matches the specified filter in the request. + # Corresponds to the JSON property `operations` + # @return [Array] + attr_accessor :operations + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @operations = args[:operations] if args.key?(:operations) + end + end + + # A resource that represents Google Cloud Platform location. + class Location + include Google::Apis::Core::Hashable + + # The friendly name for this location, typically a nearby city name. + # For example, "Tokyo". + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # Cross-service attributes for the location. For example + # `"cloud.googleapis.com/region": "us-east1"` + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # Resource ID for the region. For example: "us-east1". + # Corresponds to the JSON property `locationId` + # @return [String] + attr_accessor :location_id + + # Output only. The set of available zones in the location. The map is keyed by + # the lowercase ID of each zone, as defined by Compute Engine. These keys can be + # specified in `location_id` or `alternative_location_id` fields when creating a + # Redis instance. + # Corresponds to the JSON property `metadata` + # @return [Hash] + attr_accessor :metadata + + # Full resource name for the region. For example: "projects/example-project/ + # locations/us-east1". + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @display_name = args[:display_name] if args.key?(:display_name) + @labels = args[:labels] if args.key?(:labels) + @location_id = args[:location_id] if args.key?(:location_id) + @metadata = args[:metadata] if args.key?(:metadata) + @name = args[:name] if args.key?(:name) + end + end + + # This resource represents a long-running operation that is the result of a + # network API call. + class Operation + include Google::Apis::Core::Hashable + + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # Corresponds to the JSON property `done` + # @return [Boolean] + attr_accessor :done + alias_method :done?, :done + + # The `Status` type defines a logical error model that is suitable for different + # programming environments, including REST APIs and RPC APIs. It is used by + # [gRPC](https://github.com/grpc). The error model is designed to be: + # - Simple to use and understand for most users + # - Flexible enough to meet unexpected needs + # # Overview + # The `Status` message contains three pieces of data: error code, error message, + # and error details. The error code should be an enum value of + # google.rpc.Code, but it may accept additional error codes if needed. The + # error message should be a developer-facing English message that helps + # developers *understand* and *resolve* the error. If a localized user-facing + # error message is needed, put the localized message in the error details or + # localize it in the client. The optional error details may contain arbitrary + # information about the error. There is a predefined set of error detail types + # in the package `google.rpc` that can be used for common error conditions. + # # Language mapping + # The `Status` message is the logical representation of the error model, but it + # is not necessarily the actual wire format. When the `Status` message is + # exposed in different client libraries and different wire protocols, it can be + # mapped differently. For example, it will likely be mapped to some exceptions + # in Java, but more likely mapped to some error codes in C. + # # Other uses + # The error model and the `Status` message can be used in a variety of + # environments, either with or without APIs, to provide a + # consistent developer experience across different environments. + # Example uses of this error model include: + # - Partial errors. If a service needs to return partial errors to the client, + # it may embed the `Status` in the normal response to indicate the partial + # errors. + # - Workflow errors. A typical workflow has multiple steps. Each step may + # have a `Status` message for error reporting. + # - Batch operations. If a client uses batch request and batch response, the + # `Status` message should be used directly inside batch response, one for + # each error sub-response. + # - Asynchronous operations. If an API call embeds asynchronous operation + # results in its response, the status of those operations should be + # represented directly using the `Status` message. + # - Logging. If some API errors are stored in logs, the message `Status` could + # be used directly after any stripping needed for security/privacy reasons. + # Corresponds to the JSON property `error` + # @return [Google::Apis::RedisV1::Status] + attr_accessor :error + + # ` + # `createTime`: The time the operation was created. + # `endTime`: The time the operation finished running. + # `target`: Server-defined resource path for the target of the operation. + # `verb`: Name of the verb executed by the operation. + # `statusDetail`: Human-readable status of the operation, if any. + # `cancelRequested`: Identifies whether the user has requested cancellation of + # the operation. Operations that have successfully been cancelled have Operation. + # error value with a google.rpc.Status.code of 1, corresponding to `Code. + # CANCELLED`. + # `apiVersion`: API version used to start the operation. + # ` + # Corresponds to the JSON property `metadata` + # @return [Hash] + attr_accessor :metadata + + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should have the format of `operations/some/unique/name`. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The normal response of the operation in case of success. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # Corresponds to the JSON property `response` + # @return [Hash] + attr_accessor :response + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @done = args[:done] if args.key?(:done) + @error = args[:error] if args.key?(:error) + @metadata = args[:metadata] if args.key?(:metadata) + @name = args[:name] if args.key?(:name) + @response = args[:response] if args.key?(:response) + end + end + + # The `Status` type defines a logical error model that is suitable for different + # programming environments, including REST APIs and RPC APIs. It is used by + # [gRPC](https://github.com/grpc). The error model is designed to be: + # - Simple to use and understand for most users + # - Flexible enough to meet unexpected needs + # # Overview + # The `Status` message contains three pieces of data: error code, error message, + # and error details. The error code should be an enum value of + # google.rpc.Code, but it may accept additional error codes if needed. The + # error message should be a developer-facing English message that helps + # developers *understand* and *resolve* the error. If a localized user-facing + # error message is needed, put the localized message in the error details or + # localize it in the client. The optional error details may contain arbitrary + # information about the error. There is a predefined set of error detail types + # in the package `google.rpc` that can be used for common error conditions. + # # Language mapping + # The `Status` message is the logical representation of the error model, but it + # is not necessarily the actual wire format. When the `Status` message is + # exposed in different client libraries and different wire protocols, it can be + # mapped differently. For example, it will likely be mapped to some exceptions + # in Java, but more likely mapped to some error codes in C. + # # Other uses + # The error model and the `Status` message can be used in a variety of + # environments, either with or without APIs, to provide a + # consistent developer experience across different environments. + # Example uses of this error model include: + # - Partial errors. If a service needs to return partial errors to the client, + # it may embed the `Status` in the normal response to indicate the partial + # errors. + # - Workflow errors. A typical workflow has multiple steps. Each step may + # have a `Status` message for error reporting. + # - Batch operations. If a client uses batch request and batch response, the + # `Status` message should be used directly inside batch response, one for + # each error sub-response. + # - Asynchronous operations. If an API call embeds asynchronous operation + # results in its response, the status of those operations should be + # represented directly using the `Status` message. + # - Logging. If some API errors are stored in logs, the message `Status` could + # be used directly after any stripping needed for security/privacy reasons. + class Status + include Google::Apis::Core::Hashable + + # The status code, which should be an enum value of google.rpc.Code. + # Corresponds to the JSON property `code` + # @return [Fixnum] + attr_accessor :code + + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + # Corresponds to the JSON property `details` + # @return [Array>] + attr_accessor :details + + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # google.rpc.Status.details field, or localized by the client. + # Corresponds to the JSON property `message` + # @return [String] + attr_accessor :message + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @code = args[:code] if args.key?(:code) + @details = args[:details] if args.key?(:details) + @message = args[:message] if args.key?(:message) + end + end + end + end +end diff --git a/generated/google/apis/redis_v1/representations.rb b/generated/google/apis/redis_v1/representations.rb new file mode 100644 index 000000000..0d021c851 --- /dev/null +++ b/generated/google/apis/redis_v1/representations.rb @@ -0,0 +1,207 @@ +# 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 RedisV1 + + class Empty + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRedisV1LocationMetadata + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRedisV1OperationMetadata + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRedisV1ZoneMetadata + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Instance + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListInstancesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListLocationsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListOperationsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Location + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Operation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Status + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Empty + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class GoogleCloudRedisV1LocationMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + hash :available_zones, as: 'availableZones', class: Google::Apis::RedisV1::GoogleCloudRedisV1ZoneMetadata, decorator: Google::Apis::RedisV1::GoogleCloudRedisV1ZoneMetadata::Representation + + end + end + + class GoogleCloudRedisV1OperationMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :api_version, as: 'apiVersion' + property :cancel_requested, as: 'cancelRequested' + property :create_time, as: 'createTime' + property :end_time, as: 'endTime' + property :status_detail, as: 'statusDetail' + property :target, as: 'target' + property :verb, as: 'verb' + end + end + + class GoogleCloudRedisV1ZoneMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class Instance + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :alternative_location_id, as: 'alternativeLocationId' + property :authorized_network, as: 'authorizedNetwork' + property :create_time, as: 'createTime' + property :current_location_id, as: 'currentLocationId' + property :display_name, as: 'displayName' + property :host, as: 'host' + hash :labels, as: 'labels' + property :location_id, as: 'locationId' + property :memory_size_gb, as: 'memorySizeGb' + property :name, as: 'name' + property :port, as: 'port' + hash :redis_configs, as: 'redisConfigs' + property :redis_version, as: 'redisVersion' + property :reserved_ip_range, as: 'reservedIpRange' + property :state, as: 'state' + property :status_message, as: 'statusMessage' + property :tier, as: 'tier' + end + end + + class ListInstancesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :instances, as: 'instances', class: Google::Apis::RedisV1::Instance, decorator: Google::Apis::RedisV1::Instance::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class ListLocationsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :locations, as: 'locations', class: Google::Apis::RedisV1::Location, decorator: Google::Apis::RedisV1::Location::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class ListOperationsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :operations, as: 'operations', class: Google::Apis::RedisV1::Operation, decorator: Google::Apis::RedisV1::Operation::Representation + + end + end + + class Location + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :display_name, as: 'displayName' + hash :labels, as: 'labels' + property :location_id, as: 'locationId' + hash :metadata, as: 'metadata' + property :name, as: 'name' + end + end + + class Operation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :done, as: 'done' + property :error, as: 'error', class: Google::Apis::RedisV1::Status, decorator: Google::Apis::RedisV1::Status::Representation + + hash :metadata, as: 'metadata' + property :name, as: 'name' + hash :response, as: 'response' + end + end + + class Status + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :code, as: 'code' + collection :details, as: 'details' + property :message, as: 'message' + end + end + end + end +end diff --git a/generated/google/apis/redis_v1/service.rb b/generated/google/apis/redis_v1/service.rb new file mode 100644 index 000000000..a27f2f8fb --- /dev/null +++ b/generated/google/apis/redis_v1/service.rb @@ -0,0 +1,498 @@ +# 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 RedisV1 + # Google Cloud Memorystore for Redis API + # + # The Google Cloud Memorystore for Redis API is used for creating and managing + # Redis instances on the Google Cloud Platform. + # + # @example + # require 'google/apis/redis_v1' + # + # Redis = Google::Apis::RedisV1 # Alias the module + # service = Redis::CloudRedisService.new + # + # @see https://cloud.google.com/memorystore/docs/redis/ + class CloudRedisService < 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://redis.googleapis.com/', '') + @batch_path = 'batch' + end + + # Gets information about a location. + # @param [String] name + # Resource name for the location. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::RedisV1::Location] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RedisV1::Location] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}', options) + command.response_representation = Google::Apis::RedisV1::Location::Representation + command.response_class = Google::Apis::RedisV1::Location + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists information about the supported locations for this service. + # @param [String] name + # The resource that owns the locations collection, if applicable. + # @param [String] filter + # The standard list filter. + # @param [Fixnum] page_size + # The standard list page size. + # @param [String] page_token + # The standard list page token. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::RedisV1::ListLocationsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RedisV1::ListLocationsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_locations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}/locations', options) + command.response_representation = Google::Apis::RedisV1::ListLocationsResponse::Representation + command.response_class = Google::Apis::RedisV1::ListLocationsResponse + command.params['name'] = name unless name.nil? + command.query['filter'] = filter unless filter.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a Redis instance based on the specified tier and memory size. + # By default, the instance is accessible from the project's + # [default network](/compute/docs/networks-and-firewalls#networks). + # The creation is executed asynchronously and callers may check the returned + # operation to track its progress. Once the operation is completed the Redis + # instance will be fully functional. Completed longrunning.Operation will + # contain the new instance object in the response field. + # The returned operation is automatically deleted after a few hours, so there + # is no need to call DeleteOperation. + # @param [String] parent + # Required. The resource name of the instance location using the form: + # `projects/`project_id`/locations/`location_id`` + # where `location_id` refers to a GCP region + # @param [Google::Apis::RedisV1::Instance] instance_object + # @param [String] instance_id + # Required. The logical name of the Redis instance in the customer project + # with the following restrictions: + # * Must contain only lowercase letters, numbers, and hyphens. + # * Must start with a letter. + # * Must be between 1-40 characters. + # * Must end with a number or a letter. + # * Must be unique within the customer project / 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::RedisV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RedisV1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_project_location_instance(parent, instance_object = nil, instance_id: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+parent}/instances', options) + command.request_representation = Google::Apis::RedisV1::Instance::Representation + command.request_object = instance_object + command.response_representation = Google::Apis::RedisV1::Operation::Representation + command.response_class = Google::Apis::RedisV1::Operation + command.params['parent'] = parent unless parent.nil? + command.query['instanceId'] = instance_id unless instance_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a specific Redis instance. Instance stops serving and data is + # deleted. + # @param [String] name + # Required. Redis instance resource name using the form: + # `projects/`project_id`/locations/`location_id`/instances/`instance_id`` + # where `location_id` refers to a GCP region + # @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::RedisV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RedisV1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_project_location_instance(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/{+name}', options) + command.response_representation = Google::Apis::RedisV1::Operation::Representation + command.response_class = Google::Apis::RedisV1::Operation + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets the details of a specific Redis instance. + # @param [String] name + # Required. Redis instance resource name using the form: + # `projects/`project_id`/locations/`location_id`/instances/`instance_id`` + # where `location_id` refers to a GCP region + # @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::RedisV1::Instance] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RedisV1::Instance] + # + # @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_instance(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}', options) + command.response_representation = Google::Apis::RedisV1::Instance::Representation + command.response_class = Google::Apis::RedisV1::Instance + 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 Redis instances owned by a project in either the specified + # location (region) or all locations. + # The location should have the following format: + # * `projects/`project_id`/locations/`location_id`` + # If `location_id` is specified as `-` (wildcard), then all regions + # available to the project are queried, and the results are aggregated. + # @param [String] parent + # Required. The resource name of the instance location using the form: + # `projects/`project_id`/locations/`location_id`` + # where `location_id` refers to a GCP region + # @param [Fixnum] page_size + # The maximum number of items to return. + # If not specified, a default value of 1000 will be used by the service. + # Regardless of the page_size value, the response may include a partial list + # and a caller should only rely on response's + # next_page_token + # to determine if there are more instances left to be queried. + # @param [String] page_token + # The next_page_token value returned from a previous List request, + # if any. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::RedisV1::ListInstancesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RedisV1::ListInstancesResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_location_instances(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+parent}/instances', options) + command.response_representation = Google::Apis::RedisV1::ListInstancesResponse::Representation + command.response_class = Google::Apis::RedisV1::ListInstancesResponse + 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 metadata and configuration of a specific Redis instance. + # Completed longrunning.Operation will contain the new instance object + # in the response field. The returned operation is automatically deleted + # after a few hours, so there is no need to call DeleteOperation. + # @param [String] name + # Required. Unique name of the resource in this scope including project and + # location using the form: + # `projects/`project_id`/locations/`location_id`/instances/`instance_id`` + # Note: Redis instances are managed and addressed at regional level so + # location_id here refers to a GCP region; however, users may choose which + # specific zone (or collection of zones for cross-zone instances) an instance + # should be provisioned in. Refer to [location_id] and + # [alternative_location_id] fields for more details. + # @param [Google::Apis::RedisV1::Instance] instance_object + # @param [String] update_mask + # Required. Mask of fields to update. At least one path must be supplied in + # this field. The elements of the repeated paths field may only include these + # fields from Instance: + # * `displayName` + # * `labels` + # * `memorySizeGb` + # * `redisConfig` + # @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::RedisV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RedisV1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def patch_project_location_instance(name, instance_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1/{+name}', options) + command.request_representation = Google::Apis::RedisV1::Instance::Representation + command.request_object = instance_object + command.response_representation = Google::Apis::RedisV1::Operation::Representation + command.response_class = Google::Apis::RedisV1::Operation + command.params['name'] = name unless name.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an Operation.error value with a google.rpc.Status.code of 1, + # corresponding to `Code.CANCELLED`. + # @param [String] name + # The name of the operation resource to be cancelled. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::RedisV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RedisV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def cancel_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+name}:cancel', options) + command.response_representation = Google::Apis::RedisV1::Empty::Representation + command.response_class = Google::Apis::RedisV1::Empty + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # @param [String] name + # The name of the operation resource to be deleted. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::RedisV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RedisV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/{+name}', options) + command.response_representation = Google::Apis::RedisV1::Empty::Representation + command.response_class = Google::Apis::RedisV1::Empty + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # @param [String] name + # The name of the operation resource. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::RedisV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RedisV1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}', options) + command.response_representation = Google::Apis::RedisV1::Operation::Representation + command.response_class = Google::Apis::RedisV1::Operation + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # NOTE: the `name` binding allows API services to override the binding + # to use different resource name schemes, such as `users/*/operations`. To + # override the binding, API services can add a binding such as + # `"/v1/`name=users/*`/operations"` to their service configuration. + # For backwards compatibility, the default name includes the operations + # collection id, however overriding users must ensure the name binding + # is the parent resource, without the operations collection id. + # @param [String] name + # The name of the operation's parent resource. + # @param [String] filter + # The standard list filter. + # @param [Fixnum] page_size + # The standard list page size. + # @param [String] page_token + # The standard list page token. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::RedisV1::ListOperationsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RedisV1::ListOperationsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}/operations', options) + command.response_representation = Google::Apis::RedisV1::ListOperationsResponse::Representation + command.response_class = Google::Apis::RedisV1::ListOperationsResponse + command.params['name'] = name unless name.nil? + command.query['filter'] = filter unless filter.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + protected + + def apply_command_defaults(command) + command.query['key'] = key unless key.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + end + end + end + end +end diff --git a/generated/google/apis/websecurityscanner_v1alpha.rb b/generated/google/apis/websecurityscanner_v1alpha.rb index 333026420..54cf81a84 100644 --- a/generated/google/apis/websecurityscanner_v1alpha.rb +++ b/generated/google/apis/websecurityscanner_v1alpha.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/security-scanner/ module WebsecurityscannerV1alpha VERSION = 'V1alpha' - REVISION = '20180820' + REVISION = '20180905' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'