Autogenerated update (2019-09-28)
Update: - binaryauthorization_v1 - binaryauthorization_v1beta1 - cloudidentity_v1 - cloudidentity_v1beta1 - firebase_v1beta1
This commit is contained in:
parent
ea2db77fee
commit
41ca4a205c
|
@ -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
|
|
@ -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<Google::Apis::BigqueryreservationV1beta1::Assignment>]
|
||||||
|
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<Google::Apis::BigqueryreservationV1beta1::CapacityCommitment>]
|
||||||
|
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<Google::Apis::BigqueryreservationV1beta1::Location>]
|
||||||
|
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<Google::Apis::BigqueryreservationV1beta1::Reservation>]
|
||||||
|
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<String,String>]
|
||||||
|
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<String,Object>]
|
||||||
|
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<String,Object>]
|
||||||
|
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<String,Object>]
|
||||||
|
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<Google::Apis::BigqueryreservationV1beta1::Assignment>]
|
||||||
|
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<Hash<String,Object>>]
|
||||||
|
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
|
|
@ -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
|
|
@ -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:
|
||||||
|
# <organizationA, res1>
|
||||||
|
# <project1, res1>
|
||||||
|
# Then deletion of <organizationA, res1> won't affect <project1, res1>. After
|
||||||
|
# deletion of <organizationA, res1>, 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:
|
||||||
|
# <organizationA, res1>
|
||||||
|
# <project1, res1>
|
||||||
|
# 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
|
|
@ -26,7 +26,7 @@ module Google
|
||||||
# @see https://cloud.google.com/binary-authorization/
|
# @see https://cloud.google.com/binary-authorization/
|
||||||
module BinaryauthorizationV1
|
module BinaryauthorizationV1
|
||||||
VERSION = 'V1'
|
VERSION = 'V1'
|
||||||
REVISION = '20190916'
|
REVISION = '20190919'
|
||||||
|
|
||||||
# View and manage your data across Google Cloud Platform services
|
# View and manage your data across Google Cloud Platform services
|
||||||
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
||||||
|
|
|
@ -298,25 +298,34 @@ module Google
|
||||||
|
|
||||||
# Defines an Identity and Access Management (IAM) policy. It is used to
|
# Defines an Identity and Access Management (IAM) policy. It is used to
|
||||||
# specify access control policies for Cloud Platform resources.
|
# specify access control policies for Cloud Platform resources.
|
||||||
# A `Policy` consists of a list of `bindings`. A `binding` binds a list of
|
# A `Policy` is a collection of `bindings`. A `binding` binds one or more
|
||||||
# `members` to a `role`, where the members can be user accounts, Google groups,
|
# `members` to a single `role`. Members can be user accounts, service accounts,
|
||||||
# Google domains, and service accounts. A `role` is a named list of permissions
|
# Google groups, and domains (such as G Suite). A `role` is a named list of
|
||||||
# defined by IAM.
|
# 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**
|
# **JSON Example**
|
||||||
# `
|
# `
|
||||||
# "bindings": [
|
# "bindings": [
|
||||||
# `
|
# `
|
||||||
# "role": "roles/owner",
|
# "role": "role/resourcemanager.organizationAdmin",
|
||||||
# "members": [
|
# "members": [
|
||||||
# "user:mike@example.com",
|
# "user:mike@example.com",
|
||||||
# "group:admins@example.com",
|
# "group:admins@example.com",
|
||||||
# "domain:google.com",
|
# "domain:google.com",
|
||||||
# "serviceAccount:my-other-app@appspot.gserviceaccount.com"
|
# "serviceAccount:my-project-id@appspot.gserviceaccount.com"
|
||||||
# ]
|
# ]
|
||||||
# `,
|
# `,
|
||||||
# `
|
# `
|
||||||
# "role": "roles/viewer",
|
# "role": "roles/resourcemanager.organizationViewer",
|
||||||
# "members": ["user:sean@example.com"]
|
# "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
|
# - user:mike@example.com
|
||||||
# - group:admins@example.com
|
# - group:admins@example.com
|
||||||
# - domain:google.com
|
# - domain:google.com
|
||||||
# - serviceAccount:my-other-app@appspot.gserviceaccount.com
|
# - serviceAccount:my-project-id@appspot.gserviceaccount.com
|
||||||
# role: roles/owner
|
# role: roles/resourcemanager.organizationAdmin
|
||||||
# - members:
|
# - members:
|
||||||
# - user:sean@example.com
|
# - user:eve@example.com
|
||||||
# role: roles/viewer
|
# 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
|
# For a description of IAM and its features, see the
|
||||||
# [IAM developer's guide](https://cloud.google.com/iam/docs).
|
# [IAM developer's guide](https://cloud.google.com/iam/docs).
|
||||||
class IamPolicy
|
class IamPolicy
|
||||||
include Google::Apis::Core::Hashable
|
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.
|
# `bindings` with no members will result in an error.
|
||||||
# Corresponds to the JSON property `bindings`
|
# Corresponds to the JSON property `bindings`
|
||||||
# @return [Array<Google::Apis::BinaryauthorizationV1::Binding>]
|
# @return [Array<Google::Apis::BinaryauthorizationV1::Binding>]
|
||||||
|
@ -350,7 +364,9 @@ module Google
|
||||||
# systems are expected to put that etag in the request to `setIamPolicy` to
|
# 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.
|
# 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
|
# 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`
|
# Corresponds to the JSON property `etag`
|
||||||
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
||||||
# @return [String]
|
# @return [String]
|
||||||
|
@ -359,9 +375,13 @@ module Google
|
||||||
# Specifies the format of the policy.
|
# Specifies the format of the policy.
|
||||||
# Valid values are 0, 1, and 3. Requests specifying an invalid value will be
|
# Valid values are 0, 1, and 3. Requests specifying an invalid value will be
|
||||||
# rejected.
|
# rejected.
|
||||||
# Policies with any conditional bindings must specify version 3. Policies
|
# Operations affecting conditional bindings must specify version 3. This can
|
||||||
# without any conditional bindings may specify any valid value or leave the
|
# be either setting a conditional policy, modifying a conditional binding,
|
||||||
# field unset.
|
# 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`
|
# Corresponds to the JSON property `version`
|
||||||
# @return [Fixnum]
|
# @return [Fixnum]
|
||||||
attr_accessor :version
|
attr_accessor :version
|
||||||
|
@ -517,25 +537,34 @@ module Google
|
||||||
|
|
||||||
# Defines an Identity and Access Management (IAM) policy. It is used to
|
# Defines an Identity and Access Management (IAM) policy. It is used to
|
||||||
# specify access control policies for Cloud Platform resources.
|
# specify access control policies for Cloud Platform resources.
|
||||||
# A `Policy` consists of a list of `bindings`. A `binding` binds a list of
|
# A `Policy` is a collection of `bindings`. A `binding` binds one or more
|
||||||
# `members` to a `role`, where the members can be user accounts, Google groups,
|
# `members` to a single `role`. Members can be user accounts, service accounts,
|
||||||
# Google domains, and service accounts. A `role` is a named list of permissions
|
# Google groups, and domains (such as G Suite). A `role` is a named list of
|
||||||
# defined by IAM.
|
# 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**
|
# **JSON Example**
|
||||||
# `
|
# `
|
||||||
# "bindings": [
|
# "bindings": [
|
||||||
# `
|
# `
|
||||||
# "role": "roles/owner",
|
# "role": "role/resourcemanager.organizationAdmin",
|
||||||
# "members": [
|
# "members": [
|
||||||
# "user:mike@example.com",
|
# "user:mike@example.com",
|
||||||
# "group:admins@example.com",
|
# "group:admins@example.com",
|
||||||
# "domain:google.com",
|
# "domain:google.com",
|
||||||
# "serviceAccount:my-other-app@appspot.gserviceaccount.com"
|
# "serviceAccount:my-project-id@appspot.gserviceaccount.com"
|
||||||
# ]
|
# ]
|
||||||
# `,
|
# `,
|
||||||
# `
|
# `
|
||||||
# "role": "roles/viewer",
|
# "role": "roles/resourcemanager.organizationViewer",
|
||||||
# "members": ["user:sean@example.com"]
|
# "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
|
# - user:mike@example.com
|
||||||
# - group:admins@example.com
|
# - group:admins@example.com
|
||||||
# - domain:google.com
|
# - domain:google.com
|
||||||
# - serviceAccount:my-other-app@appspot.gserviceaccount.com
|
# - serviceAccount:my-project-id@appspot.gserviceaccount.com
|
||||||
# role: roles/owner
|
# role: roles/resourcemanager.organizationAdmin
|
||||||
# - members:
|
# - members:
|
||||||
# - user:sean@example.com
|
# - user:eve@example.com
|
||||||
# role: roles/viewer
|
# 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
|
# For a description of IAM and its features, see the
|
||||||
# [IAM developer's guide](https://cloud.google.com/iam/docs).
|
# [IAM developer's guide](https://cloud.google.com/iam/docs).
|
||||||
# Corresponds to the JSON property `policy`
|
# Corresponds to the JSON property `policy`
|
||||||
|
|
|
@ -26,7 +26,7 @@ module Google
|
||||||
# @see https://cloud.google.com/binary-authorization/
|
# @see https://cloud.google.com/binary-authorization/
|
||||||
module BinaryauthorizationV1beta1
|
module BinaryauthorizationV1beta1
|
||||||
VERSION = 'V1beta1'
|
VERSION = 'V1beta1'
|
||||||
REVISION = '20190906'
|
REVISION = '20190919'
|
||||||
|
|
||||||
# View and manage your data across Google Cloud Platform services
|
# View and manage your data across Google Cloud Platform services
|
||||||
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
||||||
|
|
|
@ -298,25 +298,34 @@ module Google
|
||||||
|
|
||||||
# Defines an Identity and Access Management (IAM) policy. It is used to
|
# Defines an Identity and Access Management (IAM) policy. It is used to
|
||||||
# specify access control policies for Cloud Platform resources.
|
# specify access control policies for Cloud Platform resources.
|
||||||
# A `Policy` consists of a list of `bindings`. A `binding` binds a list of
|
# A `Policy` is a collection of `bindings`. A `binding` binds one or more
|
||||||
# `members` to a `role`, where the members can be user accounts, Google groups,
|
# `members` to a single `role`. Members can be user accounts, service accounts,
|
||||||
# Google domains, and service accounts. A `role` is a named list of permissions
|
# Google groups, and domains (such as G Suite). A `role` is a named list of
|
||||||
# defined by IAM.
|
# 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**
|
# **JSON Example**
|
||||||
# `
|
# `
|
||||||
# "bindings": [
|
# "bindings": [
|
||||||
# `
|
# `
|
||||||
# "role": "roles/owner",
|
# "role": "role/resourcemanager.organizationAdmin",
|
||||||
# "members": [
|
# "members": [
|
||||||
# "user:mike@example.com",
|
# "user:mike@example.com",
|
||||||
# "group:admins@example.com",
|
# "group:admins@example.com",
|
||||||
# "domain:google.com",
|
# "domain:google.com",
|
||||||
# "serviceAccount:my-other-app@appspot.gserviceaccount.com"
|
# "serviceAccount:my-project-id@appspot.gserviceaccount.com"
|
||||||
# ]
|
# ]
|
||||||
# `,
|
# `,
|
||||||
# `
|
# `
|
||||||
# "role": "roles/viewer",
|
# "role": "roles/resourcemanager.organizationViewer",
|
||||||
# "members": ["user:sean@example.com"]
|
# "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
|
# - user:mike@example.com
|
||||||
# - group:admins@example.com
|
# - group:admins@example.com
|
||||||
# - domain:google.com
|
# - domain:google.com
|
||||||
# - serviceAccount:my-other-app@appspot.gserviceaccount.com
|
# - serviceAccount:my-project-id@appspot.gserviceaccount.com
|
||||||
# role: roles/owner
|
# role: roles/resourcemanager.organizationAdmin
|
||||||
# - members:
|
# - members:
|
||||||
# - user:sean@example.com
|
# - user:eve@example.com
|
||||||
# role: roles/viewer
|
# 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
|
# For a description of IAM and its features, see the
|
||||||
# [IAM developer's guide](https://cloud.google.com/iam/docs).
|
# [IAM developer's guide](https://cloud.google.com/iam/docs).
|
||||||
class IamPolicy
|
class IamPolicy
|
||||||
include Google::Apis::Core::Hashable
|
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.
|
# `bindings` with no members will result in an error.
|
||||||
# Corresponds to the JSON property `bindings`
|
# Corresponds to the JSON property `bindings`
|
||||||
# @return [Array<Google::Apis::BinaryauthorizationV1beta1::Binding>]
|
# @return [Array<Google::Apis::BinaryauthorizationV1beta1::Binding>]
|
||||||
|
@ -350,7 +364,9 @@ module Google
|
||||||
# systems are expected to put that etag in the request to `setIamPolicy` to
|
# 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.
|
# 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
|
# 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`
|
# Corresponds to the JSON property `etag`
|
||||||
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
||||||
# @return [String]
|
# @return [String]
|
||||||
|
@ -359,9 +375,13 @@ module Google
|
||||||
# Specifies the format of the policy.
|
# Specifies the format of the policy.
|
||||||
# Valid values are 0, 1, and 3. Requests specifying an invalid value will be
|
# Valid values are 0, 1, and 3. Requests specifying an invalid value will be
|
||||||
# rejected.
|
# rejected.
|
||||||
# Policies with any conditional bindings must specify version 3. Policies
|
# Operations affecting conditional bindings must specify version 3. This can
|
||||||
# without any conditional bindings may specify any valid value or leave the
|
# be either setting a conditional policy, modifying a conditional binding,
|
||||||
# field unset.
|
# 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`
|
# Corresponds to the JSON property `version`
|
||||||
# @return [Fixnum]
|
# @return [Fixnum]
|
||||||
attr_accessor :version
|
attr_accessor :version
|
||||||
|
@ -517,25 +537,34 @@ module Google
|
||||||
|
|
||||||
# Defines an Identity and Access Management (IAM) policy. It is used to
|
# Defines an Identity and Access Management (IAM) policy. It is used to
|
||||||
# specify access control policies for Cloud Platform resources.
|
# specify access control policies for Cloud Platform resources.
|
||||||
# A `Policy` consists of a list of `bindings`. A `binding` binds a list of
|
# A `Policy` is a collection of `bindings`. A `binding` binds one or more
|
||||||
# `members` to a `role`, where the members can be user accounts, Google groups,
|
# `members` to a single `role`. Members can be user accounts, service accounts,
|
||||||
# Google domains, and service accounts. A `role` is a named list of permissions
|
# Google groups, and domains (such as G Suite). A `role` is a named list of
|
||||||
# defined by IAM.
|
# 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**
|
# **JSON Example**
|
||||||
# `
|
# `
|
||||||
# "bindings": [
|
# "bindings": [
|
||||||
# `
|
# `
|
||||||
# "role": "roles/owner",
|
# "role": "role/resourcemanager.organizationAdmin",
|
||||||
# "members": [
|
# "members": [
|
||||||
# "user:mike@example.com",
|
# "user:mike@example.com",
|
||||||
# "group:admins@example.com",
|
# "group:admins@example.com",
|
||||||
# "domain:google.com",
|
# "domain:google.com",
|
||||||
# "serviceAccount:my-other-app@appspot.gserviceaccount.com"
|
# "serviceAccount:my-project-id@appspot.gserviceaccount.com"
|
||||||
# ]
|
# ]
|
||||||
# `,
|
# `,
|
||||||
# `
|
# `
|
||||||
# "role": "roles/viewer",
|
# "role": "roles/resourcemanager.organizationViewer",
|
||||||
# "members": ["user:sean@example.com"]
|
# "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
|
# - user:mike@example.com
|
||||||
# - group:admins@example.com
|
# - group:admins@example.com
|
||||||
# - domain:google.com
|
# - domain:google.com
|
||||||
# - serviceAccount:my-other-app@appspot.gserviceaccount.com
|
# - serviceAccount:my-project-id@appspot.gserviceaccount.com
|
||||||
# role: roles/owner
|
# role: roles/resourcemanager.organizationAdmin
|
||||||
# - members:
|
# - members:
|
||||||
# - user:sean@example.com
|
# - user:eve@example.com
|
||||||
# role: roles/viewer
|
# 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
|
# For a description of IAM and its features, see the
|
||||||
# [IAM developer's guide](https://cloud.google.com/iam/docs).
|
# [IAM developer's guide](https://cloud.google.com/iam/docs).
|
||||||
# Corresponds to the JSON property `policy`
|
# Corresponds to the JSON property `policy`
|
||||||
|
|
|
@ -25,13 +25,16 @@ module Google
|
||||||
# @see https://cloud.google.com/identity/
|
# @see https://cloud.google.com/identity/
|
||||||
module CloudidentityV1
|
module CloudidentityV1
|
||||||
VERSION = 'V1'
|
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
|
# 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'
|
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
|
# 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'
|
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
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -25,13 +25,16 @@ module Google
|
||||||
# @see https://cloud.google.com/identity/
|
# @see https://cloud.google.com/identity/
|
||||||
module CloudidentityV1beta1
|
module CloudidentityV1beta1
|
||||||
VERSION = 'V1beta1'
|
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
|
# 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'
|
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
|
# 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'
|
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
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -26,7 +26,7 @@ module Google
|
||||||
# @see https://firebase.google.com
|
# @see https://firebase.google.com
|
||||||
module FirebaseV1beta1
|
module FirebaseV1beta1
|
||||||
VERSION = 'V1beta1'
|
VERSION = 'V1beta1'
|
||||||
REVISION = '20190920'
|
REVISION = '20190926'
|
||||||
|
|
||||||
# View and manage your data across Google Cloud Platform services
|
# View and manage your data across Google Cloud Platform services
|
||||||
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
||||||
|
|
|
@ -159,8 +159,13 @@ module Google
|
||||||
# @return [Google::Apis::FirebaseV1beta1::AnalyticsProperty]
|
# @return [Google::Apis::FirebaseV1beta1::AnalyticsProperty]
|
||||||
attr_accessor :analytics_property
|
attr_accessor :analytics_property
|
||||||
|
|
||||||
# A map of `AppId` to `StreamId` for each Firebase App in the specified
|
# For Android Apps and iOS Apps: A map of `app` to `streamId` for each
|
||||||
# `FirebaseProject`. Each `AppId` and `StreamId` appears only once.
|
# Firebase App in the specified `FirebaseProject`. Each `app` and
|
||||||
|
# `streamId` appears only once.<br>
|
||||||
|
# <br>
|
||||||
|
# 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`
|
# Corresponds to the JSON property `streamMappings`
|
||||||
# @return [Array<Google::Apis::FirebaseV1beta1::StreamMapping>]
|
# @return [Array<Google::Apis::FirebaseV1beta1::StreamMapping>]
|
||||||
attr_accessor :stream_mappings
|
attr_accessor :stream_mappings
|
||||||
|
@ -1128,15 +1133,23 @@ module Google
|
||||||
|
|
||||||
# The fully qualified resource name of the Firebase App associated with the
|
# The fully qualified resource name of the Firebase App associated with the
|
||||||
# Google Analytics data stream, in the format:
|
# Google Analytics data stream, in the format:
|
||||||
# <br><code>projects/<var>projectId</var>/iosApps/<var>appId</var></code>
|
|
||||||
# or
|
|
||||||
# <br><code>projects/<var>projectId</var>/androidApps/<var>appId</var></code>
|
# <br><code>projects/<var>projectId</var>/androidApps/<var>appId</var></code>
|
||||||
|
# or
|
||||||
|
# <code>projects/<var>projectId</var>/iosApps/<var>appId</var></code>
|
||||||
|
# or
|
||||||
|
# <code>projects/<var>projectId</var>/webApps/<var>appId</var></code>
|
||||||
# Corresponds to the JSON property `app`
|
# Corresponds to the JSON property `app`
|
||||||
# @return [String]
|
# @return [String]
|
||||||
attr_accessor :app
|
attr_accessor :app
|
||||||
|
|
||||||
# Analytics-provided measurement ID, for use in the gtag.js library.
|
# Applicable for Firebase Web Apps only.<br>
|
||||||
# Will only be present for Firebase Web Apps.
|
# <br>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.
|
||||||
|
# <br>
|
||||||
|
# <br>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`
|
# Corresponds to the JSON property `measurementId`
|
||||||
# @return [String]
|
# @return [String]
|
||||||
attr_accessor :measurement_id
|
attr_accessor :measurement_id
|
||||||
|
@ -1286,8 +1299,18 @@ module Google
|
||||||
# @return [String]
|
# @return [String]
|
||||||
attr_accessor :location_id
|
attr_accessor :location_id
|
||||||
|
|
||||||
# Analytics-provided measurement ID, for use in the gtag.js library.
|
# The unique Google-assigned identifier of the Google Analytics web stream
|
||||||
# Will only be present for Firebase Web Apps.
|
# associated with the Firebase Web App. Firebase SDKs use this ID to interact
|
||||||
|
# with Google Analytics APIs.
|
||||||
|
# <br>
|
||||||
|
# <br>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).
|
||||||
|
# <br>
|
||||||
|
# <br>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`
|
# Corresponds to the JSON property `measurementId`
|
||||||
# @return [String]
|
# @return [String]
|
||||||
attr_accessor :measurement_id
|
attr_accessor :measurement_id
|
||||||
|
|
|
@ -201,22 +201,27 @@ module Google
|
||||||
# <br>
|
# <br>
|
||||||
# <br>Using this call, you can either:
|
# <br>Using this call, you can either:
|
||||||
# <ul>
|
# <ul>
|
||||||
# <li>Provision a new Google Analytics property and associate the new
|
# <li>Specify an `analyticsAccountId` to provision a new Google Analytics
|
||||||
# property with your `FirebaseProject`.</li>
|
# property within the specified account and associate the new property with
|
||||||
# <li>Associate an existing Google Analytics property with your
|
# your `FirebaseProject`.</li>
|
||||||
# `FirebaseProject`.</li>
|
# <li>Specify an existing `analyticsPropertyId` to associate the property
|
||||||
|
# with your `FirebaseProject`.</li>
|
||||||
# </ul>
|
# </ul>
|
||||||
# <br>
|
# <br>
|
||||||
# Note that when you call `AddGoogleAnalytics`:
|
# Note that when you call `AddGoogleAnalytics`:
|
||||||
# <ul>
|
# <ol>
|
||||||
# <li>Any Firebase Apps already in your `FirebaseProject` are
|
# <li>The first check determines if any existing data streams in the
|
||||||
# automatically provisioned as new <em>data streams</em> in the Google
|
# Google Analytics property correspond to any existing Firebase Apps in your
|
||||||
# Analytics property.</li>
|
# `FirebaseProject` (based on the `packageName` or `bundleId` associated with
|
||||||
# <li>Any <em>data streams</em> already in the Google Analytics property are
|
# the data stream). Then, as applicable, the data streams and apps are
|
||||||
# automatically associated with their corresponding Firebase Apps (only
|
# linked. Note that this auto-linking only applies to Android Apps and iOS
|
||||||
# applies when an app's `packageName` or `bundleId` match those for an
|
# Apps.</li>
|
||||||
# existing data stream).</li>
|
# <li>If no corresponding data streams are found for your Firebase Apps,
|
||||||
# </ul>
|
# 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.</li>
|
||||||
|
# </ol>
|
||||||
# Learn more about the hierarchy and structure of Google Analytics
|
# Learn more about the hierarchy and structure of Google Analytics
|
||||||
# accounts in the
|
# accounts in the
|
||||||
# [Analytics
|
# [Analytics
|
||||||
|
@ -487,7 +492,10 @@ module Google
|
||||||
# <br>These resources may be re-associated later to the `FirebaseProject` by
|
# <br>These resources may be re-associated later to the `FirebaseProject` by
|
||||||
# calling
|
# calling
|
||||||
# [`AddGoogleAnalytics`](../../v1beta1/projects/addGoogleAnalytics) and
|
# [`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 <em>new</em> data stream for each Web
|
||||||
|
# App.
|
||||||
# <br>
|
# <br>
|
||||||
# <br>To call `RemoveAnalytics`, a member must be an Owner for
|
# <br>To call `RemoveAnalytics`, a member must be an Owner for
|
||||||
# the `FirebaseProject`.
|
# the `FirebaseProject`.
|
||||||
|
|
|
@ -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
|
|
@ -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<Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation>]
|
||||||
|
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<String,String>]
|
||||||
|
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<String,String>]
|
||||||
|
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<String,String>]
|
||||||
|
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<String,Object>]
|
||||||
|
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<String,Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1ValueMatcher>]
|
||||||
|
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 = <source> and resource_name = <target>.
|
||||||
|
# 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<Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Operation>]
|
||||||
|
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<Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Impact>]
|
||||||
|
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<Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1OperationGroup>]
|
||||||
|
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<String,String>]
|
||||||
|
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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
File diff suppressed because it is too large
Load Diff
|
@ -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
|
|
@ -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
|
Loading…
Reference in New Issue