From ea3d2c87852c68eea6853f8cc6feb1baf707597e Mon Sep 17 00:00:00 2001 From: Google APIs Date: Fri, 8 Nov 2019 00:36:47 +0000 Subject: [PATCH] Autogenerated update (2019-11-08) Delete: - sqladmin_v1beta4 Update: - bigquerydatatransfer_v1 - bigqueryreservation_v1 - bigqueryreservation_v1alpha2 - bigqueryreservation_v1beta1 - ml_v1 - monitoring_v3 --- .../google/apis/bigquerydatatransfer_v1.rb | 2 +- .../apis/bigquerydatatransfer_v1/service.rb | 34 +- .../google/apis/bigqueryreservation_v1.rb | 2 +- .../apis/bigqueryreservation_v1/classes.rb | 21 - .../bigqueryreservation_v1/representations.rb | 13 - .../apis/bigqueryreservation_v1alpha2.rb | 2 +- .../bigqueryreservation_v1alpha2/classes.rb | 117 +- .../representations.rb | 35 + .../bigqueryreservation_v1alpha2/service.rb | 71 + .../apis/bigqueryreservation_v1beta1.rb | 2 +- .../bigqueryreservation_v1beta1/classes.rb | 105 +- .../representations.rb | 26 +- .../bigqueryreservation_v1beta1/service.rb | 92 +- generated/google/apis/ml_v1.rb | 2 +- generated/google/apis/ml_v1/classes.rb | 122 +- generated/google/apis/monitoring_v3.rb | 2 +- .../google/apis/monitoring_v3/classes.rb | 83 +- .../apis/monitoring_v3/representations.rb | 33 + generated/google/apis/sqladmin_v1beta4.rb | 38 - .../google/apis/sqladmin_v1beta4/classes.rb | 2633 ----------------- .../apis/sqladmin_v1beta4/representations.rb | 1110 ------- .../google/apis/sqladmin_v1beta4/service.rb | 1793 ----------- 22 files changed, 440 insertions(+), 5898 deletions(-) delete mode 100644 generated/google/apis/sqladmin_v1beta4.rb delete mode 100644 generated/google/apis/sqladmin_v1beta4/classes.rb delete mode 100644 generated/google/apis/sqladmin_v1beta4/representations.rb delete mode 100644 generated/google/apis/sqladmin_v1beta4/service.rb diff --git a/generated/google/apis/bigquerydatatransfer_v1.rb b/generated/google/apis/bigquerydatatransfer_v1.rb index ab71df3aa..0b92cf16d 100644 --- a/generated/google/apis/bigquerydatatransfer_v1.rb +++ b/generated/google/apis/bigquerydatatransfer_v1.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/bigquery/ module BigquerydatatransferV1 VERSION = 'V1' - REVISION = '20190918' + REVISION = '20191103' # View and manage your data in Google BigQuery AUTH_BIGQUERY = 'https://www.googleapis.com/auth/bigquery' diff --git a/generated/google/apis/bigquerydatatransfer_v1/service.rb b/generated/google/apis/bigquerydatatransfer_v1/service.rb index 8e0ea034c..40a091612 100644 --- a/generated/google/apis/bigquerydatatransfer_v1/service.rb +++ b/generated/google/apis/bigquerydatatransfer_v1/service.rb @@ -368,6 +368,11 @@ module Google # urn:ietf:wg:oauth:2.0:oob means that authorization code should be # returned in the title bar of the browser, with the page text prompting # the user to copy the code and paste it in the application. + # @param [String] service_account_name + # Optional service account name. If this field is set, transfer config will + # be created with this service account credentials. It requires that + # requesting user calling this API has permissions to act as this service + # account. # @param [String] version_info # Optional version info. If users want to find a very recent access token, # that is, immediately after approving access, users have to set the @@ -392,7 +397,7 @@ module Google # @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_transfer_config(parent, transfer_config_object = nil, authorization_code: nil, version_info: nil, fields: nil, quota_user: nil, options: nil, &block) + def create_project_location_transfer_config(parent, transfer_config_object = nil, authorization_code: nil, service_account_name: nil, version_info: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/transferConfigs', options) command.request_representation = Google::Apis::BigquerydatatransferV1::TransferConfig::Representation command.request_object = transfer_config_object @@ -400,6 +405,7 @@ module Google command.response_class = Google::Apis::BigquerydatatransferV1::TransferConfig command.params['parent'] = parent unless parent.nil? command.query['authorizationCode'] = authorization_code unless authorization_code.nil? + command.query['serviceAccountName'] = service_account_name unless service_account_name.nil? command.query['versionInfo'] = version_info unless version_info.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? @@ -541,6 +547,12 @@ module Google # urn:ietf:wg:oauth:2.0:oob means that authorization code should be # returned in the title bar of the browser, with the page text prompting # the user to copy the code and paste it in the application. + # @param [String] service_account_name + # Optional service account name. If this field is set and + # "service_account_name" is set in update_mask, transfer config will be + # updated to use this service account credentials. It requires that + # requesting user calling this API has permissions to act as this service + # account. # @param [String] update_mask # Required. Required list of fields to be updated in this request. # @param [String] version_info @@ -567,7 +579,7 @@ module Google # @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_transfer_config(name, transfer_config_object = nil, authorization_code: nil, update_mask: nil, version_info: nil, fields: nil, quota_user: nil, options: nil, &block) + def patch_project_location_transfer_config(name, transfer_config_object = nil, authorization_code: nil, service_account_name: nil, update_mask: nil, version_info: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/{+name}', options) command.request_representation = Google::Apis::BigquerydatatransferV1::TransferConfig::Representation command.request_object = transfer_config_object @@ -575,6 +587,7 @@ module Google command.response_class = Google::Apis::BigquerydatatransferV1::TransferConfig command.params['name'] = name unless name.nil? command.query['authorizationCode'] = authorization_code unless authorization_code.nil? + command.query['serviceAccountName'] = service_account_name unless service_account_name.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['versionInfo'] = version_info unless version_info.nil? command.query['fields'] = fields unless fields.nil? @@ -838,6 +851,11 @@ module Google # urn:ietf:wg:oauth:2.0:oob means that authorization code should be # returned in the title bar of the browser, with the page text prompting # the user to copy the code and paste it in the application. + # @param [String] service_account_name + # Optional service account name. If this field is set, transfer config will + # be created with this service account credentials. It requires that + # requesting user calling this API has permissions to act as this service + # account. # @param [String] version_info # Optional version info. If users want to find a very recent access token, # that is, immediately after approving access, users have to set the @@ -862,7 +880,7 @@ module Google # @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_transfer_config(parent, transfer_config_object = nil, authorization_code: nil, version_info: nil, fields: nil, quota_user: nil, options: nil, &block) + def create_project_transfer_config(parent, transfer_config_object = nil, authorization_code: nil, service_account_name: nil, version_info: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/transferConfigs', options) command.request_representation = Google::Apis::BigquerydatatransferV1::TransferConfig::Representation command.request_object = transfer_config_object @@ -870,6 +888,7 @@ module Google command.response_class = Google::Apis::BigquerydatatransferV1::TransferConfig command.params['parent'] = parent unless parent.nil? command.query['authorizationCode'] = authorization_code unless authorization_code.nil? + command.query['serviceAccountName'] = service_account_name unless service_account_name.nil? command.query['versionInfo'] = version_info unless version_info.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? @@ -1011,6 +1030,12 @@ module Google # urn:ietf:wg:oauth:2.0:oob means that authorization code should be # returned in the title bar of the browser, with the page text prompting # the user to copy the code and paste it in the application. + # @param [String] service_account_name + # Optional service account name. If this field is set and + # "service_account_name" is set in update_mask, transfer config will be + # updated to use this service account credentials. It requires that + # requesting user calling this API has permissions to act as this service + # account. # @param [String] update_mask # Required. Required list of fields to be updated in this request. # @param [String] version_info @@ -1037,7 +1062,7 @@ module Google # @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_transfer_config(name, transfer_config_object = nil, authorization_code: nil, update_mask: nil, version_info: nil, fields: nil, quota_user: nil, options: nil, &block) + def patch_project_transfer_config(name, transfer_config_object = nil, authorization_code: nil, service_account_name: nil, update_mask: nil, version_info: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/{+name}', options) command.request_representation = Google::Apis::BigquerydatatransferV1::TransferConfig::Representation command.request_object = transfer_config_object @@ -1045,6 +1070,7 @@ module Google command.response_class = Google::Apis::BigquerydatatransferV1::TransferConfig command.params['name'] = name unless name.nil? command.query['authorizationCode'] = authorization_code unless authorization_code.nil? + command.query['serviceAccountName'] = service_account_name unless service_account_name.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['versionInfo'] = version_info unless version_info.nil? command.query['fields'] = fields unless fields.nil? diff --git a/generated/google/apis/bigqueryreservation_v1.rb b/generated/google/apis/bigqueryreservation_v1.rb index b9425b66a..140780620 100644 --- a/generated/google/apis/bigqueryreservation_v1.rb +++ b/generated/google/apis/bigqueryreservation_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/bigquery/ module BigqueryreservationV1 VERSION = 'V1' - REVISION = '20190920' + REVISION = '20191029' # View and manage your data in Google BigQuery AUTH_BIGQUERY = 'https://www.googleapis.com/auth/bigquery' diff --git a/generated/google/apis/bigqueryreservation_v1/classes.rb b/generated/google/apis/bigqueryreservation_v1/classes.rb index 0772db426..86099cba3 100644 --- a/generated/google/apis/bigqueryreservation_v1/classes.rb +++ b/generated/google/apis/bigqueryreservation_v1/classes.rb @@ -22,27 +22,6 @@ module Google module Apis module BigqueryreservationV1 - # The metadata for operation returned from - # ReservationService.CreateCapacityCommitment. - class CreateCapacityCommitmentMetadata - include Google::Apis::Core::Hashable - - # Resource name of the capacity commitment that is being created. E.g., - # projects/myproject/locations/US/capacityCommitments/123 - # Corresponds to the JSON property `capacityCommitment` - # @return [String] - attr_accessor :capacity_commitment - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @capacity_commitment = args[:capacity_commitment] if args.key?(:capacity_commitment) - 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: diff --git a/generated/google/apis/bigqueryreservation_v1/representations.rb b/generated/google/apis/bigqueryreservation_v1/representations.rb index 620c94f25..309d91f0c 100644 --- a/generated/google/apis/bigqueryreservation_v1/representations.rb +++ b/generated/google/apis/bigqueryreservation_v1/representations.rb @@ -22,12 +22,6 @@ module Google module Apis module BigqueryreservationV1 - class CreateCapacityCommitmentMetadata - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class Empty class Representation < Google::Apis::Core::JsonRepresentation; end @@ -58,13 +52,6 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class CreateCapacityCommitmentMetadata - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :capacity_commitment, as: 'capacityCommitment' - end - end - class Empty # @private class Representation < Google::Apis::Core::JsonRepresentation diff --git a/generated/google/apis/bigqueryreservation_v1alpha2.rb b/generated/google/apis/bigqueryreservation_v1alpha2.rb index c0747d500..575e84594 100644 --- a/generated/google/apis/bigqueryreservation_v1alpha2.rb +++ b/generated/google/apis/bigqueryreservation_v1alpha2.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/bigquery/ module BigqueryreservationV1alpha2 VERSION = 'V1alpha2' - REVISION = '20190920' + REVISION = '20191029' # View and manage your data in Google BigQuery AUTH_BIGQUERY = 'https://www.googleapis.com/auth/bigquery' diff --git a/generated/google/apis/bigqueryreservation_v1alpha2/classes.rb b/generated/google/apis/bigqueryreservation_v1alpha2/classes.rb index d4895a464..8e9cfdb78 100644 --- a/generated/google/apis/bigqueryreservation_v1alpha2/classes.rb +++ b/generated/google/apis/bigqueryreservation_v1alpha2/classes.rb @@ -162,6 +162,70 @@ module Google end end + # This resource represents a long-running operation that is the result of a + # network API call. + class Operation + include Google::Apis::Core::Hashable + + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # Corresponds to the JSON property `done` + # @return [Boolean] + attr_accessor :done + alias_method :done?, :done + + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # Corresponds to the JSON property `error` + # @return [Google::Apis::BigqueryreservationV1alpha2::Status] + attr_accessor :error + + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # Corresponds to the JSON property `metadata` + # @return [Hash] + attr_accessor :metadata + + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/`unique_id``. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The normal response of the operation in case of success. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # Corresponds to the JSON property `response` + # @return [Hash] + attr_accessor :response + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @done = args[:done] if args.key?(:done) + @error = args[:error] if args.key?(:error) + @metadata = args[:metadata] if args.key?(:metadata) + @name = args[:name] if args.key?(:name) + @response = args[:response] if args.key?(:response) + end + end + # A reservation is a mechanism used to guarantee slots to users. class Reservation include Google::Apis::Core::Hashable @@ -284,7 +348,8 @@ module Google # Slot pool is a way to purchase slots with some minimum committed period of # usage. Slot pool is immutable and cannot be deleted until the end of the # commitment period. After the end of the commitment period, slots are still - # available but can be freely removed any time. + # available but can be freely removed any time. Annual commitments will + # automatically be downgraded to monthly after the commitment ends. # A slot pool resource exists as a child resource of a top-level reservation. # Sum of all the ACTIVE pools slot_count is always equal to the reservation # slot_capacity. @@ -299,6 +364,16 @@ module Google # @return [String] attr_accessor :commitment_end_time + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # Corresponds to the JSON property `failureStatus` + # @return [Google::Apis::BigqueryreservationV1alpha2::Status] + attr_accessor :failure_status + # Output only. The resource name of the slot pool, e.g., # projects/myproject/locations/us-central1/reservations/myreservation/ # slotPools/123 @@ -328,12 +403,52 @@ module Google # Update properties of this object def update!(**args) @commitment_end_time = args[:commitment_end_time] if args.key?(:commitment_end_time) + @failure_status = args[:failure_status] if args.key?(:failure_status) @name = args[:name] if args.key?(:name) @plan = args[:plan] if args.key?(:plan) @slot_count = args[:slot_count] if args.key?(:slot_count) @state = args[:state] if args.key?(:state) end end + + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + class Status + include Google::Apis::Core::Hashable + + # The status code, which should be an enum value of google.rpc.Code. + # Corresponds to the JSON property `code` + # @return [Fixnum] + attr_accessor :code + + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + # Corresponds to the JSON property `details` + # @return [Array>] + attr_accessor :details + + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # google.rpc.Status.details field, or localized by the client. + # Corresponds to the JSON property `message` + # @return [String] + attr_accessor :message + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @code = args[:code] if args.key?(:code) + @details = args[:details] if args.key?(:details) + @message = args[:message] if args.key?(:message) + end + end end end end diff --git a/generated/google/apis/bigqueryreservation_v1alpha2/representations.rb b/generated/google/apis/bigqueryreservation_v1alpha2/representations.rb index 84deee875..8a5172331 100644 --- a/generated/google/apis/bigqueryreservation_v1alpha2/representations.rb +++ b/generated/google/apis/bigqueryreservation_v1alpha2/representations.rb @@ -58,6 +58,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class Operation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class Reservation class Representation < Google::Apis::Core::JsonRepresentation; end @@ -82,6 +88,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class Status + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class CreateSlotPoolMetadata # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -129,6 +141,18 @@ module Google end end + class Operation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :done, as: 'done' + property :error, as: 'error', class: Google::Apis::BigqueryreservationV1alpha2::Status, decorator: Google::Apis::BigqueryreservationV1alpha2::Status::Representation + + hash :metadata, as: 'metadata' + property :name, as: 'name' + hash :response, as: 'response' + end + end + class Reservation # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -161,12 +185,23 @@ module Google # @private class Representation < Google::Apis::Core::JsonRepresentation property :commitment_end_time, as: 'commitmentEndTime' + property :failure_status, as: 'failureStatus', class: Google::Apis::BigqueryreservationV1alpha2::Status, decorator: Google::Apis::BigqueryreservationV1alpha2::Status::Representation + property :name, as: 'name' property :plan, as: 'plan' property :slot_count, :numeric_string => true, as: 'slotCount' property :state, as: 'state' 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/bigqueryreservation_v1alpha2/service.rb b/generated/google/apis/bigqueryreservation_v1alpha2/service.rb index 4cebab181..09fc239c8 100644 --- a/generated/google/apis/bigqueryreservation_v1alpha2/service.rb +++ b/generated/google/apis/bigqueryreservation_v1alpha2/service.rb @@ -102,6 +102,77 @@ module Google execute_or_queue_command(command, &block) end + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an Operation.error value with a google.rpc.Status.code of 1, + # corresponding to `Code.CANCELLED`. + # @param [String] name + # The name of the operation resource to be cancelled. + # @param [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::BigqueryreservationV1alpha2::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::BigqueryreservationV1alpha2::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, 'v1alpha2/{+name}:cancel', options) + command.response_representation = Google::Apis::BigqueryreservationV1alpha2::Empty::Representation + command.response_class = Google::Apis::BigqueryreservationV1alpha2::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::BigqueryreservationV1alpha2::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::BigqueryreservationV1alpha2::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1alpha2/{+name}', options) + command.response_representation = Google::Apis::BigqueryreservationV1alpha2::Operation::Representation + command.response_class = Google::Apis::BigqueryreservationV1alpha2::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 + # Returns `google.rpc.Code.PERMISSION_DENIED` if user does not have # 'bigquery.admin' permissions on the project using the reservation # and the project that owns this reservation. diff --git a/generated/google/apis/bigqueryreservation_v1beta1.rb b/generated/google/apis/bigqueryreservation_v1beta1.rb index 439553718..e6e61ce17 100644 --- a/generated/google/apis/bigqueryreservation_v1beta1.rb +++ b/generated/google/apis/bigqueryreservation_v1beta1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/bigquery/ module BigqueryreservationV1beta1 VERSION = 'V1beta1' - REVISION = '20190920' + REVISION = '20191029' # View and manage your data in Google BigQuery AUTH_BIGQUERY = 'https://www.googleapis.com/auth/bigquery' diff --git a/generated/google/apis/bigqueryreservation_v1beta1/classes.rb b/generated/google/apis/bigqueryreservation_v1beta1/classes.rb index 62f932eb3..2a67e6a75 100644 --- a/generated/google/apis/bigqueryreservation_v1beta1/classes.rb +++ b/generated/google/apis/bigqueryreservation_v1beta1/classes.rb @@ -60,7 +60,8 @@ module Google # (in the form of slots) with some minimum committed period of usage. Capacity # commitment is immutable and cannot be deleted until the end of the commitment # period. After the end of the commitment period, slots are still available but - # can be freely removed any time. + # can be freely removed any time. Annual commitments will automatically be + # downgraded to monthly after the commitment ends. # A capacity commitment resource exists as a child resource of the admin # project. class CapacityCommitment @@ -74,6 +75,16 @@ module Google # @return [String] attr_accessor :commitment_end_time + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # Corresponds to the JSON property `failureStatus` + # @return [Google::Apis::BigqueryreservationV1beta1::Status] + attr_accessor :failure_status + # Output only. The resource name of the capacity commitment, e.g., # projects/myproject/locations/US/capacityCommitments/123 # Corresponds to the JSON property `name` @@ -102,6 +113,7 @@ module Google # Update properties of this object def update!(**args) @commitment_end_time = args[:commitment_end_time] if args.key?(:commitment_end_time) + @failure_status = args[:failure_status] if args.key?(:failure_status) @name = args[:name] if args.key?(:name) @plan = args[:plan] if args.key?(:plan) @slot_count = args[:slot_count] if args.key?(:slot_count) @@ -109,27 +121,6 @@ module Google end end - # The metadata for operation returned from - # ReservationService.CreateCapacityCommitment. - class CreateCapacityCommitmentMetadata - include Google::Apis::Core::Hashable - - # Resource name of the capacity commitment that is being created. E.g., - # projects/myproject/locations/US/capacityCommitments/123 - # Corresponds to the JSON property `capacityCommitment` - # @return [String] - attr_accessor :capacity_commitment - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @capacity_commitment = args[:capacity_commitment] if args.key?(:capacity_commitment) - 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: @@ -321,55 +312,20 @@ module Google end end - # This resource represents a long-running operation that is the result of a - # network API call. - class Operation + # The request for + # ReservationService.MoveAssignment. + # Note: "bigquery.reservationAssignments.create" permission is required on the + # destination_id. Note: "bigquery.reservationAssignments.create" and + # "bigquery.reservationAssignments.delete" permission is required on the + # related assignee. + class MoveAssignmentRequest include Google::Apis::Core::Hashable - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # Corresponds to the JSON property `done` - # @return [Boolean] - attr_accessor :done - alias_method :done?, :done - - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # Corresponds to the JSON property `error` - # @return [Google::Apis::BigqueryreservationV1beta1::Status] - attr_accessor :error - - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # Corresponds to the JSON property `metadata` - # @return [Hash] - attr_accessor :metadata - - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/`unique_id``. - # Corresponds to the JSON property `name` + # The new reservation ID, e.g.: + # projects/myotherproject/locations/US/reservations/team2-prod + # Corresponds to the JSON property `destinationId` # @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 + attr_accessor :destination_id def initialize(**args) update!(**args) @@ -377,11 +333,7 @@ module Google # 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) + @destination_id = args[:destination_id] if args.key?(:destination_id) end end @@ -389,10 +341,9 @@ module Google class Reservation include Google::Apis::Core::Hashable - # If true, any query using this reservation might be able to use the idle - # slots from other reservations within the same admin project. If false, a - # query using this reservation will execute with the maximum slot capacity as - # specified above. If not specified, default value is true. + # If false, any query using this reservation will use idle slots from other + # reservations within the same admin project. If true, a query using this + # reservation will execute with the maximum slot capacity as specified above. # Corresponds to the JSON property `ignoreIdleSlots` # @return [Boolean] attr_accessor :ignore_idle_slots diff --git a/generated/google/apis/bigqueryreservation_v1beta1/representations.rb b/generated/google/apis/bigqueryreservation_v1beta1/representations.rb index 9c845fa25..6d62d5dcf 100644 --- a/generated/google/apis/bigqueryreservation_v1beta1/representations.rb +++ b/generated/google/apis/bigqueryreservation_v1beta1/representations.rb @@ -34,12 +34,6 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class CreateCapacityCommitmentMetadata - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class Empty class Representation < Google::Apis::Core::JsonRepresentation; end @@ -82,7 +76,7 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class Operation + class MoveAssignmentRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -119,6 +113,8 @@ module Google # @private class Representation < Google::Apis::Core::JsonRepresentation property :commitment_end_time, as: 'commitmentEndTime' + property :failure_status, as: 'failureStatus', class: Google::Apis::BigqueryreservationV1beta1::Status, decorator: Google::Apis::BigqueryreservationV1beta1::Status::Representation + property :name, as: 'name' property :plan, as: 'plan' property :slot_count, :numeric_string => true, as: 'slotCount' @@ -126,13 +122,6 @@ module Google end end - class CreateCapacityCommitmentMetadata - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :capacity_commitment, as: 'capacityCommitment' - end - end - class Empty # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -193,15 +182,10 @@ module Google end end - class Operation + class MoveAssignmentRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :done, as: 'done' - property :error, as: 'error', class: Google::Apis::BigqueryreservationV1beta1::Status, decorator: Google::Apis::BigqueryreservationV1beta1::Status::Representation - - hash :metadata, as: 'metadata' - property :name, as: 'name' - hash :response, as: 'response' + property :destination_id, as: 'destinationId' end end diff --git a/generated/google/apis/bigqueryreservation_v1beta1/service.rb b/generated/google/apis/bigqueryreservation_v1beta1/service.rb index dcfa56a42..be096c2a4 100644 --- a/generated/google/apis/bigqueryreservation_v1beta1/service.rb +++ b/generated/google/apis/bigqueryreservation_v1beta1/service.rb @@ -130,8 +130,7 @@ module Google # 2) Hierarchy lookup (project->folder->organization) happens in this API. # 3) Parent here is projects/*/locations/*, instead of # projects/*/locations/*reservations/*. - # Wildcard "-" can be used for projects in - # SearchAssignmentsRequest.parent. Note "-" cannot be used for projects + # Note "-" cannot be used for projects # nor locations. # @param [String] parent # The resource name of the admin project(containing project and location), @@ -277,77 +276,6 @@ module Google execute_or_queue_command(command, &block) end - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an Operation.error value with a google.rpc.Status.code of 1, - # corresponding to `Code.CANCELLED`. - # @param [String] name - # The name of the operation resource to be cancelled. - # @param [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::BigqueryreservationV1beta1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BigqueryreservationV1beta1::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, 'v1beta1/{+name}:cancel', options) - command.response_representation = Google::Apis::BigqueryreservationV1beta1::Empty::Representation - command.response_class = Google::Apis::BigqueryreservationV1beta1::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::BigqueryreservationV1beta1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::BigqueryreservationV1beta1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1beta1/{+name}', options) - command.response_representation = Google::Apis::BigqueryreservationV1beta1::Operation::Representation - command.response_class = Google::Apis::BigqueryreservationV1beta1::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 - # Creates a new reservation resource. # @param [String] parent # Project, location. E.g., @@ -388,8 +316,7 @@ module Google # Deletes a reservation. # Returns `google.rpc.Code.FAILED_PRECONDITION` when reservation has - # assignments. This check can be bypassed by - # setting DeleteReservationRequest.force flag to true. + # assignments. # @param [String] name # Resource name of the reservation to retrieve. E.g., # projects/myproject/locations/US/reservations/team1-prod @@ -539,7 +466,7 @@ module Google # does not match location of the reservation. # @param [String] parent # The parent resource name of the assignment - # E.g.: projects/myproject/location/US/reservations/team1-prod + # E.g.: projects/myproject/locations/US/reservations/team1-prod # @param [Google::Apis::BigqueryreservationV1beta1::Assignment] assignment_object # @param [String] fields # Selector specifying which fields to include in a partial response. @@ -624,9 +551,9 @@ module Google # "-" cannot be used for projects nor locations. # @param [String] parent # The parent resource name e.g.: - # projects/myproject/location/US/reservations/team1-prod + # projects/myproject/locations/US/reservations/team1-prod # Or: - # projects/myproject/location/US/reservations/- + # projects/myproject/locations/US/reservations/- # @param [Fixnum] page_size # The maximum number of items to return. # @param [String] page_token @@ -670,9 +597,7 @@ module Google # The resource name of the assignment, # e.g.: # projects/myproject/locations/US/reservations/team1-prod/assignments/123 - # @param [String] destination_id - # The new reservation ID, e.g.: - # projects/myotherproject/locations/US/reservations/team2-prod + # @param [Google::Apis::BigqueryreservationV1beta1::MoveAssignmentRequest] move_assignment_request_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -690,12 +615,13 @@ module Google # @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 move_project_location_reservation_assignment(name, destination_id: nil, fields: nil, quota_user: nil, options: nil, &block) + def move_assignment(name, move_assignment_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta1/{+name}:move', options) + command.request_representation = Google::Apis::BigqueryreservationV1beta1::MoveAssignmentRequest::Representation + command.request_object = move_assignment_request_object command.response_representation = Google::Apis::BigqueryreservationV1beta1::Assignment::Representation command.response_class = Google::Apis::BigqueryreservationV1beta1::Assignment command.params['name'] = name unless name.nil? - command.query['destinationId'] = destination_id unless destination_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) diff --git a/generated/google/apis/ml_v1.rb b/generated/google/apis/ml_v1.rb index a2d3bdd45..c3aa07a06 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 = '20191025' + REVISION = '20191101' # 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 827aec63c..b26aeb82d 100644 --- a/generated/google/apis/ml_v1/classes.rb +++ b/generated/google/apis/ml_v1/classes.rb @@ -1331,92 +1331,10 @@ module Google attr_accessor :master_config # Optional. Specifies the type of virtual machine to use for your training - # job's master worker. + # job's master worker. You must specify this field when `scaleTier` is set to + # `CUSTOM`. + # You can use certain Compute Engine machine types directly in this field. # The following types are supported: - #
- #
standard
- #
- # A basic machine configuration suitable for training simple models with - # small to moderate datasets. - #
- #
large_model
- #
- # A machine with a lot of memory, specially suited for parameter servers - # when your model is large (having many hidden layers or layers with very - # large numbers of nodes). - #
- #
complex_model_s
- #
- # A machine suitable for the master and workers of the cluster when your - # model requires more computation than the standard machine can handle - # satisfactorily. - #
- #
complex_model_m
- #
- # A machine with roughly twice the number of cores and roughly double the - # memory of complex_model_s. - #
- #
complex_model_l
- #
- # A machine with roughly twice the number of cores and roughly double the - # memory of complex_model_m. - #
- #
standard_gpu
- #
- # A machine equivalent to standard that - # also includes a single NVIDIA Tesla K80 GPU. See more about - # using GPUs to - # train your model. - #
- #
complex_model_m_gpu
- #
- # A machine equivalent to complex_model_m that also includes - # four NVIDIA Tesla K80 GPUs. - #
- #
complex_model_l_gpu
- #
- # A machine equivalent to complex_model_l that also includes - # eight NVIDIA Tesla K80 GPUs. - #
- #
standard_p100
- #
- # A machine equivalent to standard that - # 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. - #
- #
standard_v100
- #
- # A machine equivalent to standard that - # also includes a single NVIDIA Tesla V100 GPU. - #
- #
large_model_v100
- #
- # A machine equivalent to large_model that - # also includes a single NVIDIA Tesla V100 GPU. - #
- #
complex_model_m_v100
- #
- # A machine equivalent to complex_model_m that - # also includes four NVIDIA Tesla V100 GPUs. - #
- #
complex_model_l_v100
- #
- # A machine equivalent to complex_model_l that - # also includes eight NVIDIA Tesla V100 GPUs. - #
- #
cloud_tpu
- #
- # A TPU VM including one Cloud TPU. See more about - # using TPUs to train - # your model. - #
- #
- # You may also use certain Compute Engine machine types directly in this - # field. The following types are supported: # - `n1-standard-4` # - `n1-standard-8` # - `n1-standard-16` @@ -1434,9 +1352,29 @@ module Google # - `n1-highcpu-32` # - `n1-highcpu-64` # - `n1-highcpu-96` - # See more about [using Compute Engine machine - # types](/ml-engine/docs/tensorflow/machine-types#compute-engine-machine-types). - # You must set this value when `scaleTier` is set to `CUSTOM`. + # Learn more about [using Compute Engine machine + # types](/ml-engine/docs/machine-types#compute-engine-machine-types). + # Alternatively, you can use the following legacy machine types: + # - `standard` + # - `large_model` + # - `complex_model_s` + # - `complex_model_m` + # - `complex_model_l` + # - `standard_gpu` + # - `complex_model_m_gpu` + # - `complex_model_l_gpu` + # - `standard_p100` + # - `complex_model_m_p100` + # - `standard_v100` + # - `large_model_v100` + # - `complex_model_m_v100` + # - `complex_model_l_v100` + # Learn more about [using legacy machine + # types](/ml-engine/docs/machine-types#legacy-machine-types). + # Finally, if you want to use a TPU for training, specify `cloud_tpu` in this + # field. Learn more about the [special configuration options for training + # with + # TPUs](/ml-engine/docs/tensorflow/using-tpus#configuring_a_custom_tpu_machine). # Corresponds to the JSON property `masterType` # @return [String] attr_accessor :master_type @@ -1468,8 +1406,8 @@ module Google # The supported values are the same as those described in the entry for # `master_type`. # This value must be consistent with the category of machine type that - # `masterType` uses. In other words, both must be AI Platform machine - # types or both must be Compute Engine machine types. + # `masterType` uses. In other words, both must be Compute Engine machine + # types or both must be legacy machine types. # This value must be present when `scaleTier` is set to `CUSTOM` and # `parameter_server_count` is greater than zero. # Corresponds to the JSON property `parameterServerType` @@ -1539,8 +1477,8 @@ module Google # The supported values are the same as those described in the entry for # `masterType`. # This value must be consistent with the category of machine type that - # `masterType` uses. In other words, both must be AI Platform machine - # types or both must be Compute Engine machine types. + # `masterType` uses. In other words, both must be Compute Engine machine + # types or both must be legacy machine types. # If you use `cloud_tpu` for this value, see special instructions for # [configuring a custom TPU # machine](/ml-engine/docs/tensorflow/using-tpus# diff --git a/generated/google/apis/monitoring_v3.rb b/generated/google/apis/monitoring_v3.rb index 03ee51a93..02f6de5f4 100644 --- a/generated/google/apis/monitoring_v3.rb +++ b/generated/google/apis/monitoring_v3.rb @@ -30,7 +30,7 @@ module Google # @see https://cloud.google.com/monitoring/api/ module MonitoringV3 VERSION = 'V3' - REVISION = '20191027' + REVISION = '20191102' # 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/monitoring_v3/classes.rb b/generated/google/apis/monitoring_v3/classes.rb index 5c7a41801..77e6ac481 100644 --- a/generated/google/apis/monitoring_v3/classes.rb +++ b/generated/google/apis/monitoring_v3/classes.rb @@ -507,12 +507,15 @@ module Google end end - # Used to perform string matching. It allows substring and regular expressions, - # together with their negations. + # Optional. Used to perform content matching. This allows matching based on + # substrings and regular expressions, together with their negations. Only the + # first 4 MB of an HTTP or HTTPS check's response (and the first 1 MB + # of a TCP check's response) are examined for purposes of content matching. class ContentMatcher include Google::Apis::Core::Hashable - # String or regex content to match (max 1024 bytes) + # String or regex content to match. Maximum 1024 bytes. An empty content string + # indicates no content matching is to be performed. # Corresponds to the JSON property `content` # @return [String] attr_accessor :content @@ -583,13 +586,19 @@ module Google class CreateCollectdTimeSeriesResponse include Google::Apis::Core::Hashable - # Records the error status for points that were not written due to an error. - # Failed requests for which nothing is written will return an error response - # instead. + # Records the error status for points that were not written due to an error in + # the request.Failed requests for which nothing is written will return an error + # response instead. Requests where data points were rejected by the backend will + # set summary instead. # Corresponds to the JSON property `payloadErrors` # @return [Array] attr_accessor :payload_errors + # Summary of the result of a failed request to write data to a time series. + # Corresponds to the JSON property `summary` + # @return [Google::Apis::MonitoringV3::CreateTimeSeriesSummary] + attr_accessor :summary + def initialize(**args) update!(**args) end @@ -597,6 +606,7 @@ module Google # Update properties of this object def update!(**args) @payload_errors = args[:payload_errors] if args.key?(:payload_errors) + @summary = args[:summary] if args.key?(:summary) end end @@ -624,6 +634,37 @@ module Google end end + # Summary of the result of a failed request to write data to a time series. + class CreateTimeSeriesSummary + include Google::Apis::Core::Hashable + + # The number of points that failed to be written. Order is not guaranteed. + # Corresponds to the JSON property `errors` + # @return [Array] + attr_accessor :errors + + # The number of points that were successfully written. + # Corresponds to the JSON property `successPointCount` + # @return [Fixnum] + attr_accessor :success_point_count + + # The number of points in the request. + # Corresponds to the JSON property `totalPointCount` + # @return [Fixnum] + attr_accessor :total_point_count + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @errors = args[:errors] if args.key?(:errors) + @success_point_count = args[:success_point_count] if args.key?(:success_point_count) + @total_point_count = args[:total_point_count] if args.key?(:total_point_count) + end + end + # Distribution contains summary statistics for a population of values. It # optionally contains a histogram representing the distribution of those values # across a set of buckets.The summary statistics are the count, mean, sum of the @@ -792,6 +833,36 @@ module Google end end + # Detailed information about an error category. + class Error + include Google::Apis::Core::Hashable + + # The number of points that couldn't be written because of status. + # Corresponds to the JSON property `pointCount` + # @return [Fixnum] + attr_accessor :point_count + + # The Status type defines a logical error model that is suitable for different + # programming environments, including REST APIs and RPC APIs. It is used by gRPC + # (https://github.com/grpc). Each Status message contains three pieces of data: + # error code, error message, and error details.You can find out more about this + # error model and how to work with it in the API Design Guide (https://cloud. + # google.com/apis/design/errors). + # Corresponds to the JSON property `status` + # @return [Google::Apis::MonitoringV3::Status] + attr_accessor :status + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @point_count = args[:point_count] if args.key?(:point_count) + @status = args[:status] if args.key?(:status) + end + end + # Exemplars are example points that may be used to annotate aggregated # distribution values. They are metadata that gives information about a # particular value added to a Distribution bucket, such as a trace ID that was diff --git a/generated/google/apis/monitoring_v3/representations.rb b/generated/google/apis/monitoring_v3/representations.rb index f2ab5c4b7..aae00b859 100644 --- a/generated/google/apis/monitoring_v3/representations.rb +++ b/generated/google/apis/monitoring_v3/representations.rb @@ -100,6 +100,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class CreateTimeSeriesSummary + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class Distribution class Representation < Google::Apis::Core::JsonRepresentation; end @@ -124,6 +130,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class Error + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class Exemplar class Representation < Google::Apis::Core::JsonRepresentation; end @@ -552,6 +564,8 @@ module Google class Representation < Google::Apis::Core::JsonRepresentation collection :payload_errors, as: 'payloadErrors', class: Google::Apis::MonitoringV3::CollectdPayloadError, decorator: Google::Apis::MonitoringV3::CollectdPayloadError::Representation + property :summary, as: 'summary', class: Google::Apis::MonitoringV3::CreateTimeSeriesSummary, decorator: Google::Apis::MonitoringV3::CreateTimeSeriesSummary::Representation + end end @@ -563,6 +577,16 @@ module Google end end + class CreateTimeSeriesSummary + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :errors, as: 'errors', class: Google::Apis::MonitoringV3::Error, decorator: Google::Apis::MonitoringV3::Error::Representation + + property :success_point_count, as: 'successPointCount' + property :total_point_count, as: 'totalPointCount' + end + end + class Distribution # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -600,6 +624,15 @@ module Google end end + class Error + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :point_count, as: 'pointCount' + property :status, as: 'status', class: Google::Apis::MonitoringV3::Status, decorator: Google::Apis::MonitoringV3::Status::Representation + + end + end + class Exemplar # @private class Representation < Google::Apis::Core::JsonRepresentation diff --git a/generated/google/apis/sqladmin_v1beta4.rb b/generated/google/apis/sqladmin_v1beta4.rb deleted file mode 100644 index 4c635ad6d..000000000 --- a/generated/google/apis/sqladmin_v1beta4.rb +++ /dev/null @@ -1,38 +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/sqladmin_v1beta4/service.rb' -require 'google/apis/sqladmin_v1beta4/classes.rb' -require 'google/apis/sqladmin_v1beta4/representations.rb' - -module Google - module Apis - # Cloud SQL Admin API - # - # Creates and manages Cloud SQL instances, which provide fully managed MySQL or - # PostgreSQL databases. - # - # @see https://cloud.google.com/sql/docs/reference/latest - module SqladminV1beta4 - VERSION = 'V1beta4' - REVISION = '20190827' - - # View and manage your data across Google Cloud Platform services - AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' - - # Manage your Google SQL Service instances - AUTH_SQLSERVICE_ADMIN = 'https://www.googleapis.com/auth/sqlservice.admin' - end - end -end diff --git a/generated/google/apis/sqladmin_v1beta4/classes.rb b/generated/google/apis/sqladmin_v1beta4/classes.rb deleted file mode 100644 index 2811678f0..000000000 --- a/generated/google/apis/sqladmin_v1beta4/classes.rb +++ /dev/null @@ -1,2633 +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 SqladminV1beta4 - - # An entry for an Access Control list. - class AclEntry - include Google::Apis::Core::Hashable - - # The time when this access control entry expires in RFC 3339 format, for - # example 2012-11-15T16:19:00.094Z. - # Corresponds to the JSON property `expirationTime` - # @return [DateTime] - attr_accessor :expiration_time - - # This is always sql#aclEntry. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # An optional label to identify this entry. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The whitelisted value for the access control list. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @expiration_time = args[:expiration_time] if args.key?(:expiration_time) - @kind = args[:kind] if args.key?(:kind) - @name = args[:name] if args.key?(:name) - @value = args[:value] if args.key?(:value) - end - end - - # An Admin API warning message. - class ApiWarning - include Google::Apis::Core::Hashable - - # Code to uniquely identify the warning type. - # Corresponds to the JSON property `code` - # @return [String] - attr_accessor :code - - # The warning message. - # 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) - @message = args[:message] if args.key?(:message) - end - end - - # Database instance backup configuration. - class BackupConfiguration - include Google::Apis::Core::Hashable - - # Whether binary log is enabled. If backup configuration is disabled, binary log - # must be disabled as well. - # Corresponds to the JSON property `binaryLogEnabled` - # @return [Boolean] - attr_accessor :binary_log_enabled - alias_method :binary_log_enabled?, :binary_log_enabled - - # Whether this configuration is enabled. - # Corresponds to the JSON property `enabled` - # @return [Boolean] - attr_accessor :enabled - alias_method :enabled?, :enabled - - # This is always sql#backupConfiguration. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The location of the backup. - # Corresponds to the JSON property `location` - # @return [String] - attr_accessor :location - - # Reserved for future use. - # Corresponds to the JSON property `replicationLogArchivingEnabled` - # @return [Boolean] - attr_accessor :replication_log_archiving_enabled - alias_method :replication_log_archiving_enabled?, :replication_log_archiving_enabled - - # Start time for the daily backup configuration in UTC timezone in the 24 hour - # format - HH:MM. - # Corresponds to the JSON property `startTime` - # @return [String] - attr_accessor :start_time - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @binary_log_enabled = args[:binary_log_enabled] if args.key?(:binary_log_enabled) - @enabled = args[:enabled] if args.key?(:enabled) - @kind = args[:kind] if args.key?(:kind) - @location = args[:location] if args.key?(:location) - @replication_log_archiving_enabled = args[:replication_log_archiving_enabled] if args.key?(:replication_log_archiving_enabled) - @start_time = args[:start_time] if args.key?(:start_time) - end - end - - # A BackupRun resource. - class BackupRun - include Google::Apis::Core::Hashable - - # The description of this run, only applicable to on-demand backups. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Disk encryption configuration. - # Corresponds to the JSON property `diskEncryptionConfiguration` - # @return [Google::Apis::SqladminV1beta4::DiskEncryptionConfiguration] - attr_accessor :disk_encryption_configuration - - # Disk encryption status. - # Corresponds to the JSON property `diskEncryptionStatus` - # @return [Google::Apis::SqladminV1beta4::DiskEncryptionStatus] - attr_accessor :disk_encryption_status - - # The time the backup operation completed in UTC timezone in RFC 3339 format, - # for example 2012-11-15T16:19:00.094Z. - # Corresponds to the JSON property `endTime` - # @return [DateTime] - attr_accessor :end_time - - # The time the run was enqueued in UTC timezone in RFC 3339 format, for example - # 2012-11-15T16:19:00.094Z. - # Corresponds to the JSON property `enqueuedTime` - # @return [DateTime] - attr_accessor :enqueued_time - - # Database instance operation error. - # Corresponds to the JSON property `error` - # @return [Google::Apis::SqladminV1beta4::OperationError] - attr_accessor :error - - # The identifier for this backup run. Unique only for a specific Cloud SQL - # instance. - # Corresponds to the JSON property `id` - # @return [Fixnum] - attr_accessor :id - - # Name of the database instance. - # Corresponds to the JSON property `instance` - # @return [String] - attr_accessor :instance - - # This is always sql#backupRun. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The location of the backup. - # Corresponds to the JSON property `location` - # @return [String] - attr_accessor :location - - # The URI of this resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # The time the backup operation actually started in UTC timezone in RFC 3339 - # format, for example 2012-11-15T16:19:00.094Z. - # Corresponds to the JSON property `startTime` - # @return [DateTime] - attr_accessor :start_time - - # The status of this run. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # The type of this run; can be either "AUTOMATED" or "ON_DEMAND". - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # The start time of the backup window during which this the backup was attempted - # in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. - # Corresponds to the JSON property `windowStartTime` - # @return [DateTime] - attr_accessor :window_start_time - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @description = args[:description] if args.key?(:description) - @disk_encryption_configuration = args[:disk_encryption_configuration] if args.key?(:disk_encryption_configuration) - @disk_encryption_status = args[:disk_encryption_status] if args.key?(:disk_encryption_status) - @end_time = args[:end_time] if args.key?(:end_time) - @enqueued_time = args[:enqueued_time] if args.key?(:enqueued_time) - @error = args[:error] if args.key?(:error) - @id = args[:id] if args.key?(:id) - @instance = args[:instance] if args.key?(:instance) - @kind = args[:kind] if args.key?(:kind) - @location = args[:location] if args.key?(:location) - @self_link = args[:self_link] if args.key?(:self_link) - @start_time = args[:start_time] if args.key?(:start_time) - @status = args[:status] if args.key?(:status) - @type = args[:type] if args.key?(:type) - @window_start_time = args[:window_start_time] if args.key?(:window_start_time) - end - end - - # Backup run list results. - class ListBackupRunsResponse - include Google::Apis::Core::Hashable - - # A list of backup runs in reverse chronological order of the enqueued time. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # This is always sql#backupRunsList. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The continuation token, used to page through large result sets. Provide this - # value in a subsequent request to return the next page of results. - # 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) - @items = args[:items] if args.key?(:items) - @kind = args[:kind] if args.key?(:kind) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - - # Binary log coordinates. - class BinLogCoordinates - include Google::Apis::Core::Hashable - - # Name of the binary log file for a Cloud SQL instance. - # Corresponds to the JSON property `binLogFileName` - # @return [String] - attr_accessor :bin_log_file_name - - # Position (offset) within the binary log file. - # Corresponds to the JSON property `binLogPosition` - # @return [Fixnum] - attr_accessor :bin_log_position - - # This is always sql#binLogCoordinates. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @bin_log_file_name = args[:bin_log_file_name] if args.key?(:bin_log_file_name) - @bin_log_position = args[:bin_log_position] if args.key?(:bin_log_position) - @kind = args[:kind] if args.key?(:kind) - end - end - - # Database instance clone context. - class CloneContext - include Google::Apis::Core::Hashable - - # Binary log coordinates. - # Corresponds to the JSON property `binLogCoordinates` - # @return [Google::Apis::SqladminV1beta4::BinLogCoordinates] - attr_accessor :bin_log_coordinates - - # Name of the Cloud SQL instance to be created as a clone. - # Corresponds to the JSON property `destinationInstanceName` - # @return [String] - attr_accessor :destination_instance_name - - # This is always sql#cloneContext. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Reserved for future use. - # Corresponds to the JSON property `pitrTimestampMs` - # @return [Fixnum] - attr_accessor :pitr_timestamp_ms - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @bin_log_coordinates = args[:bin_log_coordinates] if args.key?(:bin_log_coordinates) - @destination_instance_name = args[:destination_instance_name] if args.key?(:destination_instance_name) - @kind = args[:kind] if args.key?(:kind) - @pitr_timestamp_ms = args[:pitr_timestamp_ms] if args.key?(:pitr_timestamp_ms) - end - end - - # Represents a SQL database on the Cloud SQL instance. - class Database - include Google::Apis::Core::Hashable - - # The MySQL charset value. - # Corresponds to the JSON property `charset` - # @return [String] - attr_accessor :charset - - # The MySQL collation value. - # Corresponds to the JSON property `collation` - # @return [String] - attr_accessor :collation - - # This field is deprecated and will be removed from a future version of the API. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The name of the Cloud SQL instance. This does not include the project ID. - # Corresponds to the JSON property `instance` - # @return [String] - attr_accessor :instance - - # This is always sql#database. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The name of the database in the Cloud SQL instance. This does not include the - # project ID or instance name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The project ID of the project containing the Cloud SQL database. The Google - # apps domain is prefixed if applicable. - # Corresponds to the JSON property `project` - # @return [String] - attr_accessor :project - - # The URI of this resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @charset = args[:charset] if args.key?(:charset) - @collation = args[:collation] if args.key?(:collation) - @etag = args[:etag] if args.key?(:etag) - @instance = args[:instance] if args.key?(:instance) - @kind = args[:kind] if args.key?(:kind) - @name = args[:name] if args.key?(:name) - @project = args[:project] if args.key?(:project) - @self_link = args[:self_link] if args.key?(:self_link) - end - end - - # Database flags for Cloud SQL instances. - class DatabaseFlags - include Google::Apis::Core::Hashable - - # The name of the flag. These flags are passed at instance startup, so include - # both server options and system variables for MySQL. Flags should be specified - # with underscores, not hyphens. For more information, see Configuring Database - # Flags in the Cloud SQL documentation. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The value of the flag. Booleans should be set to on for true and off for false. - # This field must be omitted if the flag doesn't take a value. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @name = args[:name] if args.key?(:name) - @value = args[:value] if args.key?(:value) - end - end - - # A Cloud SQL instance resource. - class DatabaseInstance - include Google::Apis::Core::Hashable - - # FIRST_GEN: First Generation instance. MySQL only. - # SECOND_GEN: Second Generation instance or PostgreSQL instance. - # EXTERNAL: A database server that is not managed by Google. - # This property is read-only; use the tier property in the settings object to - # determine the database type and Second or First Generation. - # Corresponds to the JSON property `backendType` - # @return [String] - attr_accessor :backend_type - - # Connection name of the Cloud SQL instance used in connection strings. - # Corresponds to the JSON property `connectionName` - # @return [String] - attr_accessor :connection_name - - # The current disk usage of the instance in bytes. This property has been - # deprecated. Users should use the "cloudsql.googleapis.com/database/disk/ - # bytes_used" metric in Cloud Monitoring API instead. Please see this - # announcement for details. - # Corresponds to the JSON property `currentDiskSize` - # @return [Fixnum] - attr_accessor :current_disk_size - - # The database engine type and version. The databaseVersion field can not be - # changed after instance creation. MySQL Second Generation instances: MYSQL_5_7 ( - # default) or MYSQL_5_6. PostgreSQL instances: POSTGRES_9_6 (default) or - # POSTGRES_11 Beta. MySQL First Generation instances: MYSQL_5_6 (default) or - # MYSQL_5_5 - # Corresponds to the JSON property `databaseVersion` - # @return [String] - attr_accessor :database_version - - # Disk encryption configuration. - # Corresponds to the JSON property `diskEncryptionConfiguration` - # @return [Google::Apis::SqladminV1beta4::DiskEncryptionConfiguration] - attr_accessor :disk_encryption_configuration - - # Disk encryption status. - # Corresponds to the JSON property `diskEncryptionStatus` - # @return [Google::Apis::SqladminV1beta4::DiskEncryptionStatus] - attr_accessor :disk_encryption_status - - # This field is deprecated and will be removed from a future version of the API. - # Use the settings.settingsVersion field instead. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The name and status of the failover replica. This property is applicable only - # to Second Generation instances. - # Corresponds to the JSON property `failoverReplica` - # @return [Google::Apis::SqladminV1beta4::DatabaseInstance::FailoverReplica] - attr_accessor :failover_replica - - # The Compute Engine zone that the instance is currently serving from. This - # value could be different from the zone that was specified when the instance - # was created if the instance has failed over to its secondary zone. - # Corresponds to the JSON property `gceZone` - # @return [String] - attr_accessor :gce_zone - - # The instance type. This can be one of the following. - # CLOUD_SQL_INSTANCE: A Cloud SQL instance that is not replicating from a master. - # ON_PREMISES_INSTANCE: An instance running on the customer's premises. - # READ_REPLICA_INSTANCE: A Cloud SQL instance configured as a read-replica. - # Corresponds to the JSON property `instanceType` - # @return [String] - attr_accessor :instance_type - - # The assigned IP addresses for the instance. - # Corresponds to the JSON property `ipAddresses` - # @return [Array] - attr_accessor :ip_addresses - - # The IPv6 address assigned to the instance. This property is applicable only to - # First Generation instances. - # Corresponds to the JSON property `ipv6Address` - # @return [String] - attr_accessor :ipv6_address - - # This is always sql#instance. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The name of the instance which will act as master in the replication setup. - # Corresponds to the JSON property `masterInstanceName` - # @return [String] - attr_accessor :master_instance_name - - # The maximum disk size of the instance in bytes. - # Corresponds to the JSON property `maxDiskSize` - # @return [Fixnum] - attr_accessor :max_disk_size - - # Name of the Cloud SQL instance. This does not include the project ID. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # On-premises instance configuration. - # Corresponds to the JSON property `onPremisesConfiguration` - # @return [Google::Apis::SqladminV1beta4::OnPremisesConfiguration] - attr_accessor :on_premises_configuration - - # The project ID of the project containing the Cloud SQL instance. The Google - # apps domain is prefixed if applicable. - # Corresponds to the JSON property `project` - # @return [String] - attr_accessor :project - - # The geographical region. Can be us-central (FIRST_GEN instances only), us- - # central1 (SECOND_GEN instances only), asia-east1 or europe-west1. Defaults to - # us-central or us-central1 depending on the instance type (First Generation or - # Second Generation). The region can not be changed after instance creation. - # Corresponds to the JSON property `region` - # @return [String] - attr_accessor :region - - # Read-replica configuration for connecting to the master. - # Corresponds to the JSON property `replicaConfiguration` - # @return [Google::Apis::SqladminV1beta4::ReplicaConfiguration] - attr_accessor :replica_configuration - - # The replicas of the instance. - # Corresponds to the JSON property `replicaNames` - # @return [Array] - attr_accessor :replica_names - - # Initial root password. Use only on creation. - # Corresponds to the JSON property `rootPassword` - # @return [String] - attr_accessor :root_password - - # The URI of this resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # SslCerts Resource - # Corresponds to the JSON property `serverCaCert` - # @return [Google::Apis::SqladminV1beta4::SslCert] - attr_accessor :server_ca_cert - - # The service account email address assigned to the instance. This property is - # applicable only to Second Generation instances. - # Corresponds to the JSON property `serviceAccountEmailAddress` - # @return [String] - attr_accessor :service_account_email_address - - # Database instance settings. - # Corresponds to the JSON property `settings` - # @return [Google::Apis::SqladminV1beta4::Settings] - attr_accessor :settings - - # The current serving state of the Cloud SQL instance. This can be one of the - # following. - # RUNNABLE: The instance is running, or is ready to run when accessed. - # SUSPENDED: The instance is not available, for example due to problems with - # billing. - # PENDING_CREATE: The instance is being created. - # MAINTENANCE: The instance is down for maintenance. - # FAILED: The instance creation failed. - # UNKNOWN_STATE: The state of the instance is unknown. - # Corresponds to the JSON property `state` - # @return [String] - attr_accessor :state - - # If the instance state is SUSPENDED, the reason for the suspension. - # Corresponds to the JSON property `suspensionReason` - # @return [Array] - attr_accessor :suspension_reason - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @backend_type = args[:backend_type] if args.key?(:backend_type) - @connection_name = args[:connection_name] if args.key?(:connection_name) - @current_disk_size = args[:current_disk_size] if args.key?(:current_disk_size) - @database_version = args[:database_version] if args.key?(:database_version) - @disk_encryption_configuration = args[:disk_encryption_configuration] if args.key?(:disk_encryption_configuration) - @disk_encryption_status = args[:disk_encryption_status] if args.key?(:disk_encryption_status) - @etag = args[:etag] if args.key?(:etag) - @failover_replica = args[:failover_replica] if args.key?(:failover_replica) - @gce_zone = args[:gce_zone] if args.key?(:gce_zone) - @instance_type = args[:instance_type] if args.key?(:instance_type) - @ip_addresses = args[:ip_addresses] if args.key?(:ip_addresses) - @ipv6_address = args[:ipv6_address] if args.key?(:ipv6_address) - @kind = args[:kind] if args.key?(:kind) - @master_instance_name = args[:master_instance_name] if args.key?(:master_instance_name) - @max_disk_size = args[:max_disk_size] if args.key?(:max_disk_size) - @name = args[:name] if args.key?(:name) - @on_premises_configuration = args[:on_premises_configuration] if args.key?(:on_premises_configuration) - @project = args[:project] if args.key?(:project) - @region = args[:region] if args.key?(:region) - @replica_configuration = args[:replica_configuration] if args.key?(:replica_configuration) - @replica_names = args[:replica_names] if args.key?(:replica_names) - @root_password = args[:root_password] if args.key?(:root_password) - @self_link = args[:self_link] if args.key?(:self_link) - @server_ca_cert = args[:server_ca_cert] if args.key?(:server_ca_cert) - @service_account_email_address = args[:service_account_email_address] if args.key?(:service_account_email_address) - @settings = args[:settings] if args.key?(:settings) - @state = args[:state] if args.key?(:state) - @suspension_reason = args[:suspension_reason] if args.key?(:suspension_reason) - end - - # The name and status of the failover replica. This property is applicable only - # to Second Generation instances. - class FailoverReplica - include Google::Apis::Core::Hashable - - # The availability status of the failover replica. A false status indicates that - # the failover replica is out of sync. The master can only failover to the - # falover replica when the status is true. - # Corresponds to the JSON property `available` - # @return [Boolean] - attr_accessor :available - alias_method :available?, :available - - # The name of the failover replica. If specified at instance creation, a - # failover replica is created for the instance. The name doesn't include the - # project ID. This property is applicable only to Second Generation instances. - # 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) - @available = args[:available] if args.key?(:available) - @name = args[:name] if args.key?(:name) - end - end - end - - # Database list response. - class ListDatabasesResponse - include Google::Apis::Core::Hashable - - # List of database resources in the instance. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # This is always sql#databasesList. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @items = args[:items] if args.key?(:items) - @kind = args[:kind] if args.key?(:kind) - end - end - - # Read-replica configuration for connecting to the on-premises master. - class DemoteMasterConfiguration - include Google::Apis::Core::Hashable - - # This is always sql#demoteMasterConfiguration. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Read-replica configuration specific to MySQL databases. - # Corresponds to the JSON property `mysqlReplicaConfiguration` - # @return [Google::Apis::SqladminV1beta4::DemoteMasterMySqlReplicaConfiguration] - attr_accessor :mysql_replica_configuration - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] if args.key?(:kind) - @mysql_replica_configuration = args[:mysql_replica_configuration] if args.key?(:mysql_replica_configuration) - end - end - - # Database instance demote master context. - class DemoteMasterContext - include Google::Apis::Core::Hashable - - # This is always sql#demoteMasterContext. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The name of the instance which will act as on-premises master in the - # replication setup. - # Corresponds to the JSON property `masterInstanceName` - # @return [String] - attr_accessor :master_instance_name - - # Read-replica configuration for connecting to the on-premises master. - # Corresponds to the JSON property `replicaConfiguration` - # @return [Google::Apis::SqladminV1beta4::DemoteMasterConfiguration] - attr_accessor :replica_configuration - - # Verify GTID consistency for demote operation. Default value: True. Second - # Generation instances only. Setting this flag to false enables you to bypass - # GTID consistency check between on-premises master and Cloud SQL instance - # during the demotion operation but also exposes you to the risk of future - # replication failures. Change the value only if you know the reason for the - # GTID divergence and are confident that doing so will not cause any replication - # issues. - # Corresponds to the JSON property `verifyGtidConsistency` - # @return [Boolean] - attr_accessor :verify_gtid_consistency - alias_method :verify_gtid_consistency?, :verify_gtid_consistency - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] if args.key?(:kind) - @master_instance_name = args[:master_instance_name] if args.key?(:master_instance_name) - @replica_configuration = args[:replica_configuration] if args.key?(:replica_configuration) - @verify_gtid_consistency = args[:verify_gtid_consistency] if args.key?(:verify_gtid_consistency) - end - end - - # Read-replica configuration specific to MySQL databases. - class DemoteMasterMySqlReplicaConfiguration - include Google::Apis::Core::Hashable - - # PEM representation of the trusted CA's x509 certificate. - # Corresponds to the JSON property `caCertificate` - # @return [String] - attr_accessor :ca_certificate - - # PEM representation of the slave's x509 certificate. - # Corresponds to the JSON property `clientCertificate` - # @return [String] - attr_accessor :client_certificate - - # PEM representation of the slave's private key. The corresponsing public key is - # encoded in the client's certificate. The format of the slave's private key can - # be either PKCS #1 or PKCS #8. - # Corresponds to the JSON property `clientKey` - # @return [String] - attr_accessor :client_key - - # This is always sql#demoteMasterMysqlReplicaConfiguration. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The password for the replication connection. - # Corresponds to the JSON property `password` - # @return [String] - attr_accessor :password - - # The username for the replication connection. - # Corresponds to the JSON property `username` - # @return [String] - attr_accessor :username - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @ca_certificate = args[:ca_certificate] if args.key?(:ca_certificate) - @client_certificate = args[:client_certificate] if args.key?(:client_certificate) - @client_key = args[:client_key] if args.key?(:client_key) - @kind = args[:kind] if args.key?(:kind) - @password = args[:password] if args.key?(:password) - @username = args[:username] if args.key?(:username) - end - end - - # Disk encryption configuration. - class DiskEncryptionConfiguration - include Google::Apis::Core::Hashable - - # This is always sql#diskEncryptionConfiguration. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # KMS key resource name - # Corresponds to the JSON property `kmsKeyName` - # @return [String] - attr_accessor :kms_key_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] if args.key?(:kind) - @kms_key_name = args[:kms_key_name] if args.key?(:kms_key_name) - end - end - - # Disk encryption status. - class DiskEncryptionStatus - include Google::Apis::Core::Hashable - - # This is always sql#diskEncryptionStatus. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # KMS key version used to encrypt the Cloud SQL instance disk - # Corresponds to the JSON property `kmsKeyVersionName` - # @return [String] - attr_accessor :kms_key_version_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] if args.key?(:kind) - @kms_key_version_name = args[:kms_key_version_name] if args.key?(:kms_key_version_name) - end - end - - # Database instance export context. - class ExportContext - include Google::Apis::Core::Hashable - - # Options for exporting data as CSV. - # Corresponds to the JSON property `csvExportOptions` - # @return [Google::Apis::SqladminV1beta4::ExportContext::CsvExportOptions] - attr_accessor :csv_export_options - - # Databases to be exported. - # MySQL instances: If fileType is SQL and no database is specified, all - # databases are exported, except for the mysql system database. If fileType is - # CSV, you can specify one database, either by using this property or by using - # the csvExportOptions.selectQuery property, which takes precedence over this - # property. - # PostgreSQL instances: Specify exactly one database to be exported. If fileType - # is CSV, this database must match the database used in the csvExportOptions. - # selectQuery property. - # Corresponds to the JSON property `databases` - # @return [Array] - attr_accessor :databases - - # The file type for the specified uri. - # SQL: The file contains SQL statements. - # CSV: The file contains CSV data. - # Corresponds to the JSON property `fileType` - # @return [String] - attr_accessor :file_type - - # This is always sql#exportContext. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Options for exporting data as SQL statements. - # Corresponds to the JSON property `sqlExportOptions` - # @return [Google::Apis::SqladminV1beta4::ExportContext::SqlExportOptions] - attr_accessor :sql_export_options - - # The path to the file in Google Cloud Storage where the export will be stored. - # The URI is in the form gs://bucketName/fileName. If the file already exists, - # the requests succeeds, but the operation fails. If fileType is SQL and the - # filename ends with .gz, the contents are compressed. - # Corresponds to the JSON property `uri` - # @return [String] - attr_accessor :uri - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @csv_export_options = args[:csv_export_options] if args.key?(:csv_export_options) - @databases = args[:databases] if args.key?(:databases) - @file_type = args[:file_type] if args.key?(:file_type) - @kind = args[:kind] if args.key?(:kind) - @sql_export_options = args[:sql_export_options] if args.key?(:sql_export_options) - @uri = args[:uri] if args.key?(:uri) - end - - # Options for exporting data as CSV. - class CsvExportOptions - include Google::Apis::Core::Hashable - - # The select query used to extract the data. - # Corresponds to the JSON property `selectQuery` - # @return [String] - attr_accessor :select_query - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @select_query = args[:select_query] if args.key?(:select_query) - end - end - - # Options for exporting data as SQL statements. - class SqlExportOptions - include Google::Apis::Core::Hashable - - # Options for exporting from MySQL. - # Corresponds to the JSON property `mysqlExportOptions` - # @return [Google::Apis::SqladminV1beta4::ExportContext::SqlExportOptions::MysqlExportOptions] - attr_accessor :mysql_export_options - - # Export only schemas. - # Corresponds to the JSON property `schemaOnly` - # @return [Boolean] - attr_accessor :schema_only - alias_method :schema_only?, :schema_only - - # Tables to export, or that were exported, from the specified database. If you - # specify tables, specify one and only one database. For PostgreSQL instances, - # you can specify only one table. - # Corresponds to the JSON property `tables` - # @return [Array] - attr_accessor :tables - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @mysql_export_options = args[:mysql_export_options] if args.key?(:mysql_export_options) - @schema_only = args[:schema_only] if args.key?(:schema_only) - @tables = args[:tables] if args.key?(:tables) - end - - # Options for exporting from MySQL. - class MysqlExportOptions - include Google::Apis::Core::Hashable - - # Option to include SQL statement required to set up replication. If set to 1, - # the dump file includes a CHANGE MASTER TO statement with the binary log - # coordinates. If set to 2, the CHANGE MASTER TO statement is written as a SQL - # comment, and has no effect. All other values are ignored. - # Corresponds to the JSON property `masterData` - # @return [Fixnum] - attr_accessor :master_data - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @master_data = args[:master_data] if args.key?(:master_data) - end - end - end - end - - # Database instance failover context. - class FailoverContext - include Google::Apis::Core::Hashable - - # This is always sql#failoverContext. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The current settings version of this instance. Request will be rejected if - # this version doesn't match the current settings version. - # Corresponds to the JSON property `settingsVersion` - # @return [Fixnum] - attr_accessor :settings_version - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] if args.key?(:kind) - @settings_version = args[:settings_version] if args.key?(:settings_version) - end - end - - # A flag resource. - class Flag - include Google::Apis::Core::Hashable - - # For STRING flags, a list of strings that the value can be set to. - # Corresponds to the JSON property `allowedStringValues` - # @return [Array] - attr_accessor :allowed_string_values - - # The database version this flag applies to. Can be MYSQL_5_5, MYSQL_5_6, or - # MYSQL_5_7. MYSQL_5_7 is applicable only to Second Generation instances. - # Corresponds to the JSON property `appliesTo` - # @return [Array] - attr_accessor :applies_to - - # True if the flag is only released in Beta. - # Corresponds to the JSON property `inBeta` - # @return [Boolean] - attr_accessor :in_beta - alias_method :in_beta?, :in_beta - - # This is always sql#flag. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # For INTEGER flags, the maximum allowed value. - # Corresponds to the JSON property `maxValue` - # @return [Fixnum] - attr_accessor :max_value - - # For INTEGER flags, the minimum allowed value. - # Corresponds to the JSON property `minValue` - # @return [Fixnum] - attr_accessor :min_value - - # This is the name of the flag. Flag names always use underscores, not hyphens, - # e.g. max_allowed_packet - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Indicates whether changing this flag will trigger a database restart. Only - # applicable to Second Generation instances. - # Corresponds to the JSON property `requiresRestart` - # @return [Boolean] - attr_accessor :requires_restart - alias_method :requires_restart?, :requires_restart - - # The type of the flag. Flags are typed to being BOOLEAN, STRING, INTEGER or - # NONE. NONE is used for flags which do not take a value, such as - # skip_grant_tables. - # 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) - @allowed_string_values = args[:allowed_string_values] if args.key?(:allowed_string_values) - @applies_to = args[:applies_to] if args.key?(:applies_to) - @in_beta = args[:in_beta] if args.key?(:in_beta) - @kind = args[:kind] if args.key?(:kind) - @max_value = args[:max_value] if args.key?(:max_value) - @min_value = args[:min_value] if args.key?(:min_value) - @name = args[:name] if args.key?(:name) - @requires_restart = args[:requires_restart] if args.key?(:requires_restart) - @type = args[:type] if args.key?(:type) - end - end - - # Flags list response. - class ListFlagsResponse - include Google::Apis::Core::Hashable - - # List of flags. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # This is always sql#flagsList. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @items = args[:items] if args.key?(:items) - @kind = args[:kind] if args.key?(:kind) - end - end - - # Database instance import context. - class ImportContext - include Google::Apis::Core::Hashable - - # Import parameters specific to SQL Server .BAK files - # Corresponds to the JSON property `bakImportOptions` - # @return [Google::Apis::SqladminV1beta4::ImportContext::BakImportOptions] - attr_accessor :bak_import_options - - # Options for importing data as CSV. - # Corresponds to the JSON property `csvImportOptions` - # @return [Google::Apis::SqladminV1beta4::ImportContext::CsvImportOptions] - attr_accessor :csv_import_options - - # The target database for the import. If fileType is SQL, this field is required - # only if the import file does not specify a database, and is overridden by any - # database specification in the import file. If fileType is CSV, one database - # must be specified. - # Corresponds to the JSON property `database` - # @return [String] - attr_accessor :database - - # The file type for the specified uri. - # SQL: The file contains SQL statements. - # CSV: The file contains CSV data. - # Corresponds to the JSON property `fileType` - # @return [String] - attr_accessor :file_type - - # The PostgreSQL user for this import operation. PostgreSQL instances only. - # Corresponds to the JSON property `importUser` - # @return [String] - attr_accessor :import_user - - # This is always sql#importContext. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Path to the import file in Cloud Storage, in the form gs://bucketName/fileName. - # Compressed gzip files (.gz) are supported when fileType is SQL. The instance - # must have write permissions to the bucket and read access to the file. - # Corresponds to the JSON property `uri` - # @return [String] - attr_accessor :uri - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @bak_import_options = args[:bak_import_options] if args.key?(:bak_import_options) - @csv_import_options = args[:csv_import_options] if args.key?(:csv_import_options) - @database = args[:database] if args.key?(:database) - @file_type = args[:file_type] if args.key?(:file_type) - @import_user = args[:import_user] if args.key?(:import_user) - @kind = args[:kind] if args.key?(:kind) - @uri = args[:uri] if args.key?(:uri) - end - - # Import parameters specific to SQL Server .BAK files - class BakImportOptions - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `encryptionOptions` - # @return [Google::Apis::SqladminV1beta4::ImportContext::BakImportOptions::EncryptionOptions] - attr_accessor :encryption_options - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @encryption_options = args[:encryption_options] if args.key?(:encryption_options) - end - - # - class EncryptionOptions - include Google::Apis::Core::Hashable - - # Path to the Certificate (.cer) in Cloud Storage, in the form gs://bucketName/ - # fileName. The instance must have write permissions to the bucket and read - # access to the file. - # Corresponds to the JSON property `certPath` - # @return [String] - attr_accessor :cert_path - - # Password that encrypts the private key - # Corresponds to the JSON property `pvkPassword` - # @return [String] - attr_accessor :pvk_password - - # Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form gs:// - # bucketName/fileName. The instance must have write permissions to the bucket - # and read access to the file. - # Corresponds to the JSON property `pvkPath` - # @return [String] - attr_accessor :pvk_path - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @cert_path = args[:cert_path] if args.key?(:cert_path) - @pvk_password = args[:pvk_password] if args.key?(:pvk_password) - @pvk_path = args[:pvk_path] if args.key?(:pvk_path) - end - end - end - - # Options for importing data as CSV. - class CsvImportOptions - include Google::Apis::Core::Hashable - - # The columns to which CSV data is imported. If not specified, all columns of - # the database table are loaded with CSV data. - # Corresponds to the JSON property `columns` - # @return [Array] - attr_accessor :columns - - # The table to which CSV data is imported. - # Corresponds to the JSON property `table` - # @return [String] - attr_accessor :table - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @columns = args[:columns] if args.key?(:columns) - @table = args[:table] if args.key?(:table) - end - end - end - - # Database instance clone request. - class CloneInstancesRequest - include Google::Apis::Core::Hashable - - # Database instance clone context. - # Corresponds to the JSON property `cloneContext` - # @return [Google::Apis::SqladminV1beta4::CloneContext] - attr_accessor :clone_context - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @clone_context = args[:clone_context] if args.key?(:clone_context) - end - end - - # Database demote master request. - class InstancesDemoteMasterRequest - include Google::Apis::Core::Hashable - - # Database instance demote master context. - # Corresponds to the JSON property `demoteMasterContext` - # @return [Google::Apis::SqladminV1beta4::DemoteMasterContext] - attr_accessor :demote_master_context - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @demote_master_context = args[:demote_master_context] if args.key?(:demote_master_context) - end - end - - # Database instance export request. - class ExportInstancesRequest - include Google::Apis::Core::Hashable - - # Database instance export context. - # Corresponds to the JSON property `exportContext` - # @return [Google::Apis::SqladminV1beta4::ExportContext] - attr_accessor :export_context - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @export_context = args[:export_context] if args.key?(:export_context) - end - end - - # Instance failover request. - class InstancesFailoverRequest - include Google::Apis::Core::Hashable - - # Database instance failover context. - # Corresponds to the JSON property `failoverContext` - # @return [Google::Apis::SqladminV1beta4::FailoverContext] - attr_accessor :failover_context - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @failover_context = args[:failover_context] if args.key?(:failover_context) - end - end - - # Database instance import request. - class ImportInstancesRequest - include Google::Apis::Core::Hashable - - # Database instance import context. - # Corresponds to the JSON property `importContext` - # @return [Google::Apis::SqladminV1beta4::ImportContext] - attr_accessor :import_context - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @import_context = args[:import_context] if args.key?(:import_context) - end - end - - # Database instances list response. - class ListInstancesResponse - include Google::Apis::Core::Hashable - - # List of database instance resources. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # This is always sql#instancesList. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The continuation token, used to page through large result sets. Provide this - # value in a subsequent request to return the next page of results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # List of warnings that ocurred while handling the request. - # Corresponds to the JSON property `warnings` - # @return [Array] - attr_accessor :warnings - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @items = args[:items] if args.key?(:items) - @kind = args[:kind] if args.key?(:kind) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @warnings = args[:warnings] if args.key?(:warnings) - end - end - - # Instances ListServerCas response. - class InstancesListServerCasResponse - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `activeVersion` - # @return [String] - attr_accessor :active_version - - # List of server CA certificates for the instance. - # Corresponds to the JSON property `certs` - # @return [Array] - attr_accessor :certs - - # This is always sql#instancesListServerCas. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @active_version = args[:active_version] if args.key?(:active_version) - @certs = args[:certs] if args.key?(:certs) - @kind = args[:kind] if args.key?(:kind) - end - end - - # Database instance restore backup request. - class RestoreInstancesBackupRequest - include Google::Apis::Core::Hashable - - # Database instance restore from backup context. - # Corresponds to the JSON property `restoreBackupContext` - # @return [Google::Apis::SqladminV1beta4::RestoreBackupContext] - attr_accessor :restore_backup_context - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @restore_backup_context = args[:restore_backup_context] if args.key?(:restore_backup_context) - end - end - - # Rotate Server CA request. - class InstancesRotateServerCaRequest - include Google::Apis::Core::Hashable - - # Instance rotate server CA context. - # Corresponds to the JSON property `rotateServerCaContext` - # @return [Google::Apis::SqladminV1beta4::RotateServerCaContext] - attr_accessor :rotate_server_ca_context - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @rotate_server_ca_context = args[:rotate_server_ca_context] if args.key?(:rotate_server_ca_context) - end - end - - # Instance truncate log request. - class InstancesTruncateLogRequest - include Google::Apis::Core::Hashable - - # Database Instance truncate log context. - # Corresponds to the JSON property `truncateLogContext` - # @return [Google::Apis::SqladminV1beta4::TruncateLogContext] - attr_accessor :truncate_log_context - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @truncate_log_context = args[:truncate_log_context] if args.key?(:truncate_log_context) - end - end - - # IP Management configuration. - class IpConfiguration - include Google::Apis::Core::Hashable - - # The list of external networks that are allowed to connect to the instance - # using the IP. In CIDR notation, also known as 'slash' notation (e.g. 192.168. - # 100.0/24). - # Corresponds to the JSON property `authorizedNetworks` - # @return [Array] - attr_accessor :authorized_networks - - # Whether the instance should be assigned an IP address or not. - # Corresponds to the JSON property `ipv4Enabled` - # @return [Boolean] - attr_accessor :ipv4_enabled - alias_method :ipv4_enabled?, :ipv4_enabled - - # The resource link for the VPC network from which the Cloud SQL instance is - # accessible for private IP. For example, /projects/myProject/global/networks/ - # default. This setting can be updated, but it cannot be removed after it is set. - # Corresponds to the JSON property `privateNetwork` - # @return [String] - attr_accessor :private_network - - # Whether SSL connections over IP should be enforced or not. - # Corresponds to the JSON property `requireSsl` - # @return [Boolean] - attr_accessor :require_ssl - alias_method :require_ssl?, :require_ssl - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @authorized_networks = args[:authorized_networks] if args.key?(:authorized_networks) - @ipv4_enabled = args[:ipv4_enabled] if args.key?(:ipv4_enabled) - @private_network = args[:private_network] if args.key?(:private_network) - @require_ssl = args[:require_ssl] if args.key?(:require_ssl) - end - end - - # Database instance IP Mapping. - class IpMapping - include Google::Apis::Core::Hashable - - # The IP address assigned. - # Corresponds to the JSON property `ipAddress` - # @return [String] - attr_accessor :ip_address - - # The due time for this IP to be retired in RFC 3339 format, for example 2012-11- - # 15T16:19:00.094Z. This field is only available when the IP is scheduled to be - # retired. - # Corresponds to the JSON property `timeToRetire` - # @return [DateTime] - attr_accessor :time_to_retire - - # The type of this IP address. A PRIMARY address is a public address that can - # accept incoming connections. A PRIVATE address is a private address that can - # accept incoming connections. An OUTGOING address is the source address of - # connections originating from the instance, if supported. - # 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) - @ip_address = args[:ip_address] if args.key?(:ip_address) - @time_to_retire = args[:time_to_retire] if args.key?(:time_to_retire) - @type = args[:type] if args.key?(:type) - end - end - - # Preferred location. This specifies where a Cloud SQL instance should - # preferably be located, either in a specific Compute Engine zone, or co-located - # with an App Engine application. Note that if the preferred location is not - # available, the instance will be located as close as possible within the region. - # Only one location may be specified. - class LocationPreference - include Google::Apis::Core::Hashable - - # The AppEngine application to follow, it must be in the same region as the - # Cloud SQL instance. - # Corresponds to the JSON property `followGaeApplication` - # @return [String] - attr_accessor :follow_gae_application - - # This is always sql#locationPreference. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The preferred Compute Engine zone (e.g. us-central1-a, us-central1-b, etc.). - # Corresponds to the JSON property `zone` - # @return [String] - attr_accessor :zone - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @follow_gae_application = args[:follow_gae_application] if args.key?(:follow_gae_application) - @kind = args[:kind] if args.key?(:kind) - @zone = args[:zone] if args.key?(:zone) - end - end - - # Maintenance window. This specifies when a v2 Cloud SQL instance should - # preferably be restarted for system maintenance purposes. - class MaintenanceWindow - include Google::Apis::Core::Hashable - - # day of week (1-7), starting on Monday. - # Corresponds to the JSON property `day` - # @return [Fixnum] - attr_accessor :day - - # hour of day - 0 to 23. - # Corresponds to the JSON property `hour` - # @return [Fixnum] - attr_accessor :hour - - # This is always sql#maintenanceWindow. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Maintenance timing setting: canary (Earlier) or stable (Later). - # Learn more. - # Corresponds to the JSON property `updateTrack` - # @return [String] - attr_accessor :update_track - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @day = args[:day] if args.key?(:day) - @hour = args[:hour] if args.key?(:hour) - @kind = args[:kind] if args.key?(:kind) - @update_track = args[:update_track] if args.key?(:update_track) - end - end - - # Read-replica configuration specific to MySQL databases. - class MySqlReplicaConfiguration - include Google::Apis::Core::Hashable - - # PEM representation of the trusted CA's x509 certificate. - # Corresponds to the JSON property `caCertificate` - # @return [String] - attr_accessor :ca_certificate - - # PEM representation of the slave's x509 certificate. - # Corresponds to the JSON property `clientCertificate` - # @return [String] - attr_accessor :client_certificate - - # PEM representation of the slave's private key. The corresponsing public key is - # encoded in the client's certificate. - # Corresponds to the JSON property `clientKey` - # @return [String] - attr_accessor :client_key - - # Seconds to wait between connect retries. MySQL's default is 60 seconds. - # Corresponds to the JSON property `connectRetryInterval` - # @return [Fixnum] - attr_accessor :connect_retry_interval - - # Path to a SQL dump file in Google Cloud Storage from which the slave instance - # is to be created. The URI is in the form gs://bucketName/fileName. Compressed - # gzip files (.gz) are also supported. Dumps should have the binlog co-ordinates - # from which replication should begin. This can be accomplished by setting -- - # master-data to 1 when using mysqldump. - # Corresponds to the JSON property `dumpFilePath` - # @return [String] - attr_accessor :dump_file_path - - # This is always sql#mysqlReplicaConfiguration. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Interval in milliseconds between replication heartbeats. - # Corresponds to the JSON property `masterHeartbeatPeriod` - # @return [Fixnum] - attr_accessor :master_heartbeat_period - - # The password for the replication connection. - # Corresponds to the JSON property `password` - # @return [String] - attr_accessor :password - - # A list of permissible ciphers to use for SSL encryption. - # Corresponds to the JSON property `sslCipher` - # @return [String] - attr_accessor :ssl_cipher - - # The username for the replication connection. - # Corresponds to the JSON property `username` - # @return [String] - attr_accessor :username - - # Whether or not to check the master's Common Name value in the certificate that - # it sends during the SSL handshake. - # Corresponds to the JSON property `verifyServerCertificate` - # @return [Boolean] - attr_accessor :verify_server_certificate - alias_method :verify_server_certificate?, :verify_server_certificate - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @ca_certificate = args[:ca_certificate] if args.key?(:ca_certificate) - @client_certificate = args[:client_certificate] if args.key?(:client_certificate) - @client_key = args[:client_key] if args.key?(:client_key) - @connect_retry_interval = args[:connect_retry_interval] if args.key?(:connect_retry_interval) - @dump_file_path = args[:dump_file_path] if args.key?(:dump_file_path) - @kind = args[:kind] if args.key?(:kind) - @master_heartbeat_period = args[:master_heartbeat_period] if args.key?(:master_heartbeat_period) - @password = args[:password] if args.key?(:password) - @ssl_cipher = args[:ssl_cipher] if args.key?(:ssl_cipher) - @username = args[:username] if args.key?(:username) - @verify_server_certificate = args[:verify_server_certificate] if args.key?(:verify_server_certificate) - end - end - - # On-premises instance configuration. - class OnPremisesConfiguration - include Google::Apis::Core::Hashable - - # The host and port of the on-premises instance in host:port format - # Corresponds to the JSON property `hostPort` - # @return [String] - attr_accessor :host_port - - # This is always sql#onPremisesConfiguration. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @host_port = args[:host_port] if args.key?(:host_port) - @kind = args[:kind] if args.key?(:kind) - end - end - - # An Operation resource. For successful operations that return an Operation - # resource, only the fields relevant to the operation are populated in the - # resource. - class Operation - include Google::Apis::Core::Hashable - - # The time this operation finished in UTC timezone in RFC 3339 format, for - # example 2012-11-15T16:19:00.094Z. - # Corresponds to the JSON property `endTime` - # @return [DateTime] - attr_accessor :end_time - - # Database instance operation errors list wrapper. - # Corresponds to the JSON property `error` - # @return [Google::Apis::SqladminV1beta4::OperationErrors] - attr_accessor :error - - # Database instance export context. - # Corresponds to the JSON property `exportContext` - # @return [Google::Apis::SqladminV1beta4::ExportContext] - attr_accessor :export_context - - # Database instance import context. - # Corresponds to the JSON property `importContext` - # @return [Google::Apis::SqladminV1beta4::ImportContext] - attr_accessor :import_context - - # The time this operation was enqueued in UTC timezone in RFC 3339 format, for - # example 2012-11-15T16:19:00.094Z. - # Corresponds to the JSON property `insertTime` - # @return [DateTime] - attr_accessor :insert_time - - # This is always sql#operation. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # An identifier that uniquely identifies the operation. You can use this - # identifier to retrieve the Operations resource that has information about the - # operation. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The type of the operation. Valid values are CREATE, DELETE, UPDATE, RESTART, - # IMPORT, EXPORT, BACKUP_VOLUME, RESTORE_VOLUME, CREATE_USER, DELETE_USER, - # CREATE_DATABASE, DELETE_DATABASE . - # Corresponds to the JSON property `operationType` - # @return [String] - attr_accessor :operation_type - - # The URI of this resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # The time this operation actually started in UTC timezone in RFC 3339 format, - # for example 2012-11-15T16:19:00.094Z. - # Corresponds to the JSON property `startTime` - # @return [DateTime] - attr_accessor :start_time - - # The status of an operation. Valid values are PENDING, RUNNING, DONE, UNKNOWN. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # Name of the database instance related to this operation. - # Corresponds to the JSON property `targetId` - # @return [String] - attr_accessor :target_id - - # - # Corresponds to the JSON property `targetLink` - # @return [String] - attr_accessor :target_link - - # The project ID of the target instance related to this operation. - # Corresponds to the JSON property `targetProject` - # @return [String] - attr_accessor :target_project - - # The email address of the user who initiated this operation. - # Corresponds to the JSON property `user` - # @return [String] - attr_accessor :user - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @end_time = args[:end_time] if args.key?(:end_time) - @error = args[:error] if args.key?(:error) - @export_context = args[:export_context] if args.key?(:export_context) - @import_context = args[:import_context] if args.key?(:import_context) - @insert_time = args[:insert_time] if args.key?(:insert_time) - @kind = args[:kind] if args.key?(:kind) - @name = args[:name] if args.key?(:name) - @operation_type = args[:operation_type] if args.key?(:operation_type) - @self_link = args[:self_link] if args.key?(:self_link) - @start_time = args[:start_time] if args.key?(:start_time) - @status = args[:status] if args.key?(:status) - @target_id = args[:target_id] if args.key?(:target_id) - @target_link = args[:target_link] if args.key?(:target_link) - @target_project = args[:target_project] if args.key?(:target_project) - @user = args[:user] if args.key?(:user) - end - end - - # Database instance operation error. - class OperationError - include Google::Apis::Core::Hashable - - # Identifies the specific error that occurred. - # Corresponds to the JSON property `code` - # @return [String] - attr_accessor :code - - # This is always sql#operationError. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Additional information about the error encountered. - # 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) - @kind = args[:kind] if args.key?(:kind) - @message = args[:message] if args.key?(:message) - end - end - - # Database instance operation errors list wrapper. - class OperationErrors - include Google::Apis::Core::Hashable - - # The list of errors encountered while processing this operation. - # Corresponds to the JSON property `errors` - # @return [Array] - attr_accessor :errors - - # This is always sql#operationErrors. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @errors = args[:errors] if args.key?(:errors) - @kind = args[:kind] if args.key?(:kind) - end - end - - # Database instance list operations response. - class ListOperationsResponse - include Google::Apis::Core::Hashable - - # List of operation resources. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # This is always sql#operationsList. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The continuation token, used to page through large result sets. Provide this - # value in a subsequent request to return the next page of results. - # 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) - @items = args[:items] if args.key?(:items) - @kind = args[:kind] if args.key?(:kind) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - - # Read-replica configuration for connecting to the master. - class ReplicaConfiguration - include Google::Apis::Core::Hashable - - # Specifies if the replica is the failover target. If the field is set to true - # the replica will be designated as a failover replica. In case the master - # instance fails, the replica instance will be promoted as the new master - # instance. - # Only one replica can be specified as failover target, and the replica has to - # be in different zone with the master instance. - # Corresponds to the JSON property `failoverTarget` - # @return [Boolean] - attr_accessor :failover_target - alias_method :failover_target?, :failover_target - - # This is always sql#replicaConfiguration. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Read-replica configuration specific to MySQL databases. - # Corresponds to the JSON property `mysqlReplicaConfiguration` - # @return [Google::Apis::SqladminV1beta4::MySqlReplicaConfiguration] - attr_accessor :mysql_replica_configuration - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @failover_target = args[:failover_target] if args.key?(:failover_target) - @kind = args[:kind] if args.key?(:kind) - @mysql_replica_configuration = args[:mysql_replica_configuration] if args.key?(:mysql_replica_configuration) - end - end - - # Database instance restore from backup context. - class RestoreBackupContext - include Google::Apis::Core::Hashable - - # The ID of the backup run to restore from. - # Corresponds to the JSON property `backupRunId` - # @return [Fixnum] - attr_accessor :backup_run_id - - # The ID of the instance that the backup was taken from. - # Corresponds to the JSON property `instanceId` - # @return [String] - attr_accessor :instance_id - - # This is always sql#restoreBackupContext. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The full project ID of the source instance. - # Corresponds to the JSON property `project` - # @return [String] - attr_accessor :project - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @backup_run_id = args[:backup_run_id] if args.key?(:backup_run_id) - @instance_id = args[:instance_id] if args.key?(:instance_id) - @kind = args[:kind] if args.key?(:kind) - @project = args[:project] if args.key?(:project) - end - end - - # Instance rotate server CA context. - class RotateServerCaContext - include Google::Apis::Core::Hashable - - # This is always sql#rotateServerCaContext. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The fingerprint of the next version to be rotated to. If left unspecified, - # will be rotated to the most recently added server CA version. - # Corresponds to the JSON property `nextVersion` - # @return [String] - attr_accessor :next_version - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] if args.key?(:kind) - @next_version = args[:next_version] if args.key?(:next_version) - end - end - - # Database instance settings. - class Settings - include Google::Apis::Core::Hashable - - # The activation policy specifies when the instance is activated; it is - # applicable only when the instance state is RUNNABLE. Valid values: - # ALWAYS: The instance is on, and remains so even in the absence of connection - # requests. - # NEVER: The instance is off; it is not activated, even if a connection request - # arrives. - # ON_DEMAND: First Generation instances only. The instance responds to incoming - # requests, and turns itself off when not in use. Instances with PER_USE pricing - # turn off after 15 minutes of inactivity. Instances with PER_PACKAGE pricing - # turn off after 12 hours of inactivity. - # Corresponds to the JSON property `activationPolicy` - # @return [String] - attr_accessor :activation_policy - - # The App Engine app IDs that can access this instance. First Generation - # instances only. - # Corresponds to the JSON property `authorizedGaeApplications` - # @return [Array] - attr_accessor :authorized_gae_applications - - # Availability type (PostgreSQL instances only). Potential values: - # ZONAL: The instance serves data from only one zone. Outages in that zone - # affect data accessibility. - # REGIONAL: The instance can serve data from more than one zone in a region (it - # is highly available). - # For more information, see Overview of the High Availability Configuration. - # Corresponds to the JSON property `availabilityType` - # @return [String] - attr_accessor :availability_type - - # Database instance backup configuration. - # Corresponds to the JSON property `backupConfiguration` - # @return [Google::Apis::SqladminV1beta4::BackupConfiguration] - attr_accessor :backup_configuration - - # Configuration specific to read replica instances. Indicates whether database - # flags for crash-safe replication are enabled. This property is only applicable - # to First Generation instances. - # Corresponds to the JSON property `crashSafeReplicationEnabled` - # @return [Boolean] - attr_accessor :crash_safe_replication_enabled - alias_method :crash_safe_replication_enabled?, :crash_safe_replication_enabled - - # The size of data disk, in GB. The data disk size minimum is 10GB. Not used for - # First Generation instances. - # Corresponds to the JSON property `dataDiskSizeGb` - # @return [Fixnum] - attr_accessor :data_disk_size_gb - - # The type of data disk: PD_SSD (default) or PD_HDD. Not used for First - # Generation instances. - # Corresponds to the JSON property `dataDiskType` - # @return [String] - attr_accessor :data_disk_type - - # The database flags passed to the instance at startup. - # Corresponds to the JSON property `databaseFlags` - # @return [Array] - attr_accessor :database_flags - - # Configuration specific to read replica instances. Indicates whether - # replication is enabled or not. - # Corresponds to the JSON property `databaseReplicationEnabled` - # @return [Boolean] - attr_accessor :database_replication_enabled - alias_method :database_replication_enabled?, :database_replication_enabled - - # IP Management configuration. - # Corresponds to the JSON property `ipConfiguration` - # @return [Google::Apis::SqladminV1beta4::IpConfiguration] - attr_accessor :ip_configuration - - # This is always sql#settings. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Preferred location. This specifies where a Cloud SQL instance should - # preferably be located, either in a specific Compute Engine zone, or co-located - # with an App Engine application. Note that if the preferred location is not - # available, the instance will be located as close as possible within the region. - # Only one location may be specified. - # Corresponds to the JSON property `locationPreference` - # @return [Google::Apis::SqladminV1beta4::LocationPreference] - attr_accessor :location_preference - - # Maintenance window. This specifies when a v2 Cloud SQL instance should - # preferably be restarted for system maintenance purposes. - # Corresponds to the JSON property `maintenanceWindow` - # @return [Google::Apis::SqladminV1beta4::MaintenanceWindow] - attr_accessor :maintenance_window - - # The pricing plan for this instance. This can be either PER_USE or PACKAGE. - # Only PER_USE is supported for Second Generation instances. - # Corresponds to the JSON property `pricingPlan` - # @return [String] - attr_accessor :pricing_plan - - # The type of replication this instance uses. This can be either ASYNCHRONOUS or - # SYNCHRONOUS. This property is only applicable to First Generation instances. - # Corresponds to the JSON property `replicationType` - # @return [String] - attr_accessor :replication_type - - # The version of instance settings. This is a required field for update method - # to make sure concurrent updates are handled properly. During update, use the - # most recent settingsVersion value for this instance and do not try to update - # this value. - # Corresponds to the JSON property `settingsVersion` - # @return [Fixnum] - attr_accessor :settings_version - - # Configuration to increase storage size automatically. The default value is - # true. Not used for First Generation instances. - # Corresponds to the JSON property `storageAutoResize` - # @return [Boolean] - attr_accessor :storage_auto_resize - alias_method :storage_auto_resize?, :storage_auto_resize - - # The maximum size to which storage capacity can be automatically increased. The - # default value is 0, which specifies that there is no limit. Not used for First - # Generation instances. - # Corresponds to the JSON property `storageAutoResizeLimit` - # @return [Fixnum] - attr_accessor :storage_auto_resize_limit - - # The tier (or machine type) for this instance, for example db-n1-standard-1 ( - # MySQL instances) or db-custom-1-3840 (PostgreSQL instances). For MySQL - # instances, this property determines whether the instance is First or Second - # Generation. For more information, see Instance Settings. - # Corresponds to the JSON property `tier` - # @return [String] - attr_accessor :tier - - # User-provided labels, represented as a dictionary where each label is a single - # key value pair. - # Corresponds to the JSON property `userLabels` - # @return [Hash] - attr_accessor :user_labels - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @activation_policy = args[:activation_policy] if args.key?(:activation_policy) - @authorized_gae_applications = args[:authorized_gae_applications] if args.key?(:authorized_gae_applications) - @availability_type = args[:availability_type] if args.key?(:availability_type) - @backup_configuration = args[:backup_configuration] if args.key?(:backup_configuration) - @crash_safe_replication_enabled = args[:crash_safe_replication_enabled] if args.key?(:crash_safe_replication_enabled) - @data_disk_size_gb = args[:data_disk_size_gb] if args.key?(:data_disk_size_gb) - @data_disk_type = args[:data_disk_type] if args.key?(:data_disk_type) - @database_flags = args[:database_flags] if args.key?(:database_flags) - @database_replication_enabled = args[:database_replication_enabled] if args.key?(:database_replication_enabled) - @ip_configuration = args[:ip_configuration] if args.key?(:ip_configuration) - @kind = args[:kind] if args.key?(:kind) - @location_preference = args[:location_preference] if args.key?(:location_preference) - @maintenance_window = args[:maintenance_window] if args.key?(:maintenance_window) - @pricing_plan = args[:pricing_plan] if args.key?(:pricing_plan) - @replication_type = args[:replication_type] if args.key?(:replication_type) - @settings_version = args[:settings_version] if args.key?(:settings_version) - @storage_auto_resize = args[:storage_auto_resize] if args.key?(:storage_auto_resize) - @storage_auto_resize_limit = args[:storage_auto_resize_limit] if args.key?(:storage_auto_resize_limit) - @tier = args[:tier] if args.key?(:tier) - @user_labels = args[:user_labels] if args.key?(:user_labels) - end - end - - # SslCerts Resource - class SslCert - include Google::Apis::Core::Hashable - - # PEM representation. - # Corresponds to the JSON property `cert` - # @return [String] - attr_accessor :cert - - # Serial number, as extracted from the certificate. - # Corresponds to the JSON property `certSerialNumber` - # @return [String] - attr_accessor :cert_serial_number - - # User supplied name. Constrained to [a-zA-Z.-_ ]+. - # Corresponds to the JSON property `commonName` - # @return [String] - attr_accessor :common_name - - # The time when the certificate was created in RFC 3339 format, for example 2012- - # 11-15T16:19:00.094Z - # Corresponds to the JSON property `createTime` - # @return [DateTime] - attr_accessor :create_time - - # The time when the certificate expires in RFC 3339 format, for example 2012-11- - # 15T16:19:00.094Z. - # Corresponds to the JSON property `expirationTime` - # @return [DateTime] - attr_accessor :expiration_time - - # Name of the database instance. - # Corresponds to the JSON property `instance` - # @return [String] - attr_accessor :instance - - # This is always sql#sslCert. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The URI of this resource. - # Corresponds to the JSON property `selfLink` - # @return [String] - attr_accessor :self_link - - # Sha1 Fingerprint. - # Corresponds to the JSON property `sha1Fingerprint` - # @return [String] - attr_accessor :sha1_fingerprint - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @cert = args[:cert] if args.key?(:cert) - @cert_serial_number = args[:cert_serial_number] if args.key?(:cert_serial_number) - @common_name = args[:common_name] if args.key?(:common_name) - @create_time = args[:create_time] if args.key?(:create_time) - @expiration_time = args[:expiration_time] if args.key?(:expiration_time) - @instance = args[:instance] if args.key?(:instance) - @kind = args[:kind] if args.key?(:kind) - @self_link = args[:self_link] if args.key?(:self_link) - @sha1_fingerprint = args[:sha1_fingerprint] if args.key?(:sha1_fingerprint) - end - end - - # SslCertDetail. - class SslCertDetail - include Google::Apis::Core::Hashable - - # SslCerts Resource - # Corresponds to the JSON property `certInfo` - # @return [Google::Apis::SqladminV1beta4::SslCert] - attr_accessor :cert_info - - # The private key for the client cert, in pem format. Keep private in order to - # protect your security. - # Corresponds to the JSON property `certPrivateKey` - # @return [String] - attr_accessor :cert_private_key - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @cert_info = args[:cert_info] if args.key?(:cert_info) - @cert_private_key = args[:cert_private_key] if args.key?(:cert_private_key) - end - end - - # SslCerts create ephemeral certificate request. - class SslCertsCreateEphemeralRequest - include Google::Apis::Core::Hashable - - # PEM encoded public key to include in the signed certificate. - # Corresponds to the JSON property `public_key` - # @return [String] - attr_accessor :public_key - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @public_key = args[:public_key] if args.key?(:public_key) - end - end - - # SslCerts insert request. - class InsertSslCertsRequest - include Google::Apis::Core::Hashable - - # User supplied name. Must be a distinct name from the other certificates for - # this instance. - # Corresponds to the JSON property `commonName` - # @return [String] - attr_accessor :common_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @common_name = args[:common_name] if args.key?(:common_name) - end - end - - # SslCert insert response. - class InsertSslCertsResponse - include Google::Apis::Core::Hashable - - # SslCertDetail. - # Corresponds to the JSON property `clientCert` - # @return [Google::Apis::SqladminV1beta4::SslCertDetail] - attr_accessor :client_cert - - # This is always sql#sslCertsInsert. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # An Operation resource. For successful operations that return an Operation - # resource, only the fields relevant to the operation are populated in the - # resource. - # Corresponds to the JSON property `operation` - # @return [Google::Apis::SqladminV1beta4::Operation] - attr_accessor :operation - - # SslCerts Resource - # Corresponds to the JSON property `serverCaCert` - # @return [Google::Apis::SqladminV1beta4::SslCert] - attr_accessor :server_ca_cert - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @client_cert = args[:client_cert] if args.key?(:client_cert) - @kind = args[:kind] if args.key?(:kind) - @operation = args[:operation] if args.key?(:operation) - @server_ca_cert = args[:server_ca_cert] if args.key?(:server_ca_cert) - end - end - - # SslCerts list response. - class ListSslCertsResponse - include Google::Apis::Core::Hashable - - # List of client certificates for the instance. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # This is always sql#sslCertsList. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @items = args[:items] if args.key?(:items) - @kind = args[:kind] if args.key?(:kind) - end - end - - # A Google Cloud SQL service tier resource. - class Tier - include Google::Apis::Core::Hashable - - # The maximum disk size of this tier in bytes. - # Corresponds to the JSON property `DiskQuota` - # @return [Fixnum] - attr_accessor :disk_quota - - # The maximum RAM usage of this tier in bytes. - # Corresponds to the JSON property `RAM` - # @return [Fixnum] - attr_accessor :ram - - # This is always sql#tier. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The applicable regions for this tier. - # Corresponds to the JSON property `region` - # @return [Array] - attr_accessor :region - - # An identifier for the machine type, for example, db-n1-standard-1. For related - # information, see Pricing. - # 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) - @disk_quota = args[:disk_quota] if args.key?(:disk_quota) - @ram = args[:ram] if args.key?(:ram) - @kind = args[:kind] if args.key?(:kind) - @region = args[:region] if args.key?(:region) - @tier = args[:tier] if args.key?(:tier) - end - end - - # Tiers list response. - class ListTiersResponse - include Google::Apis::Core::Hashable - - # List of tiers. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # This is always sql#tiersList. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @items = args[:items] if args.key?(:items) - @kind = args[:kind] if args.key?(:kind) - end - end - - # Database Instance truncate log context. - class TruncateLogContext - include Google::Apis::Core::Hashable - - # This is always sql#truncateLogContext. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The type of log to truncate. Valid values are MYSQL_GENERAL_TABLE and - # MYSQL_SLOW_TABLE. - # Corresponds to the JSON property `logType` - # @return [String] - attr_accessor :log_type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] if args.key?(:kind) - @log_type = args[:log_type] if args.key?(:log_type) - end - end - - # A Cloud SQL user resource. - class User - include Google::Apis::Core::Hashable - - # This field is deprecated and will be removed from a future version of the API. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # The host name from which the user can connect. For insert operations, host - # defaults to an empty string. For update operations, host is specified as part - # of the request URL. The host name cannot be updated after insertion. - # Corresponds to the JSON property `host` - # @return [String] - attr_accessor :host - - # The name of the Cloud SQL instance. This does not include the project ID. Can - # be omitted for update since it is already specified on the URL. - # Corresponds to the JSON property `instance` - # @return [String] - attr_accessor :instance - - # This is always sql#user. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The name of the user in the Cloud SQL instance. Can be omitted for update - # since it is already specified in the URL. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The password for the user. - # Corresponds to the JSON property `password` - # @return [String] - attr_accessor :password - - # The project ID of the project containing the Cloud SQL database. The Google - # apps domain is prefixed if applicable. Can be omitted for update since it is - # already specified on the URL. - # Corresponds to the JSON property `project` - # @return [String] - attr_accessor :project - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @etag = args[:etag] if args.key?(:etag) - @host = args[:host] if args.key?(:host) - @instance = args[:instance] if args.key?(:instance) - @kind = args[:kind] if args.key?(:kind) - @name = args[:name] if args.key?(:name) - @password = args[:password] if args.key?(:password) - @project = args[:project] if args.key?(:project) - end - end - - # User list response. - class ListUsersResponse - include Google::Apis::Core::Hashable - - # List of user resources in the instance. - # Corresponds to the JSON property `items` - # @return [Array] - attr_accessor :items - - # This is always sql#usersList. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # An identifier that uniquely identifies the operation. You can use this - # identifier to retrieve the Operations resource that has information about the - # operation. - # 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) - @items = args[:items] if args.key?(:items) - @kind = args[:kind] if args.key?(:kind) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - end - end -end diff --git a/generated/google/apis/sqladmin_v1beta4/representations.rb b/generated/google/apis/sqladmin_v1beta4/representations.rb deleted file mode 100644 index 2ced5734d..000000000 --- a/generated/google/apis/sqladmin_v1beta4/representations.rb +++ /dev/null @@ -1,1110 +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 SqladminV1beta4 - - class AclEntry - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ApiWarning - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BackupConfiguration - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BackupRun - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListBackupRunsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BinLogCoordinates - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CloneContext - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Database - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DatabaseFlags - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DatabaseInstance - class Representation < Google::Apis::Core::JsonRepresentation; end - - class FailoverReplica - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListDatabasesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DemoteMasterConfiguration - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DemoteMasterContext - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DemoteMasterMySqlReplicaConfiguration - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DiskEncryptionConfiguration - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DiskEncryptionStatus - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ExportContext - class Representation < Google::Apis::Core::JsonRepresentation; end - - class CsvExportOptions - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SqlExportOptions - class Representation < Google::Apis::Core::JsonRepresentation; end - - class MysqlExportOptions - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - include Google::Apis::Core::JsonObjectSupport - end - - include Google::Apis::Core::JsonObjectSupport - end - - class FailoverContext - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Flag - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListFlagsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ImportContext - class Representation < Google::Apis::Core::JsonRepresentation; end - - class BakImportOptions - class Representation < Google::Apis::Core::JsonRepresentation; end - - class EncryptionOptions - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - include Google::Apis::Core::JsonObjectSupport - end - - class CsvImportOptions - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - include Google::Apis::Core::JsonObjectSupport - end - - class CloneInstancesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class InstancesDemoteMasterRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ExportInstancesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class InstancesFailoverRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ImportInstancesRequest - 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 InstancesListServerCasResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class RestoreInstancesBackupRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class InstancesRotateServerCaRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class InstancesTruncateLogRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class IpConfiguration - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class IpMapping - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class LocationPreference - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class MaintenanceWindow - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class MySqlReplicaConfiguration - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class OnPremisesConfiguration - 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 OperationError - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class OperationErrors - 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 ReplicaConfiguration - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class RestoreBackupContext - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class RotateServerCaContext - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Settings - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SslCert - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SslCertDetail - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SslCertsCreateEphemeralRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class InsertSslCertsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class InsertSslCertsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListSslCertsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Tier - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListTiersResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class TruncateLogContext - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class User - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListUsersResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AclEntry - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :expiration_time, as: 'expirationTime', type: DateTime - - property :kind, as: 'kind' - property :name, as: 'name' - property :value, as: 'value' - end - end - - class ApiWarning - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :code, as: 'code' - property :message, as: 'message' - end - end - - class BackupConfiguration - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :binary_log_enabled, as: 'binaryLogEnabled' - property :enabled, as: 'enabled' - property :kind, as: 'kind' - property :location, as: 'location' - property :replication_log_archiving_enabled, as: 'replicationLogArchivingEnabled' - property :start_time, as: 'startTime' - end - end - - class BackupRun - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :description, as: 'description' - property :disk_encryption_configuration, as: 'diskEncryptionConfiguration', class: Google::Apis::SqladminV1beta4::DiskEncryptionConfiguration, decorator: Google::Apis::SqladminV1beta4::DiskEncryptionConfiguration::Representation - - property :disk_encryption_status, as: 'diskEncryptionStatus', class: Google::Apis::SqladminV1beta4::DiskEncryptionStatus, decorator: Google::Apis::SqladminV1beta4::DiskEncryptionStatus::Representation - - property :end_time, as: 'endTime', type: DateTime - - property :enqueued_time, as: 'enqueuedTime', type: DateTime - - property :error, as: 'error', class: Google::Apis::SqladminV1beta4::OperationError, decorator: Google::Apis::SqladminV1beta4::OperationError::Representation - - property :id, :numeric_string => true, as: 'id' - property :instance, as: 'instance' - property :kind, as: 'kind' - property :location, as: 'location' - property :self_link, as: 'selfLink' - property :start_time, as: 'startTime', type: DateTime - - property :status, as: 'status' - property :type, as: 'type' - property :window_start_time, as: 'windowStartTime', type: DateTime - - end - end - - class ListBackupRunsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::SqladminV1beta4::BackupRun, decorator: Google::Apis::SqladminV1beta4::BackupRun::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - - class BinLogCoordinates - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :bin_log_file_name, as: 'binLogFileName' - property :bin_log_position, :numeric_string => true, as: 'binLogPosition' - property :kind, as: 'kind' - end - end - - class CloneContext - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :bin_log_coordinates, as: 'binLogCoordinates', class: Google::Apis::SqladminV1beta4::BinLogCoordinates, decorator: Google::Apis::SqladminV1beta4::BinLogCoordinates::Representation - - property :destination_instance_name, as: 'destinationInstanceName' - property :kind, as: 'kind' - property :pitr_timestamp_ms, :numeric_string => true, as: 'pitrTimestampMs' - end - end - - class Database - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :charset, as: 'charset' - property :collation, as: 'collation' - property :etag, as: 'etag' - property :instance, as: 'instance' - property :kind, as: 'kind' - property :name, as: 'name' - property :project, as: 'project' - property :self_link, as: 'selfLink' - end - end - - class DatabaseFlags - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - property :value, as: 'value' - end - end - - class DatabaseInstance - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :backend_type, as: 'backendType' - property :connection_name, as: 'connectionName' - property :current_disk_size, :numeric_string => true, as: 'currentDiskSize' - property :database_version, as: 'databaseVersion' - property :disk_encryption_configuration, as: 'diskEncryptionConfiguration', class: Google::Apis::SqladminV1beta4::DiskEncryptionConfiguration, decorator: Google::Apis::SqladminV1beta4::DiskEncryptionConfiguration::Representation - - property :disk_encryption_status, as: 'diskEncryptionStatus', class: Google::Apis::SqladminV1beta4::DiskEncryptionStatus, decorator: Google::Apis::SqladminV1beta4::DiskEncryptionStatus::Representation - - property :etag, as: 'etag' - property :failover_replica, as: 'failoverReplica', class: Google::Apis::SqladminV1beta4::DatabaseInstance::FailoverReplica, decorator: Google::Apis::SqladminV1beta4::DatabaseInstance::FailoverReplica::Representation - - property :gce_zone, as: 'gceZone' - property :instance_type, as: 'instanceType' - collection :ip_addresses, as: 'ipAddresses', class: Google::Apis::SqladminV1beta4::IpMapping, decorator: Google::Apis::SqladminV1beta4::IpMapping::Representation - - property :ipv6_address, as: 'ipv6Address' - property :kind, as: 'kind' - property :master_instance_name, as: 'masterInstanceName' - property :max_disk_size, :numeric_string => true, as: 'maxDiskSize' - property :name, as: 'name' - property :on_premises_configuration, as: 'onPremisesConfiguration', class: Google::Apis::SqladminV1beta4::OnPremisesConfiguration, decorator: Google::Apis::SqladminV1beta4::OnPremisesConfiguration::Representation - - property :project, as: 'project' - property :region, as: 'region' - property :replica_configuration, as: 'replicaConfiguration', class: Google::Apis::SqladminV1beta4::ReplicaConfiguration, decorator: Google::Apis::SqladminV1beta4::ReplicaConfiguration::Representation - - collection :replica_names, as: 'replicaNames' - property :root_password, as: 'rootPassword' - property :self_link, as: 'selfLink' - property :server_ca_cert, as: 'serverCaCert', class: Google::Apis::SqladminV1beta4::SslCert, decorator: Google::Apis::SqladminV1beta4::SslCert::Representation - - property :service_account_email_address, as: 'serviceAccountEmailAddress' - property :settings, as: 'settings', class: Google::Apis::SqladminV1beta4::Settings, decorator: Google::Apis::SqladminV1beta4::Settings::Representation - - property :state, as: 'state' - collection :suspension_reason, as: 'suspensionReason' - end - - class FailoverReplica - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :available, as: 'available' - property :name, as: 'name' - end - end - end - - class ListDatabasesResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::SqladminV1beta4::Database, decorator: Google::Apis::SqladminV1beta4::Database::Representation - - property :kind, as: 'kind' - end - end - - class DemoteMasterConfiguration - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :mysql_replica_configuration, as: 'mysqlReplicaConfiguration', class: Google::Apis::SqladminV1beta4::DemoteMasterMySqlReplicaConfiguration, decorator: Google::Apis::SqladminV1beta4::DemoteMasterMySqlReplicaConfiguration::Representation - - end - end - - class DemoteMasterContext - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :master_instance_name, as: 'masterInstanceName' - property :replica_configuration, as: 'replicaConfiguration', class: Google::Apis::SqladminV1beta4::DemoteMasterConfiguration, decorator: Google::Apis::SqladminV1beta4::DemoteMasterConfiguration::Representation - - property :verify_gtid_consistency, as: 'verifyGtidConsistency' - end - end - - class DemoteMasterMySqlReplicaConfiguration - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :ca_certificate, as: 'caCertificate' - property :client_certificate, as: 'clientCertificate' - property :client_key, as: 'clientKey' - property :kind, as: 'kind' - property :password, as: 'password' - property :username, as: 'username' - end - end - - class DiskEncryptionConfiguration - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :kms_key_name, as: 'kmsKeyName' - end - end - - class DiskEncryptionStatus - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :kms_key_version_name, as: 'kmsKeyVersionName' - end - end - - class ExportContext - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :csv_export_options, as: 'csvExportOptions', class: Google::Apis::SqladminV1beta4::ExportContext::CsvExportOptions, decorator: Google::Apis::SqladminV1beta4::ExportContext::CsvExportOptions::Representation - - collection :databases, as: 'databases' - property :file_type, as: 'fileType' - property :kind, as: 'kind' - property :sql_export_options, as: 'sqlExportOptions', class: Google::Apis::SqladminV1beta4::ExportContext::SqlExportOptions, decorator: Google::Apis::SqladminV1beta4::ExportContext::SqlExportOptions::Representation - - property :uri, as: 'uri' - end - - class CsvExportOptions - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :select_query, as: 'selectQuery' - end - end - - class SqlExportOptions - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :mysql_export_options, as: 'mysqlExportOptions', class: Google::Apis::SqladminV1beta4::ExportContext::SqlExportOptions::MysqlExportOptions, decorator: Google::Apis::SqladminV1beta4::ExportContext::SqlExportOptions::MysqlExportOptions::Representation - - property :schema_only, as: 'schemaOnly' - collection :tables, as: 'tables' - end - - class MysqlExportOptions - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :master_data, as: 'masterData' - end - end - end - end - - class FailoverContext - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :settings_version, :numeric_string => true, as: 'settingsVersion' - end - end - - class Flag - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :allowed_string_values, as: 'allowedStringValues' - collection :applies_to, as: 'appliesTo' - property :in_beta, as: 'inBeta' - property :kind, as: 'kind' - property :max_value, :numeric_string => true, as: 'maxValue' - property :min_value, :numeric_string => true, as: 'minValue' - property :name, as: 'name' - property :requires_restart, as: 'requiresRestart' - property :type, as: 'type' - end - end - - class ListFlagsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::SqladminV1beta4::Flag, decorator: Google::Apis::SqladminV1beta4::Flag::Representation - - property :kind, as: 'kind' - end - end - - class ImportContext - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :bak_import_options, as: 'bakImportOptions', class: Google::Apis::SqladminV1beta4::ImportContext::BakImportOptions, decorator: Google::Apis::SqladminV1beta4::ImportContext::BakImportOptions::Representation - - property :csv_import_options, as: 'csvImportOptions', class: Google::Apis::SqladminV1beta4::ImportContext::CsvImportOptions, decorator: Google::Apis::SqladminV1beta4::ImportContext::CsvImportOptions::Representation - - property :database, as: 'database' - property :file_type, as: 'fileType' - property :import_user, as: 'importUser' - property :kind, as: 'kind' - property :uri, as: 'uri' - end - - class BakImportOptions - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :encryption_options, as: 'encryptionOptions', class: Google::Apis::SqladminV1beta4::ImportContext::BakImportOptions::EncryptionOptions, decorator: Google::Apis::SqladminV1beta4::ImportContext::BakImportOptions::EncryptionOptions::Representation - - end - - class EncryptionOptions - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :cert_path, as: 'certPath' - property :pvk_password, as: 'pvkPassword' - property :pvk_path, as: 'pvkPath' - end - end - end - - class CsvImportOptions - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :columns, as: 'columns' - property :table, as: 'table' - end - end - end - - class CloneInstancesRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :clone_context, as: 'cloneContext', class: Google::Apis::SqladminV1beta4::CloneContext, decorator: Google::Apis::SqladminV1beta4::CloneContext::Representation - - end - end - - class InstancesDemoteMasterRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :demote_master_context, as: 'demoteMasterContext', class: Google::Apis::SqladminV1beta4::DemoteMasterContext, decorator: Google::Apis::SqladminV1beta4::DemoteMasterContext::Representation - - end - end - - class ExportInstancesRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :export_context, as: 'exportContext', class: Google::Apis::SqladminV1beta4::ExportContext, decorator: Google::Apis::SqladminV1beta4::ExportContext::Representation - - end - end - - class InstancesFailoverRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :failover_context, as: 'failoverContext', class: Google::Apis::SqladminV1beta4::FailoverContext, decorator: Google::Apis::SqladminV1beta4::FailoverContext::Representation - - end - end - - class ImportInstancesRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :import_context, as: 'importContext', class: Google::Apis::SqladminV1beta4::ImportContext, decorator: Google::Apis::SqladminV1beta4::ImportContext::Representation - - end - end - - class ListInstancesResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::SqladminV1beta4::DatabaseInstance, decorator: Google::Apis::SqladminV1beta4::DatabaseInstance::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - collection :warnings, as: 'warnings', class: Google::Apis::SqladminV1beta4::ApiWarning, decorator: Google::Apis::SqladminV1beta4::ApiWarning::Representation - - end - end - - class InstancesListServerCasResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :active_version, as: 'activeVersion' - collection :certs, as: 'certs', class: Google::Apis::SqladminV1beta4::SslCert, decorator: Google::Apis::SqladminV1beta4::SslCert::Representation - - property :kind, as: 'kind' - end - end - - class RestoreInstancesBackupRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :restore_backup_context, as: 'restoreBackupContext', class: Google::Apis::SqladminV1beta4::RestoreBackupContext, decorator: Google::Apis::SqladminV1beta4::RestoreBackupContext::Representation - - end - end - - class InstancesRotateServerCaRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :rotate_server_ca_context, as: 'rotateServerCaContext', class: Google::Apis::SqladminV1beta4::RotateServerCaContext, decorator: Google::Apis::SqladminV1beta4::RotateServerCaContext::Representation - - end - end - - class InstancesTruncateLogRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :truncate_log_context, as: 'truncateLogContext', class: Google::Apis::SqladminV1beta4::TruncateLogContext, decorator: Google::Apis::SqladminV1beta4::TruncateLogContext::Representation - - end - end - - class IpConfiguration - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :authorized_networks, as: 'authorizedNetworks', class: Google::Apis::SqladminV1beta4::AclEntry, decorator: Google::Apis::SqladminV1beta4::AclEntry::Representation - - property :ipv4_enabled, as: 'ipv4Enabled' - property :private_network, as: 'privateNetwork' - property :require_ssl, as: 'requireSsl' - end - end - - class IpMapping - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :ip_address, as: 'ipAddress' - property :time_to_retire, as: 'timeToRetire', type: DateTime - - property :type, as: 'type' - end - end - - class LocationPreference - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :follow_gae_application, as: 'followGaeApplication' - property :kind, as: 'kind' - property :zone, as: 'zone' - end - end - - class MaintenanceWindow - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :day, as: 'day' - property :hour, as: 'hour' - property :kind, as: 'kind' - property :update_track, as: 'updateTrack' - end - end - - class MySqlReplicaConfiguration - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :ca_certificate, as: 'caCertificate' - property :client_certificate, as: 'clientCertificate' - property :client_key, as: 'clientKey' - property :connect_retry_interval, as: 'connectRetryInterval' - property :dump_file_path, as: 'dumpFilePath' - property :kind, as: 'kind' - property :master_heartbeat_period, :numeric_string => true, as: 'masterHeartbeatPeriod' - property :password, as: 'password' - property :ssl_cipher, as: 'sslCipher' - property :username, as: 'username' - property :verify_server_certificate, as: 'verifyServerCertificate' - end - end - - class OnPremisesConfiguration - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :host_port, as: 'hostPort' - property :kind, as: 'kind' - end - end - - class Operation - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :end_time, as: 'endTime', type: DateTime - - property :error, as: 'error', class: Google::Apis::SqladminV1beta4::OperationErrors, decorator: Google::Apis::SqladminV1beta4::OperationErrors::Representation - - property :export_context, as: 'exportContext', class: Google::Apis::SqladminV1beta4::ExportContext, decorator: Google::Apis::SqladminV1beta4::ExportContext::Representation - - property :import_context, as: 'importContext', class: Google::Apis::SqladminV1beta4::ImportContext, decorator: Google::Apis::SqladminV1beta4::ImportContext::Representation - - property :insert_time, as: 'insertTime', type: DateTime - - property :kind, as: 'kind' - property :name, as: 'name' - property :operation_type, as: 'operationType' - property :self_link, as: 'selfLink' - property :start_time, as: 'startTime', type: DateTime - - property :status, as: 'status' - property :target_id, as: 'targetId' - property :target_link, as: 'targetLink' - property :target_project, as: 'targetProject' - property :user, as: 'user' - end - end - - class OperationError - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :code, as: 'code' - property :kind, as: 'kind' - property :message, as: 'message' - end - end - - class OperationErrors - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :errors, as: 'errors', class: Google::Apis::SqladminV1beta4::OperationError, decorator: Google::Apis::SqladminV1beta4::OperationError::Representation - - property :kind, as: 'kind' - end - end - - class ListOperationsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::SqladminV1beta4::Operation, decorator: Google::Apis::SqladminV1beta4::Operation::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - - class ReplicaConfiguration - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :failover_target, as: 'failoverTarget' - property :kind, as: 'kind' - property :mysql_replica_configuration, as: 'mysqlReplicaConfiguration', class: Google::Apis::SqladminV1beta4::MySqlReplicaConfiguration, decorator: Google::Apis::SqladminV1beta4::MySqlReplicaConfiguration::Representation - - end - end - - class RestoreBackupContext - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :backup_run_id, :numeric_string => true, as: 'backupRunId' - property :instance_id, as: 'instanceId' - property :kind, as: 'kind' - property :project, as: 'project' - end - end - - class RotateServerCaContext - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :next_version, as: 'nextVersion' - end - end - - class Settings - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :activation_policy, as: 'activationPolicy' - collection :authorized_gae_applications, as: 'authorizedGaeApplications' - property :availability_type, as: 'availabilityType' - property :backup_configuration, as: 'backupConfiguration', class: Google::Apis::SqladminV1beta4::BackupConfiguration, decorator: Google::Apis::SqladminV1beta4::BackupConfiguration::Representation - - property :crash_safe_replication_enabled, as: 'crashSafeReplicationEnabled' - property :data_disk_size_gb, :numeric_string => true, as: 'dataDiskSizeGb' - property :data_disk_type, as: 'dataDiskType' - collection :database_flags, as: 'databaseFlags', class: Google::Apis::SqladminV1beta4::DatabaseFlags, decorator: Google::Apis::SqladminV1beta4::DatabaseFlags::Representation - - property :database_replication_enabled, as: 'databaseReplicationEnabled' - property :ip_configuration, as: 'ipConfiguration', class: Google::Apis::SqladminV1beta4::IpConfiguration, decorator: Google::Apis::SqladminV1beta4::IpConfiguration::Representation - - property :kind, as: 'kind' - property :location_preference, as: 'locationPreference', class: Google::Apis::SqladminV1beta4::LocationPreference, decorator: Google::Apis::SqladminV1beta4::LocationPreference::Representation - - property :maintenance_window, as: 'maintenanceWindow', class: Google::Apis::SqladminV1beta4::MaintenanceWindow, decorator: Google::Apis::SqladminV1beta4::MaintenanceWindow::Representation - - property :pricing_plan, as: 'pricingPlan' - property :replication_type, as: 'replicationType' - property :settings_version, :numeric_string => true, as: 'settingsVersion' - property :storage_auto_resize, as: 'storageAutoResize' - property :storage_auto_resize_limit, :numeric_string => true, as: 'storageAutoResizeLimit' - property :tier, as: 'tier' - hash :user_labels, as: 'userLabels' - end - end - - class SslCert - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :cert, as: 'cert' - property :cert_serial_number, as: 'certSerialNumber' - property :common_name, as: 'commonName' - property :create_time, as: 'createTime', type: DateTime - - property :expiration_time, as: 'expirationTime', type: DateTime - - property :instance, as: 'instance' - property :kind, as: 'kind' - property :self_link, as: 'selfLink' - property :sha1_fingerprint, as: 'sha1Fingerprint' - end - end - - class SslCertDetail - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :cert_info, as: 'certInfo', class: Google::Apis::SqladminV1beta4::SslCert, decorator: Google::Apis::SqladminV1beta4::SslCert::Representation - - property :cert_private_key, as: 'certPrivateKey' - end - end - - class SslCertsCreateEphemeralRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :public_key, as: 'public_key' - end - end - - class InsertSslCertsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :common_name, as: 'commonName' - end - end - - class InsertSslCertsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :client_cert, as: 'clientCert', class: Google::Apis::SqladminV1beta4::SslCertDetail, decorator: Google::Apis::SqladminV1beta4::SslCertDetail::Representation - - property :kind, as: 'kind' - property :operation, as: 'operation', class: Google::Apis::SqladminV1beta4::Operation, decorator: Google::Apis::SqladminV1beta4::Operation::Representation - - property :server_ca_cert, as: 'serverCaCert', class: Google::Apis::SqladminV1beta4::SslCert, decorator: Google::Apis::SqladminV1beta4::SslCert::Representation - - end - end - - class ListSslCertsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::SqladminV1beta4::SslCert, decorator: Google::Apis::SqladminV1beta4::SslCert::Representation - - property :kind, as: 'kind' - end - end - - class Tier - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :disk_quota, :numeric_string => true, as: 'DiskQuota' - property :ram, :numeric_string => true, as: 'RAM' - property :kind, as: 'kind' - collection :region, as: 'region' - property :tier, as: 'tier' - end - end - - class ListTiersResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::SqladminV1beta4::Tier, decorator: Google::Apis::SqladminV1beta4::Tier::Representation - - property :kind, as: 'kind' - end - end - - class TruncateLogContext - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :log_type, as: 'logType' - end - end - - class User - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :etag, as: 'etag' - property :host, as: 'host' - property :instance, as: 'instance' - property :kind, as: 'kind' - property :name, as: 'name' - property :password, as: 'password' - property :project, as: 'project' - end - end - - class ListUsersResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :items, as: 'items', class: Google::Apis::SqladminV1beta4::User, decorator: Google::Apis::SqladminV1beta4::User::Representation - - property :kind, as: 'kind' - property :next_page_token, as: 'nextPageToken' - end - end - end - end -end diff --git a/generated/google/apis/sqladmin_v1beta4/service.rb b/generated/google/apis/sqladmin_v1beta4/service.rb deleted file mode 100644 index 3f04bce96..000000000 --- a/generated/google/apis/sqladmin_v1beta4/service.rb +++ /dev/null @@ -1,1793 +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 SqladminV1beta4 - # Cloud SQL Admin API - # - # Creates and manages Cloud SQL instances, which provide fully managed MySQL or - # PostgreSQL databases. - # - # @example - # require 'google/apis/sqladmin_v1beta4' - # - # Sqladmin = Google::Apis::SqladminV1beta4 # Alias the module - # service = Sqladmin::SQLAdminService.new - # - # @see https://cloud.google.com/sql/docs/reference/latest - class SQLAdminService < Google::Apis::Core::BaseService - # @return [String] - # API key. Your API key identifies your project and provides you with API access, - # quota, and reports. Required unless you provide an OAuth 2.0 token. - attr_accessor :key - - # @return [String] - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - attr_accessor :quota_user - - # @return [String] - # Deprecated. Please use quotaUser instead. - attr_accessor :user_ip - - def initialize - super('https://www.googleapis.com/', 'sql/v1beta4/') - @batch_path = 'batch/sqladmin/v1beta4' - end - - # Deletes the backup taken by a backup run. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] instance - # Cloud SQL instance ID. This does not include the project ID. - # @param [Fixnum] id - # The ID of the Backup Run to delete. To find a Backup Run ID, use the list - # method. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::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_backup_run(project, instance, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:delete, 'projects/{project}/instances/{instance}/backupRuns/{id}', options) - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves a resource containing information about a backup run. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] instance - # Cloud SQL instance ID. This does not include the project ID. - # @param [Fixnum] id - # The ID of this Backup Run. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SqladminV1beta4::BackupRun] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::BackupRun] - # - # @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_backup_run(project, instance, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:get, 'projects/{project}/instances/{instance}/backupRuns/{id}', options) - command.response_representation = Google::Apis::SqladminV1beta4::BackupRun::Representation - command.response_class = Google::Apis::SqladminV1beta4::BackupRun - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Creates a new backup run on demand. This method is applicable only to Second - # Generation instances. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] instance - # Cloud SQL instance ID. This does not include the project ID. - # @param [Google::Apis::SqladminV1beta4::BackupRun] backup_run_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::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 insert_backup_run(project, instance, backup_run_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:post, 'projects/{project}/instances/{instance}/backupRuns', options) - command.request_representation = Google::Apis::SqladminV1beta4::BackupRun::Representation - command.request_object = backup_run_object - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Lists all backup runs associated with a given instance and configuration in - # the reverse chronological order of the backup initiation time. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] instance - # Cloud SQL instance ID. This does not include the project ID. - # @param [Fixnum] max_results - # Maximum number of backup runs per response. - # @param [String] page_token - # A previously-returned page token representing part of the larger set of - # results to view. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SqladminV1beta4::ListBackupRunsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::ListBackupRunsResponse] - # - # @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_backup_runs(project, instance, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:get, 'projects/{project}/instances/{instance}/backupRuns', options) - command.response_representation = Google::Apis::SqladminV1beta4::ListBackupRunsResponse::Representation - command.response_class = Google::Apis::SqladminV1beta4::ListBackupRunsResponse - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['maxResults'] = max_results unless max_results.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? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Deletes a database from a Cloud SQL instance. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] instance - # Database instance ID. This does not include the project ID. - # @param [String] database - # Name of the database to be deleted in the instance. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::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_database(project, instance, database, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:delete, 'projects/{project}/instances/{instance}/databases/{database}', options) - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.params['database'] = database unless database.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves a resource containing information about a database inside a Cloud - # SQL instance. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] instance - # Database instance ID. This does not include the project ID. - # @param [String] database - # Name of the database in the instance. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SqladminV1beta4::Database] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::Database] - # - # @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_database(project, instance, database, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:get, 'projects/{project}/instances/{instance}/databases/{database}', options) - command.response_representation = Google::Apis::SqladminV1beta4::Database::Representation - command.response_class = Google::Apis::SqladminV1beta4::Database - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.params['database'] = database unless database.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Inserts a resource containing information about a database inside a Cloud SQL - # instance. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] instance - # Database instance ID. This does not include the project ID. - # @param [Google::Apis::SqladminV1beta4::Database] database_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::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 insert_database(project, instance, database_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:post, 'projects/{project}/instances/{instance}/databases', options) - command.request_representation = Google::Apis::SqladminV1beta4::Database::Representation - command.request_object = database_object - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Lists databases in the specified Cloud SQL instance. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] instance - # Cloud SQL instance ID. This does not include the project ID. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SqladminV1beta4::ListDatabasesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::ListDatabasesResponse] - # - # @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_databases(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:get, 'projects/{project}/instances/{instance}/databases', options) - command.response_representation = Google::Apis::SqladminV1beta4::ListDatabasesResponse::Representation - command.response_class = Google::Apis::SqladminV1beta4::ListDatabasesResponse - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates a resource containing information about a database inside a Cloud SQL - # instance. This method supports patch semantics. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] instance - # Database instance ID. This does not include the project ID. - # @param [String] database - # Name of the database to be updated in the instance. - # @param [Google::Apis::SqladminV1beta4::Database] database_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::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_database(project, instance, database, database_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:patch, 'projects/{project}/instances/{instance}/databases/{database}', options) - command.request_representation = Google::Apis::SqladminV1beta4::Database::Representation - command.request_object = database_object - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.params['database'] = database unless database.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates a resource containing information about a database inside a Cloud SQL - # instance. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] instance - # Database instance ID. This does not include the project ID. - # @param [String] database - # Name of the database to be updated in the instance. - # @param [Google::Apis::SqladminV1beta4::Database] database_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::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 update_database(project, instance, database, database_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:put, 'projects/{project}/instances/{instance}/databases/{database}', options) - command.request_representation = Google::Apis::SqladminV1beta4::Database::Representation - command.request_object = database_object - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.params['database'] = database unless database.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # List all available database flags for Cloud SQL instances. - # @param [String] database_version - # Database type and version you want to retrieve flags for. By default, this - # method returns flags for all database types and versions. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SqladminV1beta4::ListFlagsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::ListFlagsResponse] - # - # @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_flags(database_version: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:get, 'flags', options) - command.response_representation = Google::Apis::SqladminV1beta4::ListFlagsResponse::Representation - command.response_class = Google::Apis::SqladminV1beta4::ListFlagsResponse - command.query['databaseVersion'] = database_version unless database_version.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Add a new trusted Certificate Authority (CA) version for the specified - # instance. Required to prepare for a certificate rotation. If a CA version was - # previously added but never used in a certificate rotation, this operation - # replaces that version. There cannot be more than one CA version waiting to be - # rotated in. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] instance - # Cloud SQL instance ID. This does not include the project ID. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::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 add_instance_server_ca(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:post, 'projects/{project}/instances/{instance}/addServerCa', options) - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Creates a Cloud SQL instance as a clone of the source instance. - # @param [String] project - # Project ID of the source as well as the clone Cloud SQL instance. - # @param [String] instance - # The ID of the Cloud SQL instance to be cloned (source). This does not include - # the project ID. - # @param [Google::Apis::SqladminV1beta4::CloneInstancesRequest] clone_instances_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::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 clone_instance(project, instance, clone_instances_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:post, 'projects/{project}/instances/{instance}/clone', options) - command.request_representation = Google::Apis::SqladminV1beta4::CloneInstancesRequest::Representation - command.request_object = clone_instances_request_object - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Deletes a Cloud SQL instance. - # @param [String] project - # Project ID of the project that contains the instance to be deleted. - # @param [String] instance - # Cloud SQL instance ID. This does not include the project ID. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::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_instance(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:delete, 'projects/{project}/instances/{instance}', options) - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Demotes the stand-alone instance to be a Cloud SQL read replica for an - # external database server. - # @param [String] project - # ID of the project that contains the instance. - # @param [String] instance - # Cloud SQL instance name. - # @param [Google::Apis::SqladminV1beta4::InstancesDemoteMasterRequest] instances_demote_master_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::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 demote_instance_master(project, instance, instances_demote_master_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:post, 'projects/{project}/instances/{instance}/demoteMaster', options) - command.request_representation = Google::Apis::SqladminV1beta4::InstancesDemoteMasterRequest::Representation - command.request_object = instances_demote_master_request_object - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL dump - # or CSV file. - # @param [String] project - # Project ID of the project that contains the instance to be exported. - # @param [String] instance - # Cloud SQL instance ID. This does not include the project ID. - # @param [Google::Apis::SqladminV1beta4::ExportInstancesRequest] export_instances_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::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 export_instance(project, instance, export_instances_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:post, 'projects/{project}/instances/{instance}/export', options) - command.request_representation = Google::Apis::SqladminV1beta4::ExportInstancesRequest::Representation - command.request_object = export_instances_request_object - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Failover the instance to its failover replica instance. - # @param [String] project - # ID of the project that contains the read replica. - # @param [String] instance - # Cloud SQL instance ID. This does not include the project ID. - # @param [Google::Apis::SqladminV1beta4::InstancesFailoverRequest] instances_failover_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::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 failover_instance(project, instance, instances_failover_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:post, 'projects/{project}/instances/{instance}/failover', options) - command.request_representation = Google::Apis::SqladminV1beta4::InstancesFailoverRequest::Representation - command.request_object = instances_failover_request_object - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves a resource containing information about a Cloud SQL instance. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] instance - # Database instance ID. This does not include the project ID. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SqladminV1beta4::DatabaseInstance] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::DatabaseInstance] - # - # @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_instance(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:get, 'projects/{project}/instances/{instance}', options) - command.response_representation = Google::Apis::SqladminV1beta4::DatabaseInstance::Representation - command.response_class = Google::Apis::SqladminV1beta4::DatabaseInstance - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Imports data into a Cloud SQL instance from a SQL dump or CSV file in Cloud - # Storage. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] instance - # Cloud SQL instance ID. This does not include the project ID. - # @param [Google::Apis::SqladminV1beta4::ImportInstancesRequest] import_instances_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::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 import_instance(project, instance, import_instances_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:post, 'projects/{project}/instances/{instance}/import', options) - command.request_representation = Google::Apis::SqladminV1beta4::ImportInstancesRequest::Representation - command.request_object = import_instances_request_object - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Creates a new Cloud SQL instance. - # @param [String] project - # Project ID of the project to which the newly created Cloud SQL instances - # should belong. - # @param [Google::Apis::SqladminV1beta4::DatabaseInstance] database_instance_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::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 insert_instance(project, database_instance_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:post, 'projects/{project}/instances', options) - command.request_representation = Google::Apis::SqladminV1beta4::DatabaseInstance::Representation - command.request_object = database_instance_object - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Lists instances under a given project in the alphabetical order of the - # instance name. - # @param [String] project - # Project ID of the project for which to list Cloud SQL instances. - # @param [String] filter - # An expression for filtering the results of the request, such as by name or - # label. - # @param [Fixnum] max_results - # The maximum number of results to return per response. - # @param [String] page_token - # A previously-returned page token representing part of the larger set of - # results to view. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SqladminV1beta4::ListInstancesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::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_instances(project, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:get, 'projects/{project}/instances', options) - command.response_representation = Google::Apis::SqladminV1beta4::ListInstancesResponse::Representation - command.response_class = Google::Apis::SqladminV1beta4::ListInstancesResponse - command.params['project'] = project unless project.nil? - command.query['filter'] = filter unless filter.nil? - command.query['maxResults'] = max_results unless max_results.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? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Lists all of the trusted Certificate Authorities (CAs) for the specified - # instance. There can be up to three CAs listed: the CA that was used to sign - # the certificate that is currently in use, a CA that has been added but not yet - # used to sign a certificate, and a CA used to sign a certificate that has - # previously rotated out. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] instance - # Cloud SQL instance ID. This does not include the project ID. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SqladminV1beta4::InstancesListServerCasResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::InstancesListServerCasResponse] - # - # @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_instance_server_cas(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:get, 'projects/{project}/instances/{instance}/listServerCas', options) - command.response_representation = Google::Apis::SqladminV1beta4::InstancesListServerCasResponse::Representation - command.response_class = Google::Apis::SqladminV1beta4::InstancesListServerCasResponse - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates settings of a Cloud SQL instance. Caution: This is not a partial - # update, so you must include values for all the settings that you want to - # retain. For partial updates, use patch.. This method supports patch semantics. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] instance - # Cloud SQL instance ID. This does not include the project ID. - # @param [Google::Apis::SqladminV1beta4::DatabaseInstance] database_instance_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::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_instance(project, instance, database_instance_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:patch, 'projects/{project}/instances/{instance}', options) - command.request_representation = Google::Apis::SqladminV1beta4::DatabaseInstance::Representation - command.request_object = database_instance_object - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Promotes the read replica instance to be a stand-alone Cloud SQL instance. - # @param [String] project - # ID of the project that contains the read replica. - # @param [String] instance - # Cloud SQL read replica instance name. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::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 promote_instance_replica(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:post, 'projects/{project}/instances/{instance}/promoteReplica', options) - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Deletes all client certificates and generates a new server SSL certificate for - # the instance. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] instance - # Cloud SQL instance ID. This does not include the project ID. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::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 reset_instance_ssl_config(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:post, 'projects/{project}/instances/{instance}/resetSslConfig', options) - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Restarts a Cloud SQL instance. - # @param [String] project - # Project ID of the project that contains the instance to be restarted. - # @param [String] instance - # Cloud SQL instance ID. This does not include the project ID. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::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 restart_instance(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:post, 'projects/{project}/instances/{instance}/restart', options) - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Restores a backup of a Cloud SQL instance. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] instance - # Cloud SQL instance ID. This does not include the project ID. - # @param [Google::Apis::SqladminV1beta4::RestoreInstancesBackupRequest] restore_instances_backup_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::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 restore_instance_backup(project, instance, restore_instances_backup_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:post, 'projects/{project}/instances/{instance}/restoreBackup', options) - command.request_representation = Google::Apis::SqladminV1beta4::RestoreInstancesBackupRequest::Representation - command.request_object = restore_instances_backup_request_object - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Rotates the server certificate to one signed by the Certificate Authority (CA) - # version previously added with the addServerCA method. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] instance - # Cloud SQL instance ID. This does not include the project ID. - # @param [Google::Apis::SqladminV1beta4::InstancesRotateServerCaRequest] instances_rotate_server_ca_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::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 rotate_instance_server_ca(project, instance, instances_rotate_server_ca_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:post, 'projects/{project}/instances/{instance}/rotateServerCa', options) - command.request_representation = Google::Apis::SqladminV1beta4::InstancesRotateServerCaRequest::Representation - command.request_object = instances_rotate_server_ca_request_object - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Starts the replication in the read replica instance. - # @param [String] project - # ID of the project that contains the read replica. - # @param [String] instance - # Cloud SQL read replica instance name. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::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 start_instance_replica(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:post, 'projects/{project}/instances/{instance}/startReplica', options) - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Stops the replication in the read replica instance. - # @param [String] project - # ID of the project that contains the read replica. - # @param [String] instance - # Cloud SQL read replica instance name. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::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 stop_instance_replica(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:post, 'projects/{project}/instances/{instance}/stopReplica', options) - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Truncate MySQL general and slow query log tables - # @param [String] project - # Project ID of the Cloud SQL project. - # @param [String] instance - # Cloud SQL instance ID. This does not include the project ID. - # @param [Google::Apis::SqladminV1beta4::InstancesTruncateLogRequest] instances_truncate_log_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::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 truncate_instance_log(project, instance, instances_truncate_log_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:post, 'projects/{project}/instances/{instance}/truncateLog', options) - command.request_representation = Google::Apis::SqladminV1beta4::InstancesTruncateLogRequest::Representation - command.request_object = instances_truncate_log_request_object - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates settings of a Cloud SQL instance. Caution: This is not a partial - # update, so you must include values for all the settings that you want to - # retain. For partial updates, use patch. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] instance - # Cloud SQL instance ID. This does not include the project ID. - # @param [Google::Apis::SqladminV1beta4::DatabaseInstance] database_instance_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::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 update_instance(project, instance, database_instance_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:put, 'projects/{project}/instances/{instance}', options) - command.request_representation = Google::Apis::SqladminV1beta4::DatabaseInstance::Representation - command.request_object = database_instance_object - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves an instance operation that has been performed on an instance. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] operation - # Instance operation ID. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::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_operation(project, operation, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:get, 'projects/{project}/operations/{operation}', options) - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['operation'] = operation unless operation.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Lists all instance operations that have been performed on the given Cloud SQL - # instance in the reverse chronological order of the start time. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] instance - # Cloud SQL instance ID. This does not include the project ID. - # @param [Fixnum] max_results - # Maximum number of operations per response. - # @param [String] page_token - # A previously-returned page token representing part of the larger set of - # results to view. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SqladminV1beta4::ListOperationsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::ListOperationsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_operations(project, instance, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:get, 'projects/{project}/operations', options) - command.response_representation = Google::Apis::SqladminV1beta4::ListOperationsResponse::Representation - command.response_class = Google::Apis::SqladminV1beta4::ListOperationsResponse - command.params['project'] = project unless project.nil? - command.query['instance'] = instance unless instance.nil? - command.query['maxResults'] = max_results unless max_results.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? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Generates a short-lived X509 certificate containing the provided public key - # and signed by a private key specific to the target instance. Users may use the - # certificate to authenticate as themselves when connecting to the database. - # @param [String] project - # Project ID of the Cloud SQL project. - # @param [String] instance - # Cloud SQL instance ID. This does not include the project ID. - # @param [Google::Apis::SqladminV1beta4::SslCertsCreateEphemeralRequest] ssl_certs_create_ephemeral_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SqladminV1beta4::SslCert] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::SslCert] - # - # @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_ssl_cert_ephemeral(project, instance, ssl_certs_create_ephemeral_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:post, 'projects/{project}/instances/{instance}/createEphemeral', options) - command.request_representation = Google::Apis::SqladminV1beta4::SslCertsCreateEphemeralRequest::Representation - command.request_object = ssl_certs_create_ephemeral_request_object - command.response_representation = Google::Apis::SqladminV1beta4::SslCert::Representation - command.response_class = Google::Apis::SqladminV1beta4::SslCert - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Deletes the SSL certificate. For First Generation instances, the certificate - # remains valid until the instance is restarted. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] instance - # Cloud SQL instance ID. This does not include the project ID. - # @param [String] sha1_fingerprint - # Sha1 FingerPrint. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::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_ssl_cert(project, instance, sha1_fingerprint, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:delete, 'projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}', options) - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.params['sha1Fingerprint'] = sha1_fingerprint unless sha1_fingerprint.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves a particular SSL certificate. Does not include the private key ( - # required for usage). The private key must be saved from the response to - # initial creation. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] instance - # Cloud SQL instance ID. This does not include the project ID. - # @param [String] sha1_fingerprint - # Sha1 FingerPrint. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SqladminV1beta4::SslCert] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::SslCert] - # - # @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_ssl_cert(project, instance, sha1_fingerprint, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:get, 'projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}', options) - command.response_representation = Google::Apis::SqladminV1beta4::SslCert::Representation - command.response_class = Google::Apis::SqladminV1beta4::SslCert - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.params['sha1Fingerprint'] = sha1_fingerprint unless sha1_fingerprint.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Creates an SSL certificate and returns it along with the private key and - # server certificate authority. The new certificate will not be usable until the - # instance is restarted. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] instance - # Cloud SQL instance ID. This does not include the project ID. - # @param [Google::Apis::SqladminV1beta4::InsertSslCertsRequest] insert_ssl_certs_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SqladminV1beta4::InsertSslCertsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::InsertSslCertsResponse] - # - # @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 insert_ssl_cert(project, instance, insert_ssl_certs_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:post, 'projects/{project}/instances/{instance}/sslCerts', options) - command.request_representation = Google::Apis::SqladminV1beta4::InsertSslCertsRequest::Representation - command.request_object = insert_ssl_certs_request_object - command.response_representation = Google::Apis::SqladminV1beta4::InsertSslCertsResponse::Representation - command.response_class = Google::Apis::SqladminV1beta4::InsertSslCertsResponse - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Lists all of the current SSL certificates for the instance. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] instance - # Cloud SQL instance ID. This does not include the project ID. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SqladminV1beta4::ListSslCertsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::ListSslCertsResponse] - # - # @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_ssl_certs(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:get, 'projects/{project}/instances/{instance}/sslCerts', options) - command.response_representation = Google::Apis::SqladminV1beta4::ListSslCertsResponse::Representation - command.response_class = Google::Apis::SqladminV1beta4::ListSslCertsResponse - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Lists all available machine types (tiers) for Cloud SQL, for example, db-n1- - # standard-1. For related information, see Pricing. - # @param [String] project - # Project ID of the project for which to list tiers. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SqladminV1beta4::ListTiersResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::ListTiersResponse] - # - # @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_tiers(project, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:get, 'projects/{project}/tiers', options) - command.response_representation = Google::Apis::SqladminV1beta4::ListTiersResponse::Representation - command.response_class = Google::Apis::SqladminV1beta4::ListTiersResponse - command.params['project'] = project unless project.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Deletes a user from a Cloud SQL instance. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] instance - # Database instance ID. This does not include the project ID. - # @param [String] host - # Host of the user in the instance. - # @param [String] name - # Name of the user in the instance. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::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_user(project, instance, host, name, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:delete, 'projects/{project}/instances/{instance}/users', options) - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['host'] = host unless host.nil? - command.query['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Creates a new user in a Cloud SQL instance. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] instance - # Database instance ID. This does not include the project ID. - # @param [Google::Apis::SqladminV1beta4::User] user_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::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 insert_user(project, instance, user_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:post, 'projects/{project}/instances/{instance}/users', options) - command.request_representation = Google::Apis::SqladminV1beta4::User::Representation - command.request_object = user_object - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Lists users in the specified Cloud SQL instance. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] instance - # Database instance ID. This does not include the project ID. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SqladminV1beta4::ListUsersResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::ListUsersResponse] - # - # @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_users(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:get, 'projects/{project}/instances/{instance}/users', options) - command.response_representation = Google::Apis::SqladminV1beta4::ListUsersResponse::Representation - command.response_class = Google::Apis::SqladminV1beta4::ListUsersResponse - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates an existing user in a Cloud SQL instance. - # @param [String] project - # Project ID of the project that contains the instance. - # @param [String] instance - # Database instance ID. This does not include the project ID. - # @param [String] name - # Name of the user in the instance. - # @param [Google::Apis::SqladminV1beta4::User] user_object - # @param [String] host - # Host of the user in the instance. For a MySQL instance, it's required; For a - # PostgreSQL instance, it's optional. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SqladminV1beta4::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 update_user(project, instance, name, user_object = nil, host: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:put, 'projects/{project}/instances/{instance}/users', options) - command.request_representation = Google::Apis::SqladminV1beta4::User::Representation - command.request_object = user_object - command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation - command.response_class = Google::Apis::SqladminV1beta4::Operation - command.params['project'] = project unless project.nil? - command.params['instance'] = instance unless instance.nil? - command.query['host'] = host unless host.nil? - command.query['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - protected - - def apply_command_defaults(command) - command.query['key'] = key unless key.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - end - end - end - end -end