From 41ca4a205c636498ba50ed853703f6505ac96663 Mon Sep 17 00:00:00 2001 From: Google APIs Date: Sat, 28 Sep 2019 00:37:10 +0000 Subject: [PATCH] Autogenerated update (2019-09-28) Update: - binaryauthorization_v1 - binaryauthorization_v1beta1 - cloudidentity_v1 - cloudidentity_v1beta1 - firebase_v1beta1 --- .../apis/bigqueryreservation_v1beta1.rb | 37 + .../bigqueryreservation_v1beta1/classes.rb | 497 +++++++ .../representations.rb | 236 ++++ .../bigqueryreservation_v1beta1/service.rb | 713 ++++++++++ .../google/apis/binaryauthorization_v1.rb | 2 +- .../apis/binaryauthorization_v1/classes.rb | 91 +- .../apis/binaryauthorization_v1beta1.rb | 2 +- .../binaryauthorization_v1beta1/classes.rb | 91 +- generated/google/apis/cloudidentity_v1.rb | 5 +- .../google/apis/cloudidentity_v1beta1.rb | 5 +- generated/google/apis/firebase_v1beta1.rb | 2 +- .../google/apis/firebase_v1beta1/classes.rb | 39 +- .../google/apis/firebase_v1beta1/service.rb | 36 +- generated/google/apis/recommender_v1beta1.rb | 34 + .../apis/recommender_v1beta1/classes.rb | 502 +++++++ .../recommender_v1beta1/representations.rb | 232 ++++ .../apis/recommender_v1beta1/service.rb | 262 ++++ generated/google/apis/run_v1beta1.rb | 35 + generated/google/apis/run_v1beta1/classes.rb | 1209 +++++++++++++++++ .../apis/run_v1beta1/representations.rb | 421 ++++++ generated/google/apis/run_v1beta1/service.rb | 172 +++ 21 files changed, 4538 insertions(+), 85 deletions(-) create mode 100644 generated/google/apis/bigqueryreservation_v1beta1.rb create mode 100644 generated/google/apis/bigqueryreservation_v1beta1/classes.rb create mode 100644 generated/google/apis/bigqueryreservation_v1beta1/representations.rb create mode 100644 generated/google/apis/bigqueryreservation_v1beta1/service.rb create mode 100644 generated/google/apis/recommender_v1beta1.rb create mode 100644 generated/google/apis/recommender_v1beta1/classes.rb create mode 100644 generated/google/apis/recommender_v1beta1/representations.rb create mode 100644 generated/google/apis/recommender_v1beta1/service.rb create mode 100644 generated/google/apis/run_v1beta1.rb create mode 100644 generated/google/apis/run_v1beta1/classes.rb create mode 100644 generated/google/apis/run_v1beta1/representations.rb create mode 100644 generated/google/apis/run_v1beta1/service.rb diff --git a/generated/google/apis/bigqueryreservation_v1beta1.rb b/generated/google/apis/bigqueryreservation_v1beta1.rb new file mode 100644 index 000000000..439553718 --- /dev/null +++ b/generated/google/apis/bigqueryreservation_v1beta1.rb @@ -0,0 +1,37 @@ +# 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/bigqueryreservation_v1beta1/service.rb' +require 'google/apis/bigqueryreservation_v1beta1/classes.rb' +require 'google/apis/bigqueryreservation_v1beta1/representations.rb' + +module Google + module Apis + # BigQuery Reservation API + # + # A service to modify your BigQuery flat-rate reservations. + # + # @see https://cloud.google.com/bigquery/ + module BigqueryreservationV1beta1 + VERSION = 'V1beta1' + REVISION = '20190920' + + # View and manage your data in Google BigQuery + AUTH_BIGQUERY = 'https://www.googleapis.com/auth/bigquery' + + # View and manage your data across Google Cloud Platform services + AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' + end + end +end diff --git a/generated/google/apis/bigqueryreservation_v1beta1/classes.rb b/generated/google/apis/bigqueryreservation_v1beta1/classes.rb new file mode 100644 index 000000000..62f932eb3 --- /dev/null +++ b/generated/google/apis/bigqueryreservation_v1beta1/classes.rb @@ -0,0 +1,497 @@ +# 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 BigqueryreservationV1beta1 + + # A Assignment allows a project to submit jobs + # of a certain type using slots from the specified reservation. + class Assignment + include Google::Apis::Core::Hashable + + # The resource which will use the reservation. E.g. + # projects/myproject, folders/123, organizations/456. + # Corresponds to the JSON property `assignee` + # @return [String] + attr_accessor :assignee + + # Which type of jobs will use the reservation. + # Corresponds to the JSON property `jobType` + # @return [String] + attr_accessor :job_type + + # Output only. Name of the resource. E.g.: + # projects/myproject/locations/US/reservations/team1-prod/assignments/123. + # 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) + @assignee = args[:assignee] if args.key?(:assignee) + @job_type = args[:job_type] if args.key?(:job_type) + @name = args[:name] if args.key?(:name) + end + end + + # Capacity commitment is a way to purchase compute capacity for BigQuery jobs + # (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. + # A capacity commitment resource exists as a child resource of the admin + # project. + class CapacityCommitment + include Google::Apis::Core::Hashable + + # Output only. The end of the commitment period. Capacity commitment cannot be + # removed before commitment_end_time. It is applicable only for ACTIVE + # capacity commitments and is computed as a combination of the plan and the + # time when the capacity commitment became ACTIVE. + # Corresponds to the JSON property `commitmentEndTime` + # @return [String] + attr_accessor :commitment_end_time + + # Output only. The resource name of the capacity commitment, e.g., + # projects/myproject/locations/US/capacityCommitments/123 + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Capacity commitment commitment plan. + # Corresponds to the JSON property `plan` + # @return [String] + attr_accessor :plan + + # Number of slots in this commitment. + # Corresponds to the JSON property `slotCount` + # @return [Fixnum] + attr_accessor :slot_count + + # Output only. State of the commitment. + # Corresponds to the JSON property `state` + # @return [String] + attr_accessor :state + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @commitment_end_time = args[:commitment_end_time] if args.key?(:commitment_end_time) + @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 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: + # service Foo ` + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # ` + # The JSON representation for `Empty` is empty JSON object ````. + class Empty + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # The response for ReservationService.ListAssignments. + class ListAssignmentsResponse + include Google::Apis::Core::Hashable + + # List of assignments visible to the user. + # Corresponds to the JSON property `assignments` + # @return [Array] + attr_accessor :assignments + + # Token to retrieve the next page of results, or empty if there are no + # more results in the list. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @assignments = args[:assignments] if args.key?(:assignments) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # The response for ReservationService.ListCapacityCommitments. + class ListCapacityCommitmentsResponse + include Google::Apis::Core::Hashable + + # List of capacity commitments visible to the user. + # Corresponds to the JSON property `capacityCommitments` + # @return [Array] + attr_accessor :capacity_commitments + + # Token to retrieve the next page of results, or empty if there are no + # more results in the list. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @capacity_commitments = args[:capacity_commitments] if args.key?(:capacity_commitments) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # The response message for Locations.ListLocations. + class ListLocationsResponse + include Google::Apis::Core::Hashable + + # A list of locations that matches the specified filter in the request. + # Corresponds to the JSON property `locations` + # @return [Array] + attr_accessor :locations + + # The standard List next-page token. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @locations = args[:locations] if args.key?(:locations) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # The response for ReservationService.ListReservations. + class ListReservationsResponse + include Google::Apis::Core::Hashable + + # Token to retrieve the next page of results, or empty if there are no + # more results in the list. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # List of reservations visible to the user. + # Corresponds to the JSON property `reservations` + # @return [Array] + attr_accessor :reservations + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @reservations = args[:reservations] if args.key?(:reservations) + end + end + + # A resource that represents Google Cloud Platform location. + class Location + include Google::Apis::Core::Hashable + + # The friendly name for this location, typically a nearby city name. + # For example, "Tokyo". + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # Cross-service attributes for the location. For example + # `"cloud.googleapis.com/region": "us-east1"` + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # The canonical id for this location. For example: `"us-east1"`. + # Corresponds to the JSON property `locationId` + # @return [String] + attr_accessor :location_id + + # Service-specific metadata. For example the available capacity at the given + # location. + # Corresponds to the JSON property `metadata` + # @return [Hash] + attr_accessor :metadata + + # Resource name for the location, which may vary between implementations. + # For example: `"projects/example-project/locations/us-east1"` + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @display_name = args[:display_name] if args.key?(:display_name) + @labels = args[:labels] if args.key?(:labels) + @location_id = args[:location_id] if args.key?(:location_id) + @metadata = args[:metadata] if args.key?(:metadata) + @name = args[:name] if args.key?(:name) + end + end + + # BigQuery-specific metadata about a location. This will be set on + # google.cloud.location.Location.metadata in Cloud Location API + # responses. + class LocationMetadata + include Google::Apis::Core::Hashable + + # The legacy BigQuery location ID, e.g. “EU” for the “europe” location. + # This is for any API consumers that need the legacy “US” and “EU” locations. + # Corresponds to the JSON property `legacyLocationId` + # @return [String] + attr_accessor :legacy_location_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @legacy_location_id = args[:legacy_location_id] if args.key?(:legacy_location_id) + 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::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` + # @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 + + # 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. + # Corresponds to the JSON property `ignoreIdleSlots` + # @return [Boolean] + attr_accessor :ignore_idle_slots + alias_method :ignore_idle_slots?, :ignore_idle_slots + + # The resource name of the reservation, e.g., + # "projects/*/locations/*/reservations/team1-prod". + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Maximum slots available to this reservation. A slot is a unit of + # computational power in BigQuery, and serves as the unit of parallelism. In + # a scan of a multi-partitioned table, a single slot operates on a single + # partition of the table. + # If the new reservation's slot capacity exceed the parent's slot capacity or + # if total slot capacity of the new reservation and its siblings exceeds the + # parent's slot capacity, the request will fail with + # `google.rpc.Code.RESOURCE_EXHAUSTED`. + # Corresponds to the JSON property `slotCapacity` + # @return [Fixnum] + attr_accessor :slot_capacity + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @ignore_idle_slots = args[:ignore_idle_slots] if args.key?(:ignore_idle_slots) + @name = args[:name] if args.key?(:name) + @slot_capacity = args[:slot_capacity] if args.key?(:slot_capacity) + end + end + + # The response for ReservationService.SearchAssignments. + class SearchAssignmentsResponse + include Google::Apis::Core::Hashable + + # List of assignments visible to the user. + # Corresponds to the JSON property `assignments` + # @return [Array] + attr_accessor :assignments + + # Token to retrieve the next page of results, or empty if there are no + # more results in the list. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @assignments = args[:assignments] if args.key?(:assignments) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + 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_v1beta1/representations.rb b/generated/google/apis/bigqueryreservation_v1beta1/representations.rb new file mode 100644 index 000000000..9c845fa25 --- /dev/null +++ b/generated/google/apis/bigqueryreservation_v1beta1/representations.rb @@ -0,0 +1,236 @@ +# 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 BigqueryreservationV1beta1 + + class Assignment + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CapacityCommitment + class Representation < Google::Apis::Core::JsonRepresentation; end + + 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 + + include Google::Apis::Core::JsonObjectSupport + end + + class ListAssignmentsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListCapacityCommitmentsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListLocationsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListReservationsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Location + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class LocationMetadata + 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 Reservation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SearchAssignmentsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Status + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Assignment + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :assignee, as: 'assignee' + property :job_type, as: 'jobType' + property :name, as: 'name' + end + end + + class CapacityCommitment + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :commitment_end_time, as: 'commitmentEndTime' + property :name, as: 'name' + property :plan, as: 'plan' + property :slot_count, :numeric_string => true, as: 'slotCount' + property :state, as: 'state' + 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 + end + end + + class ListAssignmentsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :assignments, as: 'assignments', class: Google::Apis::BigqueryreservationV1beta1::Assignment, decorator: Google::Apis::BigqueryreservationV1beta1::Assignment::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class ListCapacityCommitmentsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :capacity_commitments, as: 'capacityCommitments', class: Google::Apis::BigqueryreservationV1beta1::CapacityCommitment, decorator: Google::Apis::BigqueryreservationV1beta1::CapacityCommitment::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class ListLocationsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :locations, as: 'locations', class: Google::Apis::BigqueryreservationV1beta1::Location, decorator: Google::Apis::BigqueryreservationV1beta1::Location::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class ListReservationsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :reservations, as: 'reservations', class: Google::Apis::BigqueryreservationV1beta1::Reservation, decorator: Google::Apis::BigqueryreservationV1beta1::Reservation::Representation + + end + end + + class Location + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :display_name, as: 'displayName' + hash :labels, as: 'labels' + property :location_id, as: 'locationId' + hash :metadata, as: 'metadata' + property :name, as: 'name' + end + end + + class LocationMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :legacy_location_id, as: 'legacyLocationId' + end + end + + class Operation + # @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' + end + end + + class Reservation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :ignore_idle_slots, as: 'ignoreIdleSlots' + property :name, as: 'name' + property :slot_capacity, :numeric_string => true, as: 'slotCapacity' + end + end + + class SearchAssignmentsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :assignments, as: 'assignments', class: Google::Apis::BigqueryreservationV1beta1::Assignment, decorator: Google::Apis::BigqueryreservationV1beta1::Assignment::Representation + + property :next_page_token, as: 'nextPageToken' + 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_v1beta1/service.rb b/generated/google/apis/bigqueryreservation_v1beta1/service.rb new file mode 100644 index 000000000..dcfa56a42 --- /dev/null +++ b/generated/google/apis/bigqueryreservation_v1beta1/service.rb @@ -0,0 +1,713 @@ +# 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 BigqueryreservationV1beta1 + # BigQuery Reservation API + # + # A service to modify your BigQuery flat-rate reservations. + # + # @example + # require 'google/apis/bigqueryreservation_v1beta1' + # + # Bigqueryreservation = Google::Apis::BigqueryreservationV1beta1 # Alias the module + # service = Bigqueryreservation::BigQueryReservationService.new + # + # @see https://cloud.google.com/bigquery/ + class BigQueryReservationService < Google::Apis::Core::BaseService + # @return [String] + # API key. Your API key identifies your project and provides you with API access, + # quota, and reports. Required unless you provide an OAuth 2.0 token. + attr_accessor :key + + # @return [String] + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + attr_accessor :quota_user + + def initialize + super('https://bigqueryreservation.googleapis.com/', '') + @batch_path = 'batch' + end + + # Gets information about a location. + # @param [String] name + # Resource name for the location. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::BigqueryreservationV1beta1::Location] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::BigqueryreservationV1beta1::Location] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+name}', options) + command.response_representation = Google::Apis::BigqueryreservationV1beta1::Location::Representation + command.response_class = Google::Apis::BigqueryreservationV1beta1::Location + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists information about the supported locations for this service. + # @param [String] name + # The resource that owns the locations collection, if applicable. + # @param [String] filter + # The standard list filter. + # @param [Fixnum] page_size + # The standard list page size. + # @param [String] page_token + # The standard list page token. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::BigqueryreservationV1beta1::ListLocationsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::BigqueryreservationV1beta1::ListLocationsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_locations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+name}/locations', options) + command.response_representation = Google::Apis::BigqueryreservationV1beta1::ListLocationsResponse::Representation + command.response_class = Google::Apis::BigqueryreservationV1beta1::ListLocationsResponse + command.params['name'] = name unless name.nil? + command.query['filter'] = filter unless filter.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Looks up assignments for a specified resource for a particular region. + # If the request is about a project: + # 1) Assignments created on the project will be returned if they exist. + # 2) Otherwise assignments created on the closest ancestor will be + # returned. 3) Assignments for different JobTypes will all be returned. + # Same logic applies if the request is about a folder. + # If the request is about an organization, then assignments created on the + # organization will be returned (organization doesn't have ancestors). + # Comparing to ListAssignments, there are some behavior + # differences: + # 1) permission on the assignee will be verified in this API. + # 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 + # nor locations. + # @param [String] parent + # The resource name of the admin project(containing project and location), + # e.g.: + # "projects/myproject/locations/US". + # @param [Fixnum] page_size + # The maximum number of items to return. + # @param [String] page_token + # The next_page_token value returned from a previous List request, if any. + # @param [String] query + # Please specify resource name as assignee in the query. + # e.g., "assignee=projects/myproject" + # "assignee=folders/123" + # "assignee=organizations/456" + # @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::SearchAssignmentsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::BigqueryreservationV1beta1::SearchAssignmentsResponse] + # + # @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 search_project_location_assignments(parent, page_size: nil, page_token: nil, query: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+parent}:searchAssignments', options) + command.response_representation = Google::Apis::BigqueryreservationV1beta1::SearchAssignmentsResponse::Representation + command.response_class = Google::Apis::BigqueryreservationV1beta1::SearchAssignmentsResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['query'] = query unless query.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a capacity commitment. Attempting to delete capacity commitment + # before its commitment_end_time will fail with the error code + # `google.rpc.Code.FAILED_PRECONDITION`. + # @param [String] name + # Resource name of the capacity commitment to delete. E.g., + # projects/myproject/locations/US/capacityCommitments/123 + # @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 delete_project_location_capacity_commitment(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1beta1/{+name}', 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 + + # Returns information about the capacity commitment. + # @param [String] name + # Resource name of the capacity commitment to retrieve. E.g., + # projects/myproject/locations/US/capacityCommitments/123 + # @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::CapacityCommitment] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::BigqueryreservationV1beta1::CapacityCommitment] + # + # @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_capacity_commitment(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+name}', options) + command.response_representation = Google::Apis::BigqueryreservationV1beta1::CapacityCommitment::Representation + command.response_class = Google::Apis::BigqueryreservationV1beta1::CapacityCommitment + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists all the capacity commitments for the admin project. + # @param [String] parent + # Resource name of the parent reservation. E.g., + # projects/myproject/locations/US + # @param [Fixnum] page_size + # The maximum number of items to return. + # @param [String] page_token + # The next_page_token value returned from a previous List request, if any. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::BigqueryreservationV1beta1::ListCapacityCommitmentsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::BigqueryreservationV1beta1::ListCapacityCommitmentsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_location_capacity_commitments(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+parent}/capacityCommitments', options) + command.response_representation = Google::Apis::BigqueryreservationV1beta1::ListCapacityCommitmentsResponse::Representation + command.response_class = Google::Apis::BigqueryreservationV1beta1::ListCapacityCommitmentsResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # 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., + # projects/myproject/locations/US + # @param [Google::Apis::BigqueryreservationV1beta1::Reservation] reservation_object + # @param [String] reservation_id + # The reservation ID. This field must only contain alphanumeric characters or + # dash. + # @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::Reservation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::BigqueryreservationV1beta1::Reservation] + # + # @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_reservation(parent, reservation_object = nil, reservation_id: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+parent}/reservations', options) + command.request_representation = Google::Apis::BigqueryreservationV1beta1::Reservation::Representation + command.request_object = reservation_object + command.response_representation = Google::Apis::BigqueryreservationV1beta1::Reservation::Representation + command.response_class = Google::Apis::BigqueryreservationV1beta1::Reservation + command.params['parent'] = parent unless parent.nil? + command.query['reservationId'] = reservation_id unless reservation_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a reservation. + # Returns `google.rpc.Code.FAILED_PRECONDITION` when reservation has + # assignments. This check can be bypassed by + # setting DeleteReservationRequest.force flag to true. + # @param [String] name + # Resource name of the reservation to retrieve. E.g., + # projects/myproject/locations/US/reservations/team1-prod + # @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 delete_project_location_reservation(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1beta1/{+name}', 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 + + # Returns information about the reservation. + # @param [String] name + # Resource name of the reservation to retrieve. E.g., + # projects/myproject/locations/US/reservations/team1-prod + # @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::Reservation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::BigqueryreservationV1beta1::Reservation] + # + # @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_reservation(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+name}', options) + command.response_representation = Google::Apis::BigqueryreservationV1beta1::Reservation::Representation + command.response_class = Google::Apis::BigqueryreservationV1beta1::Reservation + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists all the reservations for the project in the specified location. + # @param [String] parent + # The parent resource name containing project and location, e.g.: + # "projects/myproject/locations/US" + # @param [String] filter + # Can be used to filter out reservations based on names, capacity, etc, e.g.: + # filter="reservation.slot_capacity > 200" + # filter="reservation.name = \"*dev/*\"" + # Advanced filtering syntax can be + # [here](https://cloud.google.com/logging/docs/view/advanced-filters). + # @param [Fixnum] page_size + # The maximum number of items to return. + # @param [String] page_token + # The next_page_token value returned from a previous List request, if any. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::BigqueryreservationV1beta1::ListReservationsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::BigqueryreservationV1beta1::ListReservationsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_location_reservations(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+parent}/reservations', options) + command.response_representation = Google::Apis::BigqueryreservationV1beta1::ListReservationsResponse::Representation + command.response_class = Google::Apis::BigqueryreservationV1beta1::ListReservationsResponse + command.params['parent'] = parent unless parent.nil? + command.query['filter'] = filter unless filter.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates an existing reservation resource. + # @param [String] name + # The resource name of the reservation, e.g., + # "projects/*/locations/*/reservations/team1-prod". + # @param [Google::Apis::BigqueryreservationV1beta1::Reservation] reservation_object + # @param [String] update_mask + # Standard field mask for the set of fields to be updated. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::BigqueryreservationV1beta1::Reservation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::BigqueryreservationV1beta1::Reservation] + # + # @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_reservation(name, reservation_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1beta1/{+name}', options) + command.request_representation = Google::Apis::BigqueryreservationV1beta1::Reservation::Representation + command.request_object = reservation_object + command.response_representation = Google::Apis::BigqueryreservationV1beta1::Reservation::Representation + command.response_class = Google::Apis::BigqueryreservationV1beta1::Reservation + command.params['name'] = name unless name.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # 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. + # Returns `google.rpc.Code.INVALID_ARGUMENT` when location of the assignment + # 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 + # @param [Google::Apis::BigqueryreservationV1beta1::Assignment] assignment_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::BigqueryreservationV1beta1::Assignment] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::BigqueryreservationV1beta1::Assignment] + # + # @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_reservation_assignment(parent, assignment_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+parent}/assignments', options) + command.request_representation = Google::Apis::BigqueryreservationV1beta1::Assignment::Representation + command.request_object = assignment_object + command.response_representation = Google::Apis::BigqueryreservationV1beta1::Assignment::Representation + command.response_class = Google::Apis::BigqueryreservationV1beta1::Assignment + command.params['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a assignment. No expansion will happen. + # E.g: + # organizationA contains project1 and project2. Reservation res1 exists. + # CreateAssignment was invoked previously and following assignments were + # created explicitly: + # + # + # Then deletion of won't affect . After + # deletion of , queries from project1 will still use + # res1, while queries from project2 will use on-demand mode. + # @param [String] name + # Name of the resource, e.g.: + # projects/myproject/locations/US/reservations/team1-prod/assignments/123 + # @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 delete_project_location_reservation_assignment(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1beta1/{+name}', 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 + + # Lists assignments. + # Only explicitly created assignments will be returned. E.g: + # organizationA contains project1 and project2. Reservation res1 exists. + # CreateAssignment was invoked previously and following assignments were + # created explicitly: + # + # + # Then this API will just return the above two assignments for reservation + # res1, and no expansion/merge will happen. Wildcard "-" can be used for + # reservations in the request. In that case all assignments belongs to the + # specified project and location will be listed. Note + # "-" cannot be used for projects nor locations. + # @param [String] parent + # The parent resource name e.g.: + # projects/myproject/location/US/reservations/team1-prod + # Or: + # projects/myproject/location/US/reservations/- + # @param [Fixnum] page_size + # The maximum number of items to return. + # @param [String] page_token + # The next_page_token value returned from a previous List request, if any. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::BigqueryreservationV1beta1::ListAssignmentsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::BigqueryreservationV1beta1::ListAssignmentsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_location_reservation_assignments(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+parent}/assignments', options) + command.response_representation = Google::Apis::BigqueryreservationV1beta1::ListAssignmentsResponse::Representation + command.response_class = Google::Apis::BigqueryreservationV1beta1::ListAssignmentsResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Moves a assignment under a new reservation. Customers can do this by + # deleting the existing assignment followed by creating another assignment + # under the new reservation, but this method provides a transactional way to + # do so, to make sure the assignee always has an associated reservation. + # Without the method customers might see some queries run on-demand which + # might be unexpected. + # @param [String] name + # 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 [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::Assignment] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::BigqueryreservationV1beta1::Assignment] + # + # @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) + command = make_simple_command(:post, 'v1beta1/{+name}:move', options) + 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) + end + + protected + + def apply_command_defaults(command) + command.query['key'] = key unless key.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + end + end + end + end +end diff --git a/generated/google/apis/binaryauthorization_v1.rb b/generated/google/apis/binaryauthorization_v1.rb index d5d48de68..20969ecdd 100644 --- a/generated/google/apis/binaryauthorization_v1.rb +++ b/generated/google/apis/binaryauthorization_v1.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/binary-authorization/ module BinaryauthorizationV1 VERSION = 'V1' - REVISION = '20190916' + REVISION = '20190919' # 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/binaryauthorization_v1/classes.rb b/generated/google/apis/binaryauthorization_v1/classes.rb index aa21f447e..29cd3b773 100644 --- a/generated/google/apis/binaryauthorization_v1/classes.rb +++ b/generated/google/apis/binaryauthorization_v1/classes.rb @@ -298,25 +298,34 @@ module Google # Defines an Identity and Access Management (IAM) policy. It is used to # specify access control policies for Cloud Platform resources. - # A `Policy` consists of a list of `bindings`. A `binding` binds a list of - # `members` to a `role`, where the members can be user accounts, Google groups, - # Google domains, and service accounts. A `role` is a named list of permissions - # defined by IAM. + # A `Policy` is a collection of `bindings`. A `binding` binds one or more + # `members` to a single `role`. Members can be user accounts, service accounts, + # Google groups, and domains (such as G Suite). A `role` is a named list of + # permissions (defined by IAM or configured by users). A `binding` can + # optionally specify a `condition`, which is a logic expression that further + # constrains the role binding based on attributes about the request and/or + # target resource. # **JSON Example** # ` # "bindings": [ # ` - # "role": "roles/owner", + # "role": "role/resourcemanager.organizationAdmin", # "members": [ # "user:mike@example.com", # "group:admins@example.com", # "domain:google.com", - # "serviceAccount:my-other-app@appspot.gserviceaccount.com" + # "serviceAccount:my-project-id@appspot.gserviceaccount.com" # ] # `, # ` - # "role": "roles/viewer", - # "members": ["user:sean@example.com"] + # "role": "roles/resourcemanager.organizationViewer", + # "members": ["user:eve@example.com"], + # "condition": ` + # "title": "expirable access", + # "description": "Does not grant access after Sep 2020", + # "expression": "request.time < + # timestamp('2020-10-01T00:00:00.000Z')", + # ` # ` # ] # ` @@ -326,17 +335,22 @@ module Google # - user:mike@example.com # - group:admins@example.com # - domain:google.com - # - serviceAccount:my-other-app@appspot.gserviceaccount.com - # role: roles/owner + # - serviceAccount:my-project-id@appspot.gserviceaccount.com + # role: roles/resourcemanager.organizationAdmin # - members: - # - user:sean@example.com - # role: roles/viewer + # - user:eve@example.com + # role: roles/resourcemanager.organizationViewer + # condition: + # title: expirable access + # description: Does not grant access after Sep 2020 + # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') # For a description of IAM and its features, see the # [IAM developer's guide](https://cloud.google.com/iam/docs). class IamPolicy include Google::Apis::Core::Hashable - # Associates a list of `members` to a `role`. + # Associates a list of `members` to a `role`. Optionally may specify a + # `condition` that determines when binding is in effect. # `bindings` with no members will result in an error. # Corresponds to the JSON property `bindings` # @return [Array] @@ -350,7 +364,9 @@ module Google # systems are expected to put that etag in the request to `setIamPolicy` to # ensure that their change will be applied to the same version of the policy. # If no `etag` is provided in the call to `setIamPolicy`, then the existing - # policy is overwritten. + # policy is overwritten. Due to blind-set semantics of an etag-less policy, + # 'setIamPolicy' will not fail even if either of incoming or stored policy + # does not meet the version requirements. # Corresponds to the JSON property `etag` # NOTE: Values are automatically base64 encoded/decoded in the client library. # @return [String] @@ -359,9 +375,13 @@ module Google # Specifies the format of the policy. # Valid values are 0, 1, and 3. Requests specifying an invalid value will be # rejected. - # Policies with any conditional bindings must specify version 3. Policies - # without any conditional bindings may specify any valid value or leave the - # field unset. + # Operations affecting conditional bindings must specify version 3. This can + # be either setting a conditional policy, modifying a conditional binding, + # or removing a conditional binding from the stored conditional policy. + # Operations on non-conditional policies may specify any valid value or + # leave the field unset. + # If no etag is provided in the call to `setIamPolicy`, any version + # compliance checks on the incoming and/or stored policy is skipped. # Corresponds to the JSON property `version` # @return [Fixnum] attr_accessor :version @@ -517,25 +537,34 @@ module Google # Defines an Identity and Access Management (IAM) policy. It is used to # specify access control policies for Cloud Platform resources. - # A `Policy` consists of a list of `bindings`. A `binding` binds a list of - # `members` to a `role`, where the members can be user accounts, Google groups, - # Google domains, and service accounts. A `role` is a named list of permissions - # defined by IAM. + # A `Policy` is a collection of `bindings`. A `binding` binds one or more + # `members` to a single `role`. Members can be user accounts, service accounts, + # Google groups, and domains (such as G Suite). A `role` is a named list of + # permissions (defined by IAM or configured by users). A `binding` can + # optionally specify a `condition`, which is a logic expression that further + # constrains the role binding based on attributes about the request and/or + # target resource. # **JSON Example** # ` # "bindings": [ # ` - # "role": "roles/owner", + # "role": "role/resourcemanager.organizationAdmin", # "members": [ # "user:mike@example.com", # "group:admins@example.com", # "domain:google.com", - # "serviceAccount:my-other-app@appspot.gserviceaccount.com" + # "serviceAccount:my-project-id@appspot.gserviceaccount.com" # ] # `, # ` - # "role": "roles/viewer", - # "members": ["user:sean@example.com"] + # "role": "roles/resourcemanager.organizationViewer", + # "members": ["user:eve@example.com"], + # "condition": ` + # "title": "expirable access", + # "description": "Does not grant access after Sep 2020", + # "expression": "request.time < + # timestamp('2020-10-01T00:00:00.000Z')", + # ` # ` # ] # ` @@ -545,11 +574,15 @@ module Google # - user:mike@example.com # - group:admins@example.com # - domain:google.com - # - serviceAccount:my-other-app@appspot.gserviceaccount.com - # role: roles/owner + # - serviceAccount:my-project-id@appspot.gserviceaccount.com + # role: roles/resourcemanager.organizationAdmin # - members: - # - user:sean@example.com - # role: roles/viewer + # - user:eve@example.com + # role: roles/resourcemanager.organizationViewer + # condition: + # title: expirable access + # description: Does not grant access after Sep 2020 + # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') # For a description of IAM and its features, see the # [IAM developer's guide](https://cloud.google.com/iam/docs). # Corresponds to the JSON property `policy` diff --git a/generated/google/apis/binaryauthorization_v1beta1.rb b/generated/google/apis/binaryauthorization_v1beta1.rb index 5ea4760e2..8424ec15c 100644 --- a/generated/google/apis/binaryauthorization_v1beta1.rb +++ b/generated/google/apis/binaryauthorization_v1beta1.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/binary-authorization/ module BinaryauthorizationV1beta1 VERSION = 'V1beta1' - REVISION = '20190906' + REVISION = '20190919' # 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/binaryauthorization_v1beta1/classes.rb b/generated/google/apis/binaryauthorization_v1beta1/classes.rb index 6b51861fc..0d8f3f71c 100644 --- a/generated/google/apis/binaryauthorization_v1beta1/classes.rb +++ b/generated/google/apis/binaryauthorization_v1beta1/classes.rb @@ -298,25 +298,34 @@ module Google # Defines an Identity and Access Management (IAM) policy. It is used to # specify access control policies for Cloud Platform resources. - # A `Policy` consists of a list of `bindings`. A `binding` binds a list of - # `members` to a `role`, where the members can be user accounts, Google groups, - # Google domains, and service accounts. A `role` is a named list of permissions - # defined by IAM. + # A `Policy` is a collection of `bindings`. A `binding` binds one or more + # `members` to a single `role`. Members can be user accounts, service accounts, + # Google groups, and domains (such as G Suite). A `role` is a named list of + # permissions (defined by IAM or configured by users). A `binding` can + # optionally specify a `condition`, which is a logic expression that further + # constrains the role binding based on attributes about the request and/or + # target resource. # **JSON Example** # ` # "bindings": [ # ` - # "role": "roles/owner", + # "role": "role/resourcemanager.organizationAdmin", # "members": [ # "user:mike@example.com", # "group:admins@example.com", # "domain:google.com", - # "serviceAccount:my-other-app@appspot.gserviceaccount.com" + # "serviceAccount:my-project-id@appspot.gserviceaccount.com" # ] # `, # ` - # "role": "roles/viewer", - # "members": ["user:sean@example.com"] + # "role": "roles/resourcemanager.organizationViewer", + # "members": ["user:eve@example.com"], + # "condition": ` + # "title": "expirable access", + # "description": "Does not grant access after Sep 2020", + # "expression": "request.time < + # timestamp('2020-10-01T00:00:00.000Z')", + # ` # ` # ] # ` @@ -326,17 +335,22 @@ module Google # - user:mike@example.com # - group:admins@example.com # - domain:google.com - # - serviceAccount:my-other-app@appspot.gserviceaccount.com - # role: roles/owner + # - serviceAccount:my-project-id@appspot.gserviceaccount.com + # role: roles/resourcemanager.organizationAdmin # - members: - # - user:sean@example.com - # role: roles/viewer + # - user:eve@example.com + # role: roles/resourcemanager.organizationViewer + # condition: + # title: expirable access + # description: Does not grant access after Sep 2020 + # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') # For a description of IAM and its features, see the # [IAM developer's guide](https://cloud.google.com/iam/docs). class IamPolicy include Google::Apis::Core::Hashable - # Associates a list of `members` to a `role`. + # Associates a list of `members` to a `role`. Optionally may specify a + # `condition` that determines when binding is in effect. # `bindings` with no members will result in an error. # Corresponds to the JSON property `bindings` # @return [Array] @@ -350,7 +364,9 @@ module Google # systems are expected to put that etag in the request to `setIamPolicy` to # ensure that their change will be applied to the same version of the policy. # If no `etag` is provided in the call to `setIamPolicy`, then the existing - # policy is overwritten. + # policy is overwritten. Due to blind-set semantics of an etag-less policy, + # 'setIamPolicy' will not fail even if either of incoming or stored policy + # does not meet the version requirements. # Corresponds to the JSON property `etag` # NOTE: Values are automatically base64 encoded/decoded in the client library. # @return [String] @@ -359,9 +375,13 @@ module Google # Specifies the format of the policy. # Valid values are 0, 1, and 3. Requests specifying an invalid value will be # rejected. - # Policies with any conditional bindings must specify version 3. Policies - # without any conditional bindings may specify any valid value or leave the - # field unset. + # Operations affecting conditional bindings must specify version 3. This can + # be either setting a conditional policy, modifying a conditional binding, + # or removing a conditional binding from the stored conditional policy. + # Operations on non-conditional policies may specify any valid value or + # leave the field unset. + # If no etag is provided in the call to `setIamPolicy`, any version + # compliance checks on the incoming and/or stored policy is skipped. # Corresponds to the JSON property `version` # @return [Fixnum] attr_accessor :version @@ -517,25 +537,34 @@ module Google # Defines an Identity and Access Management (IAM) policy. It is used to # specify access control policies for Cloud Platform resources. - # A `Policy` consists of a list of `bindings`. A `binding` binds a list of - # `members` to a `role`, where the members can be user accounts, Google groups, - # Google domains, and service accounts. A `role` is a named list of permissions - # defined by IAM. + # A `Policy` is a collection of `bindings`. A `binding` binds one or more + # `members` to a single `role`. Members can be user accounts, service accounts, + # Google groups, and domains (such as G Suite). A `role` is a named list of + # permissions (defined by IAM or configured by users). A `binding` can + # optionally specify a `condition`, which is a logic expression that further + # constrains the role binding based on attributes about the request and/or + # target resource. # **JSON Example** # ` # "bindings": [ # ` - # "role": "roles/owner", + # "role": "role/resourcemanager.organizationAdmin", # "members": [ # "user:mike@example.com", # "group:admins@example.com", # "domain:google.com", - # "serviceAccount:my-other-app@appspot.gserviceaccount.com" + # "serviceAccount:my-project-id@appspot.gserviceaccount.com" # ] # `, # ` - # "role": "roles/viewer", - # "members": ["user:sean@example.com"] + # "role": "roles/resourcemanager.organizationViewer", + # "members": ["user:eve@example.com"], + # "condition": ` + # "title": "expirable access", + # "description": "Does not grant access after Sep 2020", + # "expression": "request.time < + # timestamp('2020-10-01T00:00:00.000Z')", + # ` # ` # ] # ` @@ -545,11 +574,15 @@ module Google # - user:mike@example.com # - group:admins@example.com # - domain:google.com - # - serviceAccount:my-other-app@appspot.gserviceaccount.com - # role: roles/owner + # - serviceAccount:my-project-id@appspot.gserviceaccount.com + # role: roles/resourcemanager.organizationAdmin # - members: - # - user:sean@example.com - # role: roles/viewer + # - user:eve@example.com + # role: roles/resourcemanager.organizationViewer + # condition: + # title: expirable access + # description: Does not grant access after Sep 2020 + # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') # For a description of IAM and its features, see the # [IAM developer's guide](https://cloud.google.com/iam/docs). # Corresponds to the JSON property `policy` diff --git a/generated/google/apis/cloudidentity_v1.rb b/generated/google/apis/cloudidentity_v1.rb index 94a89e8dc..565d2ee25 100644 --- a/generated/google/apis/cloudidentity_v1.rb +++ b/generated/google/apis/cloudidentity_v1.rb @@ -25,13 +25,16 @@ module Google # @see https://cloud.google.com/identity/ module CloudidentityV1 VERSION = 'V1' - REVISION = '20190529' + REVISION = '20190924' # See, change, create, and delete any of the Cloud Identity Groups that you can access, including the members of each group AUTH_CLOUD_IDENTITY_GROUPS = 'https://www.googleapis.com/auth/cloud-identity.groups' # See any Cloud Identity Groups that you can access, including group members and their emails AUTH_CLOUD_IDENTITY_GROUPS_READONLY = 'https://www.googleapis.com/auth/cloud-identity.groups.readonly' + + # View and manage your data across Google Cloud Platform services + AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' end end end diff --git a/generated/google/apis/cloudidentity_v1beta1.rb b/generated/google/apis/cloudidentity_v1beta1.rb index 004f111bd..04bb95517 100644 --- a/generated/google/apis/cloudidentity_v1beta1.rb +++ b/generated/google/apis/cloudidentity_v1beta1.rb @@ -25,13 +25,16 @@ module Google # @see https://cloud.google.com/identity/ module CloudidentityV1beta1 VERSION = 'V1beta1' - REVISION = '20190529' + REVISION = '20190924' # See, change, create, and delete any of the Cloud Identity Groups that you can access, including the members of each group AUTH_CLOUD_IDENTITY_GROUPS = 'https://www.googleapis.com/auth/cloud-identity.groups' # See any Cloud Identity Groups that you can access, including group members and their emails AUTH_CLOUD_IDENTITY_GROUPS_READONLY = 'https://www.googleapis.com/auth/cloud-identity.groups.readonly' + + # View and manage your data across Google Cloud Platform services + AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' end end end diff --git a/generated/google/apis/firebase_v1beta1.rb b/generated/google/apis/firebase_v1beta1.rb index 4c85fac71..90f19aad4 100644 --- a/generated/google/apis/firebase_v1beta1.rb +++ b/generated/google/apis/firebase_v1beta1.rb @@ -26,7 +26,7 @@ module Google # @see https://firebase.google.com module FirebaseV1beta1 VERSION = 'V1beta1' - REVISION = '20190920' + REVISION = '20190926' # 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/firebase_v1beta1/classes.rb b/generated/google/apis/firebase_v1beta1/classes.rb index 40a78df3f..6be172c20 100644 --- a/generated/google/apis/firebase_v1beta1/classes.rb +++ b/generated/google/apis/firebase_v1beta1/classes.rb @@ -159,8 +159,13 @@ module Google # @return [Google::Apis::FirebaseV1beta1::AnalyticsProperty] attr_accessor :analytics_property - # A map of `AppId` to `StreamId` for each Firebase App in the specified - # `FirebaseProject`. Each `AppId` and `StreamId` appears only once. + # For Android Apps and iOS Apps: A map of `app` to `streamId` for each + # Firebase App in the specified `FirebaseProject`. Each `app` and + # `streamId` appears only once.
+ #
+ # For Web Apps: A map of `app` to `streamId` and `measurementId` for each + # Firebase App in the specified `FirebaseProject`. Each `app`, `streamId`, + # and `measurementId` appears only once. # Corresponds to the JSON property `streamMappings` # @return [Array] attr_accessor :stream_mappings @@ -1128,15 +1133,23 @@ module Google # The fully qualified resource name of the Firebase App associated with the # Google Analytics data stream, in the format: - #
projects/projectId/iosApps/appId - # or #
projects/projectId/androidApps/appId + # or + # projects/projectId/iosApps/appId + # or + # projects/projectId/webApps/appId # Corresponds to the JSON property `app` # @return [String] attr_accessor :app - # Analytics-provided measurement ID, for use in the gtag.js library. - # Will only be present for Firebase Web Apps. + # Applicable for Firebase Web Apps only.
+ #
The unique Google-assigned identifier of the Google Analytics web + # stream associated with the Firebase Web App. Firebase SDKs use this ID to + # interact with Google Analytics APIs. + #
+ #
Learn more about this ID and Google Analytics web streams in the + # [Analytics + # documentation](https://support.google.com/analytics/topic/9303475). # Corresponds to the JSON property `measurementId` # @return [String] attr_accessor :measurement_id @@ -1286,8 +1299,18 @@ module Google # @return [String] attr_accessor :location_id - # Analytics-provided measurement ID, for use in the gtag.js library. - # Will only be present for Firebase Web Apps. + # The unique Google-assigned identifier of the Google Analytics web stream + # associated with the Firebase Web App. Firebase SDKs use this ID to interact + # with Google Analytics APIs. + #
+ #
This field is only present if the App is linked to a web stream in a + # Google Analytics App + Web property. Learn more about this ID and Google + # Analytics web streams in the [Analytics + # documentation](https://support.google.com/analytics/topic/9303475). + #
+ #
To generate a `measurementId` and link the Web App with a Google + # Analytics web stream, call + # [`AddGoogleAnalytics`](../../v1beta1/projects/addGoogleAnalytics). # Corresponds to the JSON property `measurementId` # @return [String] attr_accessor :measurement_id diff --git a/generated/google/apis/firebase_v1beta1/service.rb b/generated/google/apis/firebase_v1beta1/service.rb index 368b4666b..7cda612c4 100644 --- a/generated/google/apis/firebase_v1beta1/service.rb +++ b/generated/google/apis/firebase_v1beta1/service.rb @@ -201,22 +201,27 @@ module Google #
#
Using this call, you can either: #
    - #
  • Provision a new Google Analytics property and associate the new - # property with your `FirebaseProject`.
  • - #
  • Associate an existing Google Analytics property with your - # `FirebaseProject`.
  • + #
  • Specify an `analyticsAccountId` to provision a new Google Analytics + # property within the specified account and associate the new property with + # your `FirebaseProject`.
  • + #
  • Specify an existing `analyticsPropertyId` to associate the property + # with your `FirebaseProject`.
  • #
#
# Note that when you call `AddGoogleAnalytics`: - #
    - #
  • Any Firebase Apps already in your `FirebaseProject` are - # automatically provisioned as new data streams in the Google - # Analytics property.
  • - #
  • Any data streams already in the Google Analytics property are - # automatically associated with their corresponding Firebase Apps (only - # applies when an app's `packageName` or `bundleId` match those for an - # existing data stream).
  • - #
+ #
    + #
  1. The first check determines if any existing data streams in the + # Google Analytics property correspond to any existing Firebase Apps in your + # `FirebaseProject` (based on the `packageName` or `bundleId` associated with + # the data stream). Then, as applicable, the data streams and apps are + # linked. Note that this auto-linking only applies to Android Apps and iOS + # Apps.
  2. + #
  3. If no corresponding data streams are found for your Firebase Apps, + # new data streams are provisioned in the Google Analytics property + # for each of your Firebase Apps. Note that a new data stream is always + # provisioned for a Web App even if it was previously associated with a + # data stream in your Analytics property.
  4. + #
# Learn more about the hierarchy and structure of Google Analytics # accounts in the # [Analytics @@ -487,7 +492,10 @@ module Google #
These resources may be re-associated later to the `FirebaseProject` by # calling # [`AddGoogleAnalytics`](../../v1beta1/projects/addGoogleAnalytics) and - # specifying the same `analyticsPropertyId`. + # specifying the same `analyticsPropertyId`. For Android Apps and iOS Apps, + # this call re-links data streams with their corresponding apps. However, + # for Web Apps, this call provisions a new data stream for each Web + # App. #
#
To call `RemoveAnalytics`, a member must be an Owner for # the `FirebaseProject`. diff --git a/generated/google/apis/recommender_v1beta1.rb b/generated/google/apis/recommender_v1beta1.rb new file mode 100644 index 000000000..8a4effd68 --- /dev/null +++ b/generated/google/apis/recommender_v1beta1.rb @@ -0,0 +1,34 @@ +# 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/recommender_v1beta1/service.rb' +require 'google/apis/recommender_v1beta1/classes.rb' +require 'google/apis/recommender_v1beta1/representations.rb' + +module Google + module Apis + # Recommender API + # + # + # + # @see https://cloud.google.com/recommender/docs/ + module RecommenderV1beta1 + VERSION = 'V1beta1' + REVISION = '20190922' + + # View and manage your data across Google Cloud Platform services + AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' + end + end +end diff --git a/generated/google/apis/recommender_v1beta1/classes.rb b/generated/google/apis/recommender_v1beta1/classes.rb new file mode 100644 index 000000000..de9578706 --- /dev/null +++ b/generated/google/apis/recommender_v1beta1/classes.rb @@ -0,0 +1,502 @@ +# 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 RecommenderV1beta1 + + # Contains metadata about how much money a recommendation can save or incur. + class GoogleCloudRecommenderV1beta1CostProjection + include Google::Apis::Core::Hashable + + # Represents an amount of money with its currency type. + # Corresponds to the JSON property `cost` + # @return [Google::Apis::RecommenderV1beta1::GoogleTypeMoney] + attr_accessor :cost + + # Duration for which this cost applies. + # Corresponds to the JSON property `duration` + # @return [String] + attr_accessor :duration + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @cost = args[:cost] if args.key?(:cost) + @duration = args[:duration] if args.key?(:duration) + end + end + + # Contains the impact a recommendation can have for a given category. + class GoogleCloudRecommenderV1beta1Impact + include Google::Apis::Core::Hashable + + # Category that is being targeted. + # Corresponds to the JSON property `category` + # @return [String] + attr_accessor :category + + # Contains metadata about how much money a recommendation can save or incur. + # Corresponds to the JSON property `costProjection` + # @return [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1CostProjection] + attr_accessor :cost_projection + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @category = args[:category] if args.key?(:category) + @cost_projection = args[:cost_projection] if args.key?(:cost_projection) + end + end + + # Response to the `ListRecommendations` method. + class GoogleCloudRecommenderV1beta1ListRecommendationsResponse + include Google::Apis::Core::Hashable + + # A token that can be used to request the next page of results. This field is + # empty if there are no additional results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The set of recommendations for the `parent` resource. + # Corresponds to the JSON property `recommendations` + # @return [Array] + attr_accessor :recommendations + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @recommendations = args[:recommendations] if args.key?(:recommendations) + end + end + + # Request for the `MarkRecommendationClaimed` Method. + class GoogleCloudRecommenderV1beta1MarkRecommendationClaimedRequest + include Google::Apis::Core::Hashable + + # Fingerprint of the Recommendation. Provides optimistic locking. + # Corresponds to the JSON property `etag` + # @return [String] + attr_accessor :etag + + # State properties to include with this state. Overwrites any existing + # `state_metadata`. + # Corresponds to the JSON property `stateMetadata` + # @return [Hash] + attr_accessor :state_metadata + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @etag = args[:etag] if args.key?(:etag) + @state_metadata = args[:state_metadata] if args.key?(:state_metadata) + end + end + + # Request for the `MarkRecommendationFailed` Method. + class GoogleCloudRecommenderV1beta1MarkRecommendationFailedRequest + include Google::Apis::Core::Hashable + + # Fingerprint of the Recommendation. Provides optimistic locking. + # Corresponds to the JSON property `etag` + # @return [String] + attr_accessor :etag + + # State properties to include with this state. Overwrites any existing + # `state_metadata`. + # Corresponds to the JSON property `stateMetadata` + # @return [Hash] + attr_accessor :state_metadata + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @etag = args[:etag] if args.key?(:etag) + @state_metadata = args[:state_metadata] if args.key?(:state_metadata) + end + end + + # Request for the `MarkRecommendationSucceeded` Method. + class GoogleCloudRecommenderV1beta1MarkRecommendationSucceededRequest + include Google::Apis::Core::Hashable + + # Fingerprint of the Recommendation. Provides optimistic locking. + # Corresponds to the JSON property `etag` + # @return [String] + attr_accessor :etag + + # State properties to include with this state. Overwrites any existing + # `state_metadata`. + # Corresponds to the JSON property `stateMetadata` + # @return [Hash] + attr_accessor :state_metadata + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @etag = args[:etag] if args.key?(:etag) + @state_metadata = args[:state_metadata] if args.key?(:state_metadata) + end + end + + # Contains an operation for a resource loosely based on the JSON-PATCH format + # with support for: + # * Custom filters for describing partial array patch. + # * Extended path values for describing nested arrays. + # * Custom fields for describing the resource for which the operation is being + # described. + # * Allows extension to custom operations not natively supported by RFC6902. + # See https://tools.ietf.org/html/rfc6902 for details on the original RFC. + class GoogleCloudRecommenderV1beta1Operation + include Google::Apis::Core::Hashable + + # Type of this operation. Contains one of 'and', 'remove', 'replace', 'move', + # 'copy', 'test' and custom operations. This field is case-insensitive and + # always populated. + # Corresponds to the JSON property `action` + # @return [String] + attr_accessor :action + + # Path to the target field being operated on. If the operation is at the + # resource level, then path should be "/". This field is always populated. + # Corresponds to the JSON property `path` + # @return [String] + attr_accessor :path + + # Set of filters to apply if `path` refers to array elements or nested array + # elements in order to narrow down to a single unique element that is being + # tested/modified. + # This is intended to be an exact match per filter. To perform advanced + # matching, use path_value_matchers. + # * Example: ` + # "/versions/*/name" : "it-123" + # "/versions/*/targetSize/percent": 20 + # ` + # * Example: ` + # "/bindings/*/role": "roles/admin" + # "/bindings/*/condition" : null + # ` + # * Example: ` + # "/bindings/*/role": "roles/admin" + # "/bindings/*/members/*" : ["x@google.com", "y@google.com"] + # ` + # When both path_filters and path_value_matchers are set, an implicit AND + # must be performed. + # Corresponds to the JSON property `pathFilters` + # @return [Hash] + attr_accessor :path_filters + + # Similar to path_filters, this contains set of filters to apply if `path` + # field referes to array elements. This is meant to support value matching + # beyond exact match. To perform exact match, use path_filters. + # When both path_filters and path_value_matchers are set, an implicit AND + # must be performed. + # Corresponds to the JSON property `pathValueMatchers` + # @return [Hash] + attr_accessor :path_value_matchers + + # Contains the fully qualified resource name. This field is always populated. + # ex: //cloudresourcemanager.googleapis.com/projects/foo. + # Corresponds to the JSON property `resource` + # @return [String] + attr_accessor :resource + + # Type of GCP resource being modified/tested. This field is always populated. + # Example: cloudresourcemanager.googleapis.com/Project, + # compute.googleapis.com/Instance + # Corresponds to the JSON property `resourceType` + # @return [String] + attr_accessor :resource_type + + # Can be set with action 'copy' or 'move' to indicate the source field within + # resource or source_resource, ignored if provided for other operation types. + # Corresponds to the JSON property `sourcePath` + # @return [String] + attr_accessor :source_path + + # Can be set with action 'copy' to copy resource configuration across + # different resources of the same type. Example: A resource clone can be + # done via action = 'copy', path = "/", from = "/", + # source_resource = and resource_name = . + # This field is empty for all other values of `action`. + # Corresponds to the JSON property `sourceResource` + # @return [String] + attr_accessor :source_resource + + # Value for the `path` field. Will be set for actions:'add'/'replace'. + # Maybe set for action: 'test'. Either this or `value_matcher` will be set + # for 'test' operation. An exact match must be performed. + # Corresponds to the JSON property `value` + # @return [Object] + attr_accessor :value + + # Contains various matching options for values for a GCP resource field. + # Corresponds to the JSON property `valueMatcher` + # @return [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1ValueMatcher] + attr_accessor :value_matcher + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @action = args[:action] if args.key?(:action) + @path = args[:path] if args.key?(:path) + @path_filters = args[:path_filters] if args.key?(:path_filters) + @path_value_matchers = args[:path_value_matchers] if args.key?(:path_value_matchers) + @resource = args[:resource] if args.key?(:resource) + @resource_type = args[:resource_type] if args.key?(:resource_type) + @source_path = args[:source_path] if args.key?(:source_path) + @source_resource = args[:source_resource] if args.key?(:source_resource) + @value = args[:value] if args.key?(:value) + @value_matcher = args[:value_matcher] if args.key?(:value_matcher) + end + end + + # Group of operations that need to be performed atomically. + class GoogleCloudRecommenderV1beta1OperationGroup + include Google::Apis::Core::Hashable + + # List of operations across one or more resources that belong to this group. + # Loosely based on RFC6902 and should be performed in the order they appear. + # Corresponds to the JSON property `operations` + # @return [Array] + attr_accessor :operations + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @operations = args[:operations] if args.key?(:operations) + end + end + + # A recommendation along with a suggested action. E.g., a rightsizing + # recommendation for an underutilized VM, IAM role recommendations, etc + class GoogleCloudRecommenderV1beta1Recommendation + include Google::Apis::Core::Hashable + + # Optional set of additional impact that this recommendation may have when + # trying to optimize for the primary category. These may be positive + # or negative. + # Corresponds to the JSON property `additionalImpact` + # @return [Array] + attr_accessor :additional_impact + + # Contains what resources are changing and how they are changing. + # Corresponds to the JSON property `content` + # @return [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1RecommendationContent] + attr_accessor :content + + # Free-form human readable summary in English. The maximum length is 500 + # characters. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # Fingerprint of the Recommendation. Provides optimistic locking when + # updating states. + # Corresponds to the JSON property `etag` + # @return [String] + attr_accessor :etag + + # Last time this recommendation was refreshed by the system that created it + # in the first place. + # Corresponds to the JSON property `lastRefreshTime` + # @return [String] + attr_accessor :last_refresh_time + + # Name of recommendation. + # A project recommendation is represented as + # projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/ + # recommendations/[RECOMMENDATION_ID] + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Contains the impact a recommendation can have for a given category. + # Corresponds to the JSON property `primaryImpact` + # @return [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Impact] + attr_accessor :primary_impact + + # Contains an identifier for a subtype of recommendations produced for the + # same recommender. Subtype is a function of content and impact, meaning a + # new subtype might be added when significant changes to `content` or + # `primary_impact.category` are introduced. See the Recommenders section + # to see a list of subtypes for a given Recommender. + # Examples: + # For recommender = "google.iam.policy.Recommender", + # recommender_subtype can be one of "REMOVE_ROLE"/"REPLACE_ROLE" + # Corresponds to the JSON property `recommenderSubtype` + # @return [String] + attr_accessor :recommender_subtype + + # Information for state. Contains state and metadata. + # Corresponds to the JSON property `stateInfo` + # @return [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1RecommendationStateInfo] + attr_accessor :state_info + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @additional_impact = args[:additional_impact] if args.key?(:additional_impact) + @content = args[:content] if args.key?(:content) + @description = args[:description] if args.key?(:description) + @etag = args[:etag] if args.key?(:etag) + @last_refresh_time = args[:last_refresh_time] if args.key?(:last_refresh_time) + @name = args[:name] if args.key?(:name) + @primary_impact = args[:primary_impact] if args.key?(:primary_impact) + @recommender_subtype = args[:recommender_subtype] if args.key?(:recommender_subtype) + @state_info = args[:state_info] if args.key?(:state_info) + end + end + + # Contains what resources are changing and how they are changing. + class GoogleCloudRecommenderV1beta1RecommendationContent + include Google::Apis::Core::Hashable + + # Operations to one or more Google Cloud resources grouped in such a way + # that, all operations within one group are expected to be performed + # atomically and in an order. + # Corresponds to the JSON property `operationGroups` + # @return [Array] + attr_accessor :operation_groups + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @operation_groups = args[:operation_groups] if args.key?(:operation_groups) + end + end + + # Information for state. Contains state and metadata. + class GoogleCloudRecommenderV1beta1RecommendationStateInfo + include Google::Apis::Core::Hashable + + # The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED. + # Corresponds to the JSON property `state` + # @return [String] + attr_accessor :state + + # A map of metadata for the state, provided by user or automations systems. + # Corresponds to the JSON property `stateMetadata` + # @return [Hash] + attr_accessor :state_metadata + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @state = args[:state] if args.key?(:state) + @state_metadata = args[:state_metadata] if args.key?(:state_metadata) + end + end + + # Contains various matching options for values for a GCP resource field. + class GoogleCloudRecommenderV1beta1ValueMatcher + include Google::Apis::Core::Hashable + + # To be used for full regex matching. The regular expression is using the + # Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be + # used with RE2::FullMatch + # Corresponds to the JSON property `matchesPattern` + # @return [String] + attr_accessor :matches_pattern + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @matches_pattern = args[:matches_pattern] if args.key?(:matches_pattern) + end + end + + # Represents an amount of money with its currency type. + class GoogleTypeMoney + include Google::Apis::Core::Hashable + + # The 3-letter currency code defined in ISO 4217. + # Corresponds to the JSON property `currencyCode` + # @return [String] + attr_accessor :currency_code + + # Number of nano (10^-9) units of the amount. + # The value must be between -999,999,999 and +999,999,999 inclusive. + # If `units` is positive, `nanos` must be positive or zero. + # If `units` is zero, `nanos` can be positive, zero, or negative. + # If `units` is negative, `nanos` must be negative or zero. + # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. + # Corresponds to the JSON property `nanos` + # @return [Fixnum] + attr_accessor :nanos + + # The whole units of the amount. + # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. + # Corresponds to the JSON property `units` + # @return [Fixnum] + attr_accessor :units + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @currency_code = args[:currency_code] if args.key?(:currency_code) + @nanos = args[:nanos] if args.key?(:nanos) + @units = args[:units] if args.key?(:units) + end + end + end + end +end diff --git a/generated/google/apis/recommender_v1beta1/representations.rb b/generated/google/apis/recommender_v1beta1/representations.rb new file mode 100644 index 000000000..1de117a67 --- /dev/null +++ b/generated/google/apis/recommender_v1beta1/representations.rb @@ -0,0 +1,232 @@ +# 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 RecommenderV1beta1 + + class GoogleCloudRecommenderV1beta1CostProjection + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRecommenderV1beta1Impact + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRecommenderV1beta1ListRecommendationsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRecommenderV1beta1MarkRecommendationClaimedRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRecommenderV1beta1MarkRecommendationFailedRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRecommenderV1beta1MarkRecommendationSucceededRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRecommenderV1beta1Operation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRecommenderV1beta1OperationGroup + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRecommenderV1beta1Recommendation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRecommenderV1beta1RecommendationContent + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRecommenderV1beta1RecommendationStateInfo + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRecommenderV1beta1ValueMatcher + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleTypeMoney + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudRecommenderV1beta1CostProjection + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :cost, as: 'cost', class: Google::Apis::RecommenderV1beta1::GoogleTypeMoney, decorator: Google::Apis::RecommenderV1beta1::GoogleTypeMoney::Representation + + property :duration, as: 'duration' + end + end + + class GoogleCloudRecommenderV1beta1Impact + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :category, as: 'category' + property :cost_projection, as: 'costProjection', class: Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1CostProjection, decorator: Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1CostProjection::Representation + + end + end + + class GoogleCloudRecommenderV1beta1ListRecommendationsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :recommendations, as: 'recommendations', class: Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation, decorator: Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation::Representation + + end + end + + class GoogleCloudRecommenderV1beta1MarkRecommendationClaimedRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :etag, as: 'etag' + hash :state_metadata, as: 'stateMetadata' + end + end + + class GoogleCloudRecommenderV1beta1MarkRecommendationFailedRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :etag, as: 'etag' + hash :state_metadata, as: 'stateMetadata' + end + end + + class GoogleCloudRecommenderV1beta1MarkRecommendationSucceededRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :etag, as: 'etag' + hash :state_metadata, as: 'stateMetadata' + end + end + + class GoogleCloudRecommenderV1beta1Operation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :action, as: 'action' + property :path, as: 'path' + hash :path_filters, as: 'pathFilters' + hash :path_value_matchers, as: 'pathValueMatchers', class: Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1ValueMatcher, decorator: Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1ValueMatcher::Representation + + property :resource, as: 'resource' + property :resource_type, as: 'resourceType' + property :source_path, as: 'sourcePath' + property :source_resource, as: 'sourceResource' + property :value, as: 'value' + property :value_matcher, as: 'valueMatcher', class: Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1ValueMatcher, decorator: Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1ValueMatcher::Representation + + end + end + + class GoogleCloudRecommenderV1beta1OperationGroup + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :operations, as: 'operations', class: Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Operation, decorator: Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Operation::Representation + + end + end + + class GoogleCloudRecommenderV1beta1Recommendation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :additional_impact, as: 'additionalImpact', class: Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Impact, decorator: Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Impact::Representation + + property :content, as: 'content', class: Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1RecommendationContent, decorator: Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1RecommendationContent::Representation + + property :description, as: 'description' + property :etag, as: 'etag' + property :last_refresh_time, as: 'lastRefreshTime' + property :name, as: 'name' + property :primary_impact, as: 'primaryImpact', class: Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Impact, decorator: Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Impact::Representation + + property :recommender_subtype, as: 'recommenderSubtype' + property :state_info, as: 'stateInfo', class: Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1RecommendationStateInfo, decorator: Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1RecommendationStateInfo::Representation + + end + end + + class GoogleCloudRecommenderV1beta1RecommendationContent + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :operation_groups, as: 'operationGroups', class: Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1OperationGroup, decorator: Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1OperationGroup::Representation + + end + end + + class GoogleCloudRecommenderV1beta1RecommendationStateInfo + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :state, as: 'state' + hash :state_metadata, as: 'stateMetadata' + end + end + + class GoogleCloudRecommenderV1beta1ValueMatcher + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :matches_pattern, as: 'matchesPattern' + end + end + + class GoogleTypeMoney + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :currency_code, as: 'currencyCode' + property :nanos, as: 'nanos' + property :units, :numeric_string => true, as: 'units' + end + end + end + end +end diff --git a/generated/google/apis/recommender_v1beta1/service.rb b/generated/google/apis/recommender_v1beta1/service.rb new file mode 100644 index 000000000..c703d0b0d --- /dev/null +++ b/generated/google/apis/recommender_v1beta1/service.rb @@ -0,0 +1,262 @@ +# 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 RecommenderV1beta1 + # Recommender API + # + # + # + # @example + # require 'google/apis/recommender_v1beta1' + # + # Recommender = Google::Apis::RecommenderV1beta1 # Alias the module + # service = Recommender::RecommenderService.new + # + # @see https://cloud.google.com/recommender/docs/ + class RecommenderService < Google::Apis::Core::BaseService + # @return [String] + # API key. Your API key identifies your project and provides you with API access, + # quota, and reports. Required unless you provide an OAuth 2.0 token. + attr_accessor :key + + # @return [String] + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + attr_accessor :quota_user + + def initialize + super('https://recommender.googleapis.com/', '') + @batch_path = 'batch' + end + + # Gets the requested recommendation. Requires the recommender.*.get + # IAM permission for the specified recommender. + # @param [String] name + # Name of the recommendation. + # @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::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation] + # + # @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_recommender_recommendation(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+name}', options) + command.response_representation = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation::Representation + command.response_class = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists recommendations for a Cloud project. Requires the recommender.*.list + # IAM permission for the specified recommender. + # @param [String] parent + # Required. The container resource on which to execute the request. + # Acceptable formats: + # 1. + # "projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]", + # LOCATION here refers to GCP Locations: + # https://cloud.google.com/about/locations/ + # @param [String] filter + # Filter expression to restrict the recommendations returned. Supported + # filter fields: state_info.state + # Eg: `state_info.state:"DISMISSED" or state_info.state:"FAILED" + # @param [Fixnum] page_size + # Optional. The maximum number of results to return from this request. + # Non-positive values are ignored. If not specified, the server will + # determine the number of results to return. + # @param [String] page_token + # Optional. If present, retrieves the next batch of results from the + # preceding call to this method. `page_token` must be the value of + # `next_page_token` from the previous response. The values of other method + # parameters must be identical to those in the previous call. + # @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::RecommenderV1beta1::GoogleCloudRecommenderV1beta1ListRecommendationsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1ListRecommendationsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_location_recommender_recommendations(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+parent}/recommendations', options) + command.response_representation = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1ListRecommendationsResponse::Representation + command.response_class = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1ListRecommendationsResponse + command.params['parent'] = parent unless parent.nil? + command.query['filter'] = filter unless filter.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Mark the Recommendation State as Claimed. Users can use this method to + # indicate to the Recommender API that they are starting to apply the + # recommendation themselves. This stops the recommendation content from being + # updated. + # MarkRecommendationClaimed can be applied to recommendations in CLAIMED, + # SUCCEEDED, FAILED, or ACTIVE state. + # Requires the recommender.*.update IAM permission for the specified + # recommender. + # @param [String] name + # Name of the recommendation. + # @param [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1MarkRecommendationClaimedRequest] google_cloud_recommender_v1beta1_mark_recommendation_claimed_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation] + # + # @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 mark_project_location_recommender_recommendation_claimed(name, google_cloud_recommender_v1beta1_mark_recommendation_claimed_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+name}:markClaimed', options) + command.request_representation = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1MarkRecommendationClaimedRequest::Representation + command.request_object = google_cloud_recommender_v1beta1_mark_recommendation_claimed_request_object + command.response_representation = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation::Representation + command.response_class = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation + 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 + + # Mark the Recommendation State as Failed. Users can use this method to + # indicate to the Recommender API that they have applied the recommendation + # themselves, and the operation failed. This stops the recommendation content + # from being updated. + # MarkRecommendationFailed can be applied to recommendations in ACTIVE, + # CLAIMED, SUCCEEDED, or FAILED state. + # Requires the recommender.*.update IAM permission for the specified + # recommender. + # @param [String] name + # Name of the recommendation. + # @param [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1MarkRecommendationFailedRequest] google_cloud_recommender_v1beta1_mark_recommendation_failed_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation] + # + # @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 mark_project_location_recommender_recommendation_failed(name, google_cloud_recommender_v1beta1_mark_recommendation_failed_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+name}:markFailed', options) + command.request_representation = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1MarkRecommendationFailedRequest::Representation + command.request_object = google_cloud_recommender_v1beta1_mark_recommendation_failed_request_object + command.response_representation = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation::Representation + command.response_class = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation + 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 + + # Mark the Recommendation State as Succeeded. Users can use this method to + # indicate to the Recommender API that they have applied the recommendation + # themselves, and the operation was successful. This stops the recommendation + # content from being updated. + # MarkRecommendationSucceeded can be applied to recommendations in ACTIVE, + # CLAIMED, SUCCEEDED, or FAILED state. + # Requires the recommender.*.update IAM permission for the specified + # recommender. + # @param [String] name + # Name of the recommendation. + # @param [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1MarkRecommendationSucceededRequest] google_cloud_recommender_v1beta1_mark_recommendation_succeeded_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation] + # + # @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 mark_project_location_recommender_recommendation_succeeded(name, google_cloud_recommender_v1beta1_mark_recommendation_succeeded_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+name}:markSucceeded', options) + command.request_representation = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1MarkRecommendationSucceededRequest::Representation + command.request_object = google_cloud_recommender_v1beta1_mark_recommendation_succeeded_request_object + command.response_representation = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation::Representation + command.response_class = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation + 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 + + protected + + def apply_command_defaults(command) + command.query['key'] = key unless key.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + end + end + end + end +end diff --git a/generated/google/apis/run_v1beta1.rb b/generated/google/apis/run_v1beta1.rb new file mode 100644 index 000000000..48c143283 --- /dev/null +++ b/generated/google/apis/run_v1beta1.rb @@ -0,0 +1,35 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'google/apis/run_v1beta1/service.rb' +require 'google/apis/run_v1beta1/classes.rb' +require 'google/apis/run_v1beta1/representations.rb' + +module Google + module Apis + # Cloud Run API + # + # Deploy and manage user provided container images that scale automatically + # based on HTTP traffic. + # + # @see https://cloud.google.com/run/ + module RunV1beta1 + VERSION = 'V1beta1' + REVISION = '20190920' + + # View and manage your data across Google Cloud Platform services + AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' + end + end +end diff --git a/generated/google/apis/run_v1beta1/classes.rb b/generated/google/apis/run_v1beta1/classes.rb new file mode 100644 index 000000000..6441c642e --- /dev/null +++ b/generated/google/apis/run_v1beta1/classes.rb @@ -0,0 +1,1209 @@ +# 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 RunV1beta1 + + # CustomResourceColumnDefinition specifies a column for server side printing. + class CustomResourceColumnDefinition + include Google::Apis::Core::Hashable + + # description is a human readable description of this column. + # +optional + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # format is an optional OpenAPI type definition for this column. The 'name' + # format is applied to the primary identifier column to assist in clients + # identifying column is the resource name. See + # https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data- + # types + # for more. +optional + # Corresponds to the JSON property `format` + # @return [String] + attr_accessor :format + + # JSONPath is a simple JSON path, i.e. with array notation. + # Corresponds to the JSON property `jsonPath` + # @return [String] + attr_accessor :json_path + + # name is a human readable name for the column. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # priority is an integer defining the relative importance of this column + # compared to others. Lower numbers are considered higher priority. Columns + # that may be omitted in limited space scenarios should be given a higher + # priority. +optional + # Corresponds to the JSON property `priority` + # @return [Fixnum] + attr_accessor :priority + + # type is an OpenAPI type definition for this column. + # See + # https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data- + # types + # for more. + # 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) + @description = args[:description] if args.key?(:description) + @format = args[:format] if args.key?(:format) + @json_path = args[:json_path] if args.key?(:json_path) + @name = args[:name] if args.key?(:name) + @priority = args[:priority] if args.key?(:priority) + @type = args[:type] if args.key?(:type) + end + end + + # CustomResourceDefinition represents a resource that should be exposed on the + # API server. Its name MUST be in the format + # <.spec.name>.<.spec.group>. + class CustomResourceDefinition + include Google::Apis::Core::Hashable + + # The API version for this call such as "k8s.apiextensions.io/v1beta1". + # Corresponds to the JSON property `apiVersion` + # @return [String] + attr_accessor :api_version + + # The kind of resource, one example is "Storage". + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # ObjectMeta is metadata that all persisted resources must have, which includes + # all objects users must create. + # Corresponds to the JSON property `metadata` + # @return [Google::Apis::RunV1beta1::ObjectMeta] + attr_accessor :metadata + + # CustomResourceDefinitionSpec describes how a user wants their resource to + # appear + # Corresponds to the JSON property `spec` + # @return [Google::Apis::RunV1beta1::CustomResourceDefinitionSpec] + attr_accessor :spec + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @api_version = args[:api_version] if args.key?(:api_version) + @kind = args[:kind] if args.key?(:kind) + @metadata = args[:metadata] if args.key?(:metadata) + @spec = args[:spec] if args.key?(:spec) + end + end + + # CustomResourceDefinitionNames indicates the names to serve this + # CustomResourceDefinition + class CustomResourceDefinitionNames + include Google::Apis::Core::Hashable + + # Categories is a list of grouped resources custom resources belong to (e.g. + # 'all') +optional + # Corresponds to the JSON property `categories` + # @return [Array] + attr_accessor :categories + + # Kind is the serialized kind of the resource. It is normally CamelCase and + # singular. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # ListKind is the serialized kind of the list for this resource. Defaults to + # List. +optional + # Corresponds to the JSON property `listKind` + # @return [String] + attr_accessor :list_kind + + # Plural is the plural name of the resource to serve. It must match the name + # of the CustomResourceDefinition-registration too: plural.group and it must + # be all lowercase. + # Corresponds to the JSON property `plural` + # @return [String] + attr_accessor :plural + + # ShortNames are short names for the resource. It must be all lowercase. + # +optional + # Corresponds to the JSON property `shortNames` + # @return [Array] + attr_accessor :short_names + + # Singular is the singular name of the resource. It must be all lowercase + # Defaults to lowercased +optional + # Corresponds to the JSON property `singular` + # @return [String] + attr_accessor :singular + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @categories = args[:categories] if args.key?(:categories) + @kind = args[:kind] if args.key?(:kind) + @list_kind = args[:list_kind] if args.key?(:list_kind) + @plural = args[:plural] if args.key?(:plural) + @short_names = args[:short_names] if args.key?(:short_names) + @singular = args[:singular] if args.key?(:singular) + end + end + + # CustomResourceDefinitionSpec describes how a user wants their resource to + # appear + class CustomResourceDefinitionSpec + include Google::Apis::Core::Hashable + + # AdditionalPrinterColumns are additional columns shown e.g. in kubectl next + # to the name. Defaults to a created-at column. +optional + # Corresponds to the JSON property `additionalPrinterColumns` + # @return [Array] + attr_accessor :additional_printer_columns + + # Group is the group this resource belongs in + # Corresponds to the JSON property `group` + # @return [String] + attr_accessor :group + + # CustomResourceDefinitionNames indicates the names to serve this + # CustomResourceDefinition + # Corresponds to the JSON property `names` + # @return [Google::Apis::RunV1beta1::CustomResourceDefinitionNames] + attr_accessor :names + + # Scope indicates whether this resource is cluster or namespace scoped. + # Default is namespaced + # Corresponds to the JSON property `scope` + # @return [String] + attr_accessor :scope + + # CustomResourceSubresources defines the status and scale subresources for + # CustomResources. + # Corresponds to the JSON property `subresources` + # @return [Google::Apis::RunV1beta1::CustomResourceSubresources] + attr_accessor :subresources + + # CustomResourceValidation is a list of validation methods for CustomResources. + # Corresponds to the JSON property `validation` + # @return [Google::Apis::RunV1beta1::CustomResourceValidation] + attr_accessor :validation + + # Version is the version this resource belongs in + # Should be always first item in Versions field if provided. + # Optional, but at least one of Version or Versions must be set. + # Deprecated: Please use `Versions`. + # +optional + # Corresponds to the JSON property `version` + # @return [String] + attr_accessor :version + + # Versions is the list of all supported versions for this resource. + # If Version field is provided, this field is optional. + # Validation: All versions must use the same validation schema for now. i.e., + # top level Validation field is applied to all of these versions. Order: The + # version name will be used to compute the order. If the version string is + # "kube-like", it will sort above non "kube-like" version strings, which are + # ordered lexicographically. "Kube-like" versions start with a "v", then are + # followed by a number (the major version), then optionally the string + # "alpha" or "beta" and another number (the minor version). These are sorted + # first by GA > beta > alpha (where GA is a version with no suffix such as + # beta or alpha), and then by comparing major version, then minor version. An + # example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, + # v12alpha1, v11alpha2, foo1, foo10. +optional + # Corresponds to the JSON property `versions` + # @return [Array] + attr_accessor :versions + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @additional_printer_columns = args[:additional_printer_columns] if args.key?(:additional_printer_columns) + @group = args[:group] if args.key?(:group) + @names = args[:names] if args.key?(:names) + @scope = args[:scope] if args.key?(:scope) + @subresources = args[:subresources] if args.key?(:subresources) + @validation = args[:validation] if args.key?(:validation) + @version = args[:version] if args.key?(:version) + @versions = args[:versions] if args.key?(:versions) + end + end + + # + class CustomResourceDefinitionVersion + include Google::Apis::Core::Hashable + + # Name is the version name, e.g. “v1”, “v2beta1”, etc. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Served is a flag enabling/disabling this version from being served via REST + # APIs + # Corresponds to the JSON property `served` + # @return [Boolean] + attr_accessor :served + alias_method :served?, :served + + # Storage flags the version as storage version. There must be exactly one + # flagged as storage version. + # Corresponds to the JSON property `storage` + # @return [Boolean] + attr_accessor :storage + alias_method :storage?, :storage + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @name = args[:name] if args.key?(:name) + @served = args[:served] if args.key?(:served) + @storage = args[:storage] if args.key?(:storage) + end + end + + # CustomResourceSubresourceScale defines how to serve the scale subresource for + # CustomResources. + class CustomResourceSubresourceScale + include Google::Apis::Core::Hashable + + # LabelSelectorPath defines the JSON path inside of a CustomResource that + # corresponds to Scale.Status.Selector. Only JSON paths without the array + # notation are allowed. Must be a JSON Path under .status. Must be set to + # work with HPA. If there is no value under the given path in the + # CustomResource, the status label selector value in the /scale subresource + # will default to the empty string. +optional + # Corresponds to the JSON property `labelSelectorPath` + # @return [String] + attr_accessor :label_selector_path + + # SpecReplicasPath defines the JSON path inside of a CustomResource that + # corresponds to Scale.Spec.Replicas. Only JSON paths without the array + # notation are allowed. Must be a JSON Path under .spec. If there is no value + # under the given path in the CustomResource, the /scale subresource will + # return an error on GET. + # Corresponds to the JSON property `specReplicasPath` + # @return [String] + attr_accessor :spec_replicas_path + + # StatusReplicasPath defines the JSON path inside of a CustomResource that + # corresponds to Scale.Status.Replicas. Only JSON paths without the array + # notation are allowed. Must be a JSON Path under .status. If there is no + # value under the given path in the CustomResource, the status replica value + # in the /scale subresource will default to 0. + # Corresponds to the JSON property `statusReplicasPath` + # @return [String] + attr_accessor :status_replicas_path + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @label_selector_path = args[:label_selector_path] if args.key?(:label_selector_path) + @spec_replicas_path = args[:spec_replicas_path] if args.key?(:spec_replicas_path) + @status_replicas_path = args[:status_replicas_path] if args.key?(:status_replicas_path) + end + end + + # CustomResourceSubresourceStatus defines how to serve the status subresource + # for CustomResources. Status is represented by the `.status` JSON path inside + # of a CustomResource. When set, + # * exposes a /status subresource for the custom resource + # * PUT requests to the /status subresource take a custom resource object, and + # ignore changes to anything except the status stanza + # * PUT/POST/PATCH requests to the custom resource ignore changes to the status + # stanza + class CustomResourceSubresourceStatus + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # CustomResourceSubresources defines the status and scale subresources for + # CustomResources. + class CustomResourceSubresources + include Google::Apis::Core::Hashable + + # CustomResourceSubresourceScale defines how to serve the scale subresource for + # CustomResources. + # Corresponds to the JSON property `scale` + # @return [Google::Apis::RunV1beta1::CustomResourceSubresourceScale] + attr_accessor :scale + + # CustomResourceSubresourceStatus defines how to serve the status subresource + # for CustomResources. Status is represented by the `.status` JSON path inside + # of a CustomResource. When set, + # * exposes a /status subresource for the custom resource + # * PUT requests to the /status subresource take a custom resource object, and + # ignore changes to anything except the status stanza + # * PUT/POST/PATCH requests to the custom resource ignore changes to the status + # stanza + # Corresponds to the JSON property `status` + # @return [Google::Apis::RunV1beta1::CustomResourceSubresourceStatus] + attr_accessor :status + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @scale = args[:scale] if args.key?(:scale) + @status = args[:status] if args.key?(:status) + end + end + + # CustomResourceValidation is a list of validation methods for CustomResources. + class CustomResourceValidation + include Google::Apis::Core::Hashable + + # JSONSchemaProps is a JSON-Schema following Specification Draft 4 + # (http://json-schema.org/). + # Corresponds to the JSON property `openAPIV3Schema` + # @return [Google::Apis::RunV1beta1::JsonSchemaProps] + attr_accessor :open_apiv3_schema + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @open_apiv3_schema = args[:open_apiv3_schema] if args.key?(:open_apiv3_schema) + end + end + + # ExternalDocumentation allows referencing an external resource for extended + # documentation. + class ExternalDocumentation + include Google::Apis::Core::Hashable + + # + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # + # Corresponds to the JSON property `url` + # @return [String] + attr_accessor :url + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @description = args[:description] if args.key?(:description) + @url = args[:url] if args.key?(:url) + end + end + + # Initializer is information about an initializer that has not yet completed. + class Initializer + include Google::Apis::Core::Hashable + + # name of the process that is responsible for initializing this object. + # 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) + @name = args[:name] if args.key?(:name) + end + end + + # Initializers tracks the progress of initialization. + class Initializers + include Google::Apis::Core::Hashable + + # Pending is a list of initializers that must execute in order before this + # object is visible. When the last pending initializer is removed, and no + # failing result is set, the initializers struct will be set to nil and the + # object is considered as initialized and visible to all clients. + # +patchMergeKey=name + # +patchStrategy=merge + # Corresponds to the JSON property `pending` + # @return [Array] + attr_accessor :pending + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @pending = args[:pending] if args.key?(:pending) + end + end + + # JSON represents any valid JSON value. + # These types are supported: bool, int64, float64, string, []interface``, + # map[string]interface`` and nil. + class Json + include Google::Apis::Core::Hashable + + # + # Corresponds to the JSON property `raw` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :raw + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @raw = args[:raw] if args.key?(:raw) + end + end + + # JSONSchemaProps is a JSON-Schema following Specification Draft 4 + # (http://json-schema.org/). + class JsonSchemaProps + include Google::Apis::Core::Hashable + + # JSONSchemaPropsOrBool represents JSONSchemaProps or a boolean value. + # Defaults to true for the boolean property. + # Corresponds to the JSON property `additionalItems` + # @return [Google::Apis::RunV1beta1::JsonSchemaPropsOrBool] + attr_accessor :additional_items + + # JSONSchemaPropsOrBool represents JSONSchemaProps or a boolean value. + # Defaults to true for the boolean property. + # Corresponds to the JSON property `additionalProperties` + # @return [Google::Apis::RunV1beta1::JsonSchemaPropsOrBool] + attr_accessor :additional_properties + + # + # Corresponds to the JSON property `allOf` + # @return [Array] + attr_accessor :all_of + + # + # Corresponds to the JSON property `anyOf` + # @return [Array] + attr_accessor :any_of + + # JSON represents any valid JSON value. + # These types are supported: bool, int64, float64, string, []interface``, + # map[string]interface`` and nil. + # Corresponds to the JSON property `default` + # @return [Google::Apis::RunV1beta1::Json] + attr_accessor :default + + # + # Corresponds to the JSON property `definitions` + # @return [Hash] + attr_accessor :definitions + + # + # Corresponds to the JSON property `dependencies` + # @return [Hash] + attr_accessor :dependencies + + # + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # + # Corresponds to the JSON property `enum` + # @return [Array] + attr_accessor :enum + + # JSON represents any valid JSON value. + # These types are supported: bool, int64, float64, string, []interface``, + # map[string]interface`` and nil. + # Corresponds to the JSON property `example` + # @return [Google::Apis::RunV1beta1::Json] + attr_accessor :example + + # + # Corresponds to the JSON property `exclusiveMaximum` + # @return [Boolean] + attr_accessor :exclusive_maximum + alias_method :exclusive_maximum?, :exclusive_maximum + + # + # Corresponds to the JSON property `exclusiveMinimum` + # @return [Boolean] + attr_accessor :exclusive_minimum + alias_method :exclusive_minimum?, :exclusive_minimum + + # ExternalDocumentation allows referencing an external resource for extended + # documentation. + # Corresponds to the JSON property `externalDocs` + # @return [Google::Apis::RunV1beta1::ExternalDocumentation] + attr_accessor :external_docs + + # + # Corresponds to the JSON property `format` + # @return [String] + attr_accessor :format + + # + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # JSONSchemaPropsOrArray represents a value that can either be a + # JSONSchemaProps or an array of JSONSchemaProps. Mainly here for serialization + # purposes. + # Corresponds to the JSON property `items` + # @return [Google::Apis::RunV1beta1::JsonSchemaPropsOrArray] + attr_accessor :items + + # + # Corresponds to the JSON property `maxItems` + # @return [Fixnum] + attr_accessor :max_items + + # + # Corresponds to the JSON property `maxLength` + # @return [Fixnum] + attr_accessor :max_length + + # + # Corresponds to the JSON property `maxProperties` + # @return [Fixnum] + attr_accessor :max_properties + + # + # Corresponds to the JSON property `maximum` + # @return [Float] + attr_accessor :maximum + + # + # Corresponds to the JSON property `minItems` + # @return [Fixnum] + attr_accessor :min_items + + # + # Corresponds to the JSON property `minLength` + # @return [Fixnum] + attr_accessor :min_length + + # + # Corresponds to the JSON property `minProperties` + # @return [Fixnum] + attr_accessor :min_properties + + # + # Corresponds to the JSON property `minimum` + # @return [Float] + attr_accessor :minimum + + # + # Corresponds to the JSON property `multipleOf` + # @return [Float] + attr_accessor :multiple_of + + # JSONSchemaProps is a JSON-Schema following Specification Draft 4 + # (http://json-schema.org/). + # Corresponds to the JSON property `not` + # @return [Google::Apis::RunV1beta1::JsonSchemaProps] + attr_accessor :not + + # + # Corresponds to the JSON property `oneOf` + # @return [Array] + attr_accessor :one_of + + # + # Corresponds to the JSON property `pattern` + # @return [String] + attr_accessor :pattern + + # + # Corresponds to the JSON property `patternProperties` + # @return [Hash] + attr_accessor :pattern_properties + + # + # Corresponds to the JSON property `properties` + # @return [Hash] + attr_accessor :properties + + # + # Corresponds to the JSON property `ref` + # @return [String] + attr_accessor :ref + + # + # Corresponds to the JSON property `required` + # @return [Array] + attr_accessor :required + + # + # Corresponds to the JSON property `schema` + # @return [String] + attr_accessor :schema + + # + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + # + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # + # Corresponds to the JSON property `uniqueItems` + # @return [Boolean] + attr_accessor :unique_items + alias_method :unique_items?, :unique_items + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @additional_items = args[:additional_items] if args.key?(:additional_items) + @additional_properties = args[:additional_properties] if args.key?(:additional_properties) + @all_of = args[:all_of] if args.key?(:all_of) + @any_of = args[:any_of] if args.key?(:any_of) + @default = args[:default] if args.key?(:default) + @definitions = args[:definitions] if args.key?(:definitions) + @dependencies = args[:dependencies] if args.key?(:dependencies) + @description = args[:description] if args.key?(:description) + @enum = args[:enum] if args.key?(:enum) + @example = args[:example] if args.key?(:example) + @exclusive_maximum = args[:exclusive_maximum] if args.key?(:exclusive_maximum) + @exclusive_minimum = args[:exclusive_minimum] if args.key?(:exclusive_minimum) + @external_docs = args[:external_docs] if args.key?(:external_docs) + @format = args[:format] if args.key?(:format) + @id = args[:id] if args.key?(:id) + @items = args[:items] if args.key?(:items) + @max_items = args[:max_items] if args.key?(:max_items) + @max_length = args[:max_length] if args.key?(:max_length) + @max_properties = args[:max_properties] if args.key?(:max_properties) + @maximum = args[:maximum] if args.key?(:maximum) + @min_items = args[:min_items] if args.key?(:min_items) + @min_length = args[:min_length] if args.key?(:min_length) + @min_properties = args[:min_properties] if args.key?(:min_properties) + @minimum = args[:minimum] if args.key?(:minimum) + @multiple_of = args[:multiple_of] if args.key?(:multiple_of) + @not = args[:not] if args.key?(:not) + @one_of = args[:one_of] if args.key?(:one_of) + @pattern = args[:pattern] if args.key?(:pattern) + @pattern_properties = args[:pattern_properties] if args.key?(:pattern_properties) + @properties = args[:properties] if args.key?(:properties) + @ref = args[:ref] if args.key?(:ref) + @required = args[:required] if args.key?(:required) + @schema = args[:schema] if args.key?(:schema) + @title = args[:title] if args.key?(:title) + @type = args[:type] if args.key?(:type) + @unique_items = args[:unique_items] if args.key?(:unique_items) + end + end + + # JSONSchemaPropsOrArray represents a value that can either be a + # JSONSchemaProps or an array of JSONSchemaProps. Mainly here for serialization + # purposes. + class JsonSchemaPropsOrArray + include Google::Apis::Core::Hashable + + # + # Corresponds to the JSON property `jsonSchemas` + # @return [Array] + attr_accessor :json_schemas + + # JSONSchemaProps is a JSON-Schema following Specification Draft 4 + # (http://json-schema.org/). + # Corresponds to the JSON property `schema` + # @return [Google::Apis::RunV1beta1::JsonSchemaProps] + attr_accessor :schema + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @json_schemas = args[:json_schemas] if args.key?(:json_schemas) + @schema = args[:schema] if args.key?(:schema) + end + end + + # JSONSchemaPropsOrBool represents JSONSchemaProps or a boolean value. + # Defaults to true for the boolean property. + class JsonSchemaPropsOrBool + include Google::Apis::Core::Hashable + + # + # Corresponds to the JSON property `allows` + # @return [Boolean] + attr_accessor :allows + alias_method :allows?, :allows + + # JSONSchemaProps is a JSON-Schema following Specification Draft 4 + # (http://json-schema.org/). + # Corresponds to the JSON property `schema` + # @return [Google::Apis::RunV1beta1::JsonSchemaProps] + attr_accessor :schema + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @allows = args[:allows] if args.key?(:allows) + @schema = args[:schema] if args.key?(:schema) + end + end + + # JSONSchemaPropsOrStringArray represents a JSONSchemaProps or a string array. + class JsonSchemaPropsOrStringArray + include Google::Apis::Core::Hashable + + # + # Corresponds to the JSON property `property` + # @return [Array] + attr_accessor :property + + # JSONSchemaProps is a JSON-Schema following Specification Draft 4 + # (http://json-schema.org/). + # Corresponds to the JSON property `schema` + # @return [Google::Apis::RunV1beta1::JsonSchemaProps] + attr_accessor :schema + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @property = args[:property] if args.key?(:property) + @schema = args[:schema] if args.key?(:schema) + end + end + + # + class ListCustomResourceDefinitionsResponse + include Google::Apis::Core::Hashable + + # The API version for this call such as "k8s.apiextensions.io/v1beta1". + # Corresponds to the JSON property `apiVersion` + # @return [String] + attr_accessor :api_version + + # List of CustomResourceDefinitions. + # Corresponds to the JSON property `items` + # @return [Array] + attr_accessor :items + + # The kind of this resource, in this case "CustomResourceDefinitionList". + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # ListMeta describes metadata that synthetic resources must have, including + # lists and various status objects. A resource may have only one of + # `ObjectMeta, ListMeta`. + # Corresponds to the JSON property `metadata` + # @return [Google::Apis::RunV1beta1::ListMeta] + attr_accessor :metadata + + # Locations that could not be reached. + # Corresponds to the JSON property `unreachable` + # @return [Array] + attr_accessor :unreachable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @api_version = args[:api_version] if args.key?(:api_version) + @items = args[:items] if args.key?(:items) + @kind = args[:kind] if args.key?(:kind) + @metadata = args[:metadata] if args.key?(:metadata) + @unreachable = args[:unreachable] if args.key?(:unreachable) + end + end + + # ListMeta describes metadata that synthetic resources must have, including + # lists and various status objects. A resource may have only one of + # `ObjectMeta, ListMeta`. + class ListMeta + include Google::Apis::Core::Hashable + + # continue may be set if the user set a limit on the number of items + # returned, and indicates that the server has more data available. The value + # is opaque and may be used to issue another request to the endpoint that + # served this list to retrieve the next set of available objects. Continuing + # a list may not be possible if the server configuration has changed or more + # than a few minutes have passed. The resourceVersion field returned when + # using this continue value will be identical to the value in the first + # response. + # Corresponds to the JSON property `continue` + # @return [String] + attr_accessor :continue + + # String that identifies the server's internal version of this object that + # can be used by clients to determine when objects have changed. Value must + # be treated as opaque by clients and passed unmodified back to the server. + # Populated by the system. + # Read-only. + # More info: + # https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency- + # control-and-consistency + # +optional + # Corresponds to the JSON property `resourceVersion` + # @return [String] + attr_accessor :resource_version + + # SelfLink is a URL representing this object. + # Populated by the system. + # Read-only. + # +optional + # 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) + @continue = args[:continue] if args.key?(:continue) + @resource_version = args[:resource_version] if args.key?(:resource_version) + @self_link = args[:self_link] if args.key?(:self_link) + end + end + + # ObjectMeta is metadata that all persisted resources must have, which includes + # all objects users must create. + class ObjectMeta + include Google::Apis::Core::Hashable + + # Annotations is an unstructured key value map stored with a resource that + # may be set by external tools to store and retrieve arbitrary metadata. They + # are not queryable and should be preserved when modifying objects. More + # info: http://kubernetes.io/docs/user-guide/annotations +optional + # Corresponds to the JSON property `annotations` + # @return [Hash] + attr_accessor :annotations + + # Not currently supported by Cloud Run. + # The name of the cluster which the object belongs to. + # This is used to distinguish resources with same name and namespace in + # different clusters. This field is not set anywhere right now and apiserver + # is going to ignore it if set in create or update request. +optional + # Corresponds to the JSON property `clusterName` + # @return [String] + attr_accessor :cluster_name + + # CreationTimestamp is a timestamp representing the server time when this + # object was created. It is not guaranteed to be set in happens-before order + # across separate operations. Clients may not set this value. It is + # represented in RFC3339 form and is in UTC. + # Populated by the system. + # Read-only. + # Null for lists. + # More info: + # https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + # +optional + # Corresponds to the JSON property `creationTimestamp` + # @return [String] + attr_accessor :creation_timestamp + + # Not currently supported by Cloud Run. + # Number of seconds allowed for this object to gracefully terminate before + # it will be removed from the system. Only set when deletionTimestamp is also + # set. May only be shortened. Read-only. +optional + # Corresponds to the JSON property `deletionGracePeriodSeconds` + # @return [Fixnum] + attr_accessor :deletion_grace_period_seconds + + # DeletionTimestamp is RFC 3339 date and time at which this resource will be + # deleted. This field is set by the server when a graceful deletion is + # requested by the user, and is not directly settable by a client. The + # resource is expected to be deleted (no longer visible from resource lists, + # and not reachable by name) after the time in this field, once the + # finalizers list is empty. As long as the finalizers list contains items, + # deletion is blocked. Once the deletionTimestamp is set, this value may not + # be unset or be set further into the future, although it may be shortened or + # the resource may be deleted prior to this time. For example, a user may + # request that a pod is deleted in 30 seconds. The Kubelet will react by + # sending a graceful termination signal to the containers in the pod. After + # that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) + # to the container and after cleanup, remove the pod from the API. In the + # presence of network partitions, this object may still exist after this + # timestamp, until an administrator or automated process can determine the + # resource is fully terminated. + # If not set, graceful deletion of the object has not been requested. + # Populated by the system when a graceful deletion is requested. + # Read-only. + # More info: + # https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + # +optional + # Corresponds to the JSON property `deletionTimestamp` + # @return [String] + attr_accessor :deletion_timestamp + + # Not currently supported by Cloud Run. + # Must be empty before the object is deleted from the registry. Each entry + # is an identifier for the responsible component that will remove the entry + # from the list. If the deletionTimestamp of the object is non-nil, entries + # in this list can only be removed. + # +optional + # +patchStrategy=merge + # Corresponds to the JSON property `finalizers` + # @return [Array] + attr_accessor :finalizers + + # Not currently supported by Cloud Run. + # GenerateName is an optional prefix, used by the server, to generate a + # unique name ONLY IF the Name field has not been provided. If this field is + # used, the name returned to the client will be different than the name + # passed. This value will also be combined with a unique suffix. The provided + # value has the same validation rules as the Name field, and may be truncated + # by the length of the suffix required to make the value unique on the + # server. + # If this field is specified and the generated name exists, the server will + # NOT return a 409 - instead, it will either return 201 Created or 500 with + # Reason ServerTimeout indicating a unique name could not be found in the + # time allotted, and the client should retry (optionally after the time + # indicated in the Retry-After header). + # Applied only if Name is not specified. + # More info: + # https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency + # +optional + # string generateName = 2; + # Corresponds to the JSON property `generateName` + # @return [String] + attr_accessor :generate_name + + # A sequence number representing a specific generation of the desired state. + # Populated by the system. Read-only. + # +optional + # Corresponds to the JSON property `generation` + # @return [Fixnum] + attr_accessor :generation + + # Initializers tracks the progress of initialization. + # Corresponds to the JSON property `initializers` + # @return [Google::Apis::RunV1beta1::Initializers] + attr_accessor :initializers + + # Map of string keys and values that can be used to organize and categorize + # (scope and select) objects. May match selectors of replication controllers + # and routes. + # More info: http://kubernetes.io/docs/user-guide/labels + # +optional + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # Name must be unique within a namespace, within a Cloud Run region. + # Is required when creating + # resources, although some resources may allow a client to request the + # generation of an appropriate name automatically. Name is primarily intended + # for creation idempotence and configuration definition. Cannot be updated. + # More info: http://kubernetes.io/docs/user-guide/identifiers#names + # +optional + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Namespace defines the space within each name must be unique, within a + # Cloud Run region. In Cloud Run the namespace must be equal to either the + # project ID or project number. + # Corresponds to the JSON property `namespace` + # @return [String] + attr_accessor :namespace + + # List of objects that own this object. If ALL objects in the list have + # been deleted, this object will be garbage collected. + # +optional + # Corresponds to the JSON property `ownerReferences` + # @return [Array] + attr_accessor :owner_references + + # An opaque value that represents the internal version of this object that + # can be used by clients to determine when objects have changed. May be used + # for optimistic concurrency, change detection, and the watch operation on a + # resource or set of resources. Clients must treat these values as opaque and + # passed unmodified back to the server. They may only be valid for a + # particular resource or set of resources. + # Populated by the system. + # Read-only. + # Value must be treated as opaque by clients and . + # More info: + # https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency- + # control-and-consistency + # +optional + # Corresponds to the JSON property `resourceVersion` + # @return [String] + attr_accessor :resource_version + + # SelfLink is a URL representing this object. + # Populated by the system. + # Read-only. + # +optional + # string selfLink = 4; + # Corresponds to the JSON property `selfLink` + # @return [String] + attr_accessor :self_link + + # UID is the unique in time and space value for this object. It is typically + # generated by the server on successful creation of a resource and is not + # allowed to change on PUT operations. + # Populated by the system. + # Read-only. + # More info: http://kubernetes.io/docs/user-guide/identifiers#uids + # +optional + # Corresponds to the JSON property `uid` + # @return [String] + attr_accessor :uid + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @annotations = args[:annotations] if args.key?(:annotations) + @cluster_name = args[:cluster_name] if args.key?(:cluster_name) + @creation_timestamp = args[:creation_timestamp] if args.key?(:creation_timestamp) + @deletion_grace_period_seconds = args[:deletion_grace_period_seconds] if args.key?(:deletion_grace_period_seconds) + @deletion_timestamp = args[:deletion_timestamp] if args.key?(:deletion_timestamp) + @finalizers = args[:finalizers] if args.key?(:finalizers) + @generate_name = args[:generate_name] if args.key?(:generate_name) + @generation = args[:generation] if args.key?(:generation) + @initializers = args[:initializers] if args.key?(:initializers) + @labels = args[:labels] if args.key?(:labels) + @name = args[:name] if args.key?(:name) + @namespace = args[:namespace] if args.key?(:namespace) + @owner_references = args[:owner_references] if args.key?(:owner_references) + @resource_version = args[:resource_version] if args.key?(:resource_version) + @self_link = args[:self_link] if args.key?(:self_link) + @uid = args[:uid] if args.key?(:uid) + end + end + + # OwnerReference contains enough information to let you identify an owning + # object. Currently, an owning object must be in the same namespace, so there + # is no namespace field. + class OwnerReference + include Google::Apis::Core::Hashable + + # API version of the referent. + # Corresponds to the JSON property `apiVersion` + # @return [String] + attr_accessor :api_version + + # If true, AND if the owner has the "foregroundDeletion" finalizer, then + # the owner cannot be deleted from the key-value store until this + # reference is removed. + # Defaults to false. + # To set this field, a user needs "delete" permission of the owner, + # otherwise 422 (Unprocessable Entity) will be returned. + # +optional + # Corresponds to the JSON property `blockOwnerDeletion` + # @return [Boolean] + attr_accessor :block_owner_deletion + alias_method :block_owner_deletion?, :block_owner_deletion + + # If true, this reference points to the managing controller. + # +optional + # Corresponds to the JSON property `controller` + # @return [Boolean] + attr_accessor :controller + alias_method :controller?, :controller + + # Kind of the referent. + # More info: + # https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # Name of the referent. + # More info: http://kubernetes.io/docs/user-guide/identifiers#names + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # UID of the referent. + # More info: http://kubernetes.io/docs/user-guide/identifiers#uids + # Corresponds to the JSON property `uid` + # @return [String] + attr_accessor :uid + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @api_version = args[:api_version] if args.key?(:api_version) + @block_owner_deletion = args[:block_owner_deletion] if args.key?(:block_owner_deletion) + @controller = args[:controller] if args.key?(:controller) + @kind = args[:kind] if args.key?(:kind) + @name = args[:name] if args.key?(:name) + @uid = args[:uid] if args.key?(:uid) + end + end + end + end +end diff --git a/generated/google/apis/run_v1beta1/representations.rb b/generated/google/apis/run_v1beta1/representations.rb new file mode 100644 index 000000000..2640c118f --- /dev/null +++ b/generated/google/apis/run_v1beta1/representations.rb @@ -0,0 +1,421 @@ +# 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 RunV1beta1 + + class CustomResourceColumnDefinition + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CustomResourceDefinition + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CustomResourceDefinitionNames + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CustomResourceDefinitionSpec + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CustomResourceDefinitionVersion + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CustomResourceSubresourceScale + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CustomResourceSubresourceStatus + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CustomResourceSubresources + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CustomResourceValidation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ExternalDocumentation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Initializer + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Initializers + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Json + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class JsonSchemaProps + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class JsonSchemaPropsOrArray + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class JsonSchemaPropsOrBool + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class JsonSchemaPropsOrStringArray + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListCustomResourceDefinitionsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListMeta + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ObjectMeta + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class OwnerReference + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CustomResourceColumnDefinition + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :description, as: 'description' + property :format, as: 'format' + property :json_path, as: 'jsonPath' + property :name, as: 'name' + property :priority, as: 'priority' + property :type, as: 'type' + end + end + + class CustomResourceDefinition + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :api_version, as: 'apiVersion' + property :kind, as: 'kind' + property :metadata, as: 'metadata', class: Google::Apis::RunV1beta1::ObjectMeta, decorator: Google::Apis::RunV1beta1::ObjectMeta::Representation + + property :spec, as: 'spec', class: Google::Apis::RunV1beta1::CustomResourceDefinitionSpec, decorator: Google::Apis::RunV1beta1::CustomResourceDefinitionSpec::Representation + + end + end + + class CustomResourceDefinitionNames + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :categories, as: 'categories' + property :kind, as: 'kind' + property :list_kind, as: 'listKind' + property :plural, as: 'plural' + collection :short_names, as: 'shortNames' + property :singular, as: 'singular' + end + end + + class CustomResourceDefinitionSpec + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :additional_printer_columns, as: 'additionalPrinterColumns', class: Google::Apis::RunV1beta1::CustomResourceColumnDefinition, decorator: Google::Apis::RunV1beta1::CustomResourceColumnDefinition::Representation + + property :group, as: 'group' + property :names, as: 'names', class: Google::Apis::RunV1beta1::CustomResourceDefinitionNames, decorator: Google::Apis::RunV1beta1::CustomResourceDefinitionNames::Representation + + property :scope, as: 'scope' + property :subresources, as: 'subresources', class: Google::Apis::RunV1beta1::CustomResourceSubresources, decorator: Google::Apis::RunV1beta1::CustomResourceSubresources::Representation + + property :validation, as: 'validation', class: Google::Apis::RunV1beta1::CustomResourceValidation, decorator: Google::Apis::RunV1beta1::CustomResourceValidation::Representation + + property :version, as: 'version' + collection :versions, as: 'versions', class: Google::Apis::RunV1beta1::CustomResourceDefinitionVersion, decorator: Google::Apis::RunV1beta1::CustomResourceDefinitionVersion::Representation + + end + end + + class CustomResourceDefinitionVersion + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :name, as: 'name' + property :served, as: 'served' + property :storage, as: 'storage' + end + end + + class CustomResourceSubresourceScale + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :label_selector_path, as: 'labelSelectorPath' + property :spec_replicas_path, as: 'specReplicasPath' + property :status_replicas_path, as: 'statusReplicasPath' + end + end + + class CustomResourceSubresourceStatus + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class CustomResourceSubresources + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :scale, as: 'scale', class: Google::Apis::RunV1beta1::CustomResourceSubresourceScale, decorator: Google::Apis::RunV1beta1::CustomResourceSubresourceScale::Representation + + property :status, as: 'status', class: Google::Apis::RunV1beta1::CustomResourceSubresourceStatus, decorator: Google::Apis::RunV1beta1::CustomResourceSubresourceStatus::Representation + + end + end + + class CustomResourceValidation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :open_apiv3_schema, as: 'openAPIV3Schema', class: Google::Apis::RunV1beta1::JsonSchemaProps, decorator: Google::Apis::RunV1beta1::JsonSchemaProps::Representation + + end + end + + class ExternalDocumentation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :description, as: 'description' + property :url, as: 'url' + end + end + + class Initializer + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :name, as: 'name' + end + end + + class Initializers + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :pending, as: 'pending', class: Google::Apis::RunV1beta1::Initializer, decorator: Google::Apis::RunV1beta1::Initializer::Representation + + end + end + + class Json + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :raw, :base64 => true, as: 'raw' + end + end + + class JsonSchemaProps + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :additional_items, as: 'additionalItems', class: Google::Apis::RunV1beta1::JsonSchemaPropsOrBool, decorator: Google::Apis::RunV1beta1::JsonSchemaPropsOrBool::Representation + + property :additional_properties, as: 'additionalProperties', class: Google::Apis::RunV1beta1::JsonSchemaPropsOrBool, decorator: Google::Apis::RunV1beta1::JsonSchemaPropsOrBool::Representation + + collection :all_of, as: 'allOf', class: Google::Apis::RunV1beta1::JsonSchemaProps, decorator: Google::Apis::RunV1beta1::JsonSchemaProps::Representation + + collection :any_of, as: 'anyOf', class: Google::Apis::RunV1beta1::JsonSchemaProps, decorator: Google::Apis::RunV1beta1::JsonSchemaProps::Representation + + property :default, as: 'default', class: Google::Apis::RunV1beta1::Json, decorator: Google::Apis::RunV1beta1::Json::Representation + + hash :definitions, as: 'definitions', class: Google::Apis::RunV1beta1::JsonSchemaProps, decorator: Google::Apis::RunV1beta1::JsonSchemaProps::Representation + + hash :dependencies, as: 'dependencies', class: Google::Apis::RunV1beta1::JsonSchemaPropsOrStringArray, decorator: Google::Apis::RunV1beta1::JsonSchemaPropsOrStringArray::Representation + + property :description, as: 'description' + collection :enum, as: 'enum' + property :example, as: 'example', class: Google::Apis::RunV1beta1::Json, decorator: Google::Apis::RunV1beta1::Json::Representation + + property :exclusive_maximum, as: 'exclusiveMaximum' + property :exclusive_minimum, as: 'exclusiveMinimum' + property :external_docs, as: 'externalDocs', class: Google::Apis::RunV1beta1::ExternalDocumentation, decorator: Google::Apis::RunV1beta1::ExternalDocumentation::Representation + + property :format, as: 'format' + property :id, as: 'id' + property :items, as: 'items', class: Google::Apis::RunV1beta1::JsonSchemaPropsOrArray, decorator: Google::Apis::RunV1beta1::JsonSchemaPropsOrArray::Representation + + property :max_items, :numeric_string => true, as: 'maxItems' + property :max_length, :numeric_string => true, as: 'maxLength' + property :max_properties, :numeric_string => true, as: 'maxProperties' + property :maximum, as: 'maximum' + property :min_items, :numeric_string => true, as: 'minItems' + property :min_length, :numeric_string => true, as: 'minLength' + property :min_properties, :numeric_string => true, as: 'minProperties' + property :minimum, as: 'minimum' + property :multiple_of, as: 'multipleOf' + property :not, as: 'not', class: Google::Apis::RunV1beta1::JsonSchemaProps, decorator: Google::Apis::RunV1beta1::JsonSchemaProps::Representation + + collection :one_of, as: 'oneOf', class: Google::Apis::RunV1beta1::JsonSchemaProps, decorator: Google::Apis::RunV1beta1::JsonSchemaProps::Representation + + property :pattern, as: 'pattern' + hash :pattern_properties, as: 'patternProperties', class: Google::Apis::RunV1beta1::JsonSchemaProps, decorator: Google::Apis::RunV1beta1::JsonSchemaProps::Representation + + hash :properties, as: 'properties', class: Google::Apis::RunV1beta1::JsonSchemaProps, decorator: Google::Apis::RunV1beta1::JsonSchemaProps::Representation + + property :ref, as: 'ref' + collection :required, as: 'required' + property :schema, as: 'schema' + property :title, as: 'title' + property :type, as: 'type' + property :unique_items, as: 'uniqueItems' + end + end + + class JsonSchemaPropsOrArray + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :json_schemas, as: 'jsonSchemas', class: Google::Apis::RunV1beta1::JsonSchemaProps, decorator: Google::Apis::RunV1beta1::JsonSchemaProps::Representation + + property :schema, as: 'schema', class: Google::Apis::RunV1beta1::JsonSchemaProps, decorator: Google::Apis::RunV1beta1::JsonSchemaProps::Representation + + end + end + + class JsonSchemaPropsOrBool + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :allows, as: 'allows' + property :schema, as: 'schema', class: Google::Apis::RunV1beta1::JsonSchemaProps, decorator: Google::Apis::RunV1beta1::JsonSchemaProps::Representation + + end + end + + class JsonSchemaPropsOrStringArray + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :property, as: 'property' + property :schema, as: 'schema', class: Google::Apis::RunV1beta1::JsonSchemaProps, decorator: Google::Apis::RunV1beta1::JsonSchemaProps::Representation + + end + end + + class ListCustomResourceDefinitionsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :api_version, as: 'apiVersion' + collection :items, as: 'items', class: Google::Apis::RunV1beta1::CustomResourceDefinition, decorator: Google::Apis::RunV1beta1::CustomResourceDefinition::Representation + + property :kind, as: 'kind' + property :metadata, as: 'metadata', class: Google::Apis::RunV1beta1::ListMeta, decorator: Google::Apis::RunV1beta1::ListMeta::Representation + + collection :unreachable, as: 'unreachable' + end + end + + class ListMeta + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :continue, as: 'continue' + property :resource_version, as: 'resourceVersion' + property :self_link, as: 'selfLink' + end + end + + class ObjectMeta + # @private + class Representation < Google::Apis::Core::JsonRepresentation + hash :annotations, as: 'annotations' + property :cluster_name, as: 'clusterName' + property :creation_timestamp, as: 'creationTimestamp' + property :deletion_grace_period_seconds, as: 'deletionGracePeriodSeconds' + property :deletion_timestamp, as: 'deletionTimestamp' + collection :finalizers, as: 'finalizers' + property :generate_name, as: 'generateName' + property :generation, as: 'generation' + property :initializers, as: 'initializers', class: Google::Apis::RunV1beta1::Initializers, decorator: Google::Apis::RunV1beta1::Initializers::Representation + + hash :labels, as: 'labels' + property :name, as: 'name' + property :namespace, as: 'namespace' + collection :owner_references, as: 'ownerReferences', class: Google::Apis::RunV1beta1::OwnerReference, decorator: Google::Apis::RunV1beta1::OwnerReference::Representation + + property :resource_version, as: 'resourceVersion' + property :self_link, as: 'selfLink' + property :uid, as: 'uid' + end + end + + class OwnerReference + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :api_version, as: 'apiVersion' + property :block_owner_deletion, as: 'blockOwnerDeletion' + property :controller, as: 'controller' + property :kind, as: 'kind' + property :name, as: 'name' + property :uid, as: 'uid' + end + end + end + end +end diff --git a/generated/google/apis/run_v1beta1/service.rb b/generated/google/apis/run_v1beta1/service.rb new file mode 100644 index 000000000..245aae85d --- /dev/null +++ b/generated/google/apis/run_v1beta1/service.rb @@ -0,0 +1,172 @@ +# 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 RunV1beta1 + # Cloud Run API + # + # Deploy and manage user provided container images that scale automatically + # based on HTTP traffic. + # + # @example + # require 'google/apis/run_v1beta1' + # + # Run = Google::Apis::RunV1beta1 # Alias the module + # service = Run::CloudRunService.new + # + # @see https://cloud.google.com/run/ + class CloudRunService < Google::Apis::Core::BaseService + # @return [String] + # API key. Your API key identifies your project and provides you with API access, + # quota, and reports. Required unless you provide an OAuth 2.0 token. + attr_accessor :key + + # @return [String] + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + attr_accessor :quota_user + + def initialize + super('https://run.googleapis.com/', '') + @batch_path = 'batch' + end + + # Rpc to list custom resource definitions. + # @param [String] continue + # Optional encoded string to continue paging. + # @param [String] field_selector + # Allows to filter resources based on a specific value for a field name. + # Send this in a query string format. i.e. 'metadata.name%3Dlorem'. + # Not currently used by Cloud Run. + # @param [Boolean] include_uninitialized + # Not currently used by Cloud Run. + # @param [String] label_selector + # Allows to filter resources based on a label. Supported operations are + # =, !=, exists, in, and notIn. + # @param [Fixnum] limit + # @param [String] parent + # The project ID or project number from which the storages should + # be listed. + # @param [String] resource_version + # The baseline resource version from which the list or watch operation should + # start. Not currently used by Cloud Run. + # @param [Boolean] watch + # Flag that indicates that the client expects to watch this resource as well. + # Not currently used by Cloud Run. + # @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::RunV1beta1::ListCustomResourceDefinitionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RunV1beta1::ListCustomResourceDefinitionsResponse] + # + # @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_customresourcedefinitions(continue: nil, field_selector: nil, include_uninitialized: nil, label_selector: nil, limit: nil, parent: nil, resource_version: nil, watch: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions', options) + command.response_representation = Google::Apis::RunV1beta1::ListCustomResourceDefinitionsResponse::Representation + command.response_class = Google::Apis::RunV1beta1::ListCustomResourceDefinitionsResponse + command.query['continue'] = continue unless continue.nil? + command.query['fieldSelector'] = field_selector unless field_selector.nil? + command.query['includeUninitialized'] = include_uninitialized unless include_uninitialized.nil? + command.query['labelSelector'] = label_selector unless label_selector.nil? + command.query['limit'] = limit unless limit.nil? + command.query['parent'] = parent unless parent.nil? + command.query['resourceVersion'] = resource_version unless resource_version.nil? + command.query['watch'] = watch unless watch.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Rpc to list custom resource definitions. + # @param [String] parent + # The project ID or project number from which the storages should + # be listed. + # @param [String] continue + # Optional encoded string to continue paging. + # @param [String] field_selector + # Allows to filter resources based on a specific value for a field name. + # Send this in a query string format. i.e. 'metadata.name%3Dlorem'. + # Not currently used by Cloud Run. + # @param [Boolean] include_uninitialized + # Not currently used by Cloud Run. + # @param [String] label_selector + # Allows to filter resources based on a label. Supported operations are + # =, !=, exists, in, and notIn. + # @param [Fixnum] limit + # @param [String] resource_version + # The baseline resource version from which the list or watch operation should + # start. Not currently used by Cloud Run. + # @param [Boolean] watch + # Flag that indicates that the client expects to watch this resource as well. + # Not currently used by Cloud Run. + # @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::RunV1beta1::ListCustomResourceDefinitionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RunV1beta1::ListCustomResourceDefinitionsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_location_customresourcedefinitions(parent, continue: nil, field_selector: nil, include_uninitialized: nil, label_selector: nil, limit: nil, resource_version: nil, watch: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+parent}/customresourcedefinitions', options) + command.response_representation = Google::Apis::RunV1beta1::ListCustomResourceDefinitionsResponse::Representation + command.response_class = Google::Apis::RunV1beta1::ListCustomResourceDefinitionsResponse + command.params['parent'] = parent unless parent.nil? + command.query['continue'] = continue unless continue.nil? + command.query['fieldSelector'] = field_selector unless field_selector.nil? + command.query['includeUninitialized'] = include_uninitialized unless include_uninitialized.nil? + command.query['labelSelector'] = label_selector unless label_selector.nil? + command.query['limit'] = limit unless limit.nil? + command.query['resourceVersion'] = resource_version unless resource_version.nil? + command.query['watch'] = watch unless watch.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + protected + + def apply_command_defaults(command) + command.query['key'] = key unless key.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + end + end + end + end +end