diff --git a/generated/google/apis/bigqueryreservation_v1beta1.rb b/generated/google/apis/bigqueryreservation_v1beta1.rb index b01f4eb45..bc1a077ad 100644 --- a/generated/google/apis/bigqueryreservation_v1beta1.rb +++ b/generated/google/apis/bigqueryreservation_v1beta1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/bigquery/ module BigqueryreservationV1beta1 VERSION = 'V1beta1' - REVISION = '20191106' + REVISION = '20191203' # View and manage your data in Google BigQuery AUTH_BIGQUERY = 'https://www.googleapis.com/auth/bigquery' diff --git a/generated/google/apis/bigqueryreservation_v1beta1/service.rb b/generated/google/apis/bigqueryreservation_v1beta1/service.rb index af9c45740..18fe7f305 100644 --- a/generated/google/apis/bigqueryreservation_v1beta1/service.rb +++ b/generated/google/apis/bigqueryreservation_v1beta1/service.rb @@ -254,6 +254,9 @@ module Google # Resource name of the parent reservation. E.g., # projects/myproject/locations/US # @param [Google::Apis::BigqueryreservationV1beta1::CapacityCommitment] capacity_commitment_object + # @param [Boolean] enforce_single_admin_project_per_org + # If true, fail the request if another project in the organization has a + # capacity commitment. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -271,13 +274,14 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_project_location_capacity_commitment(parent, capacity_commitment_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def create_project_location_capacity_commitment(parent, capacity_commitment_object = nil, enforce_single_admin_project_per_org: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta1/{+parent}/capacityCommitments', options) command.request_representation = Google::Apis::BigqueryreservationV1beta1::CapacityCommitment::Representation command.request_object = capacity_commitment_object command.response_representation = Google::Apis::BigqueryreservationV1beta1::CapacityCommitment::Representation command.response_class = Google::Apis::BigqueryreservationV1beta1::CapacityCommitment command.params['parent'] = parent unless parent.nil? + command.query['enforceSingleAdminProjectPerOrg'] = enforce_single_admin_project_per_org unless enforce_single_admin_project_per_org.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) diff --git a/generated/google/apis/cloudbuild_v1alpha1.rb b/generated/google/apis/cloudbuild_v1alpha1.rb deleted file mode 100644 index f7e5c6b96..000000000 --- a/generated/google/apis/cloudbuild_v1alpha1.rb +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 2015 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -require 'google/apis/cloudbuild_v1alpha1/service.rb' -require 'google/apis/cloudbuild_v1alpha1/classes.rb' -require 'google/apis/cloudbuild_v1alpha1/representations.rb' - -module Google - module Apis - # Cloud Build API - # - # Creates and manages builds on Google Cloud Platform. - # - # @see https://cloud.google.com/cloud-build/docs/ - module CloudbuildV1alpha1 - VERSION = 'V1alpha1' - REVISION = '20191120' - - # View and manage your data across Google Cloud Platform services - AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' - end - end -end diff --git a/generated/google/apis/cloudbuild_v1alpha1/classes.rb b/generated/google/apis/cloudbuild_v1alpha1/classes.rb deleted file mode 100644 index 992fcec41..000000000 --- a/generated/google/apis/cloudbuild_v1alpha1/classes.rb +++ /dev/null @@ -1,1174 +0,0 @@ -# Copyright 2015 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -require 'date' -require 'google/apis/core/base_service' -require 'google/apis/core/json_representation' -require 'google/apis/core/hashable' -require 'google/apis/errors' - -module Google - module Apis - module CloudbuildV1alpha1 - - # Files in the workspace to upload to Cloud Storage upon successful - # completion of all build steps. - class ArtifactObjects - include Google::Apis::Core::Hashable - - # Cloud Storage bucket and optional object path, in the form - # "gs://bucket/path/to/somewhere/". (see [Bucket Name - # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements) - # ). - # Files in the workspace matching any path pattern will be uploaded to - # Cloud Storage with this location as a prefix. - # Corresponds to the JSON property `location` - # @return [String] - attr_accessor :location - - # Path globs used to match files in the build's workspace. - # Corresponds to the JSON property `paths` - # @return [Array] - attr_accessor :paths - - # Start and end times for a build execution phase. - # Corresponds to the JSON property `timing` - # @return [Google::Apis::CloudbuildV1alpha1::TimeSpan] - attr_accessor :timing - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @location = args[:location] if args.key?(:location) - @paths = args[:paths] if args.key?(:paths) - @timing = args[:timing] if args.key?(:timing) - end - end - - # An artifact that was uploaded during a build. This - # is a single record in the artifact manifest JSON file. - class ArtifactResult - include Google::Apis::Core::Hashable - - # The file hash of the artifact. - # Corresponds to the JSON property `fileHash` - # @return [Array] - attr_accessor :file_hash - - # The path of an artifact in a Google Cloud Storage bucket, with the - # generation number. For example, - # `gs://mybucket/path/to/output.jar#generation`. - # Corresponds to the JSON property `location` - # @return [String] - attr_accessor :location - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @file_hash = args[:file_hash] if args.key?(:file_hash) - @location = args[:location] if args.key?(:location) - end - end - - # Artifacts produced by a build that should be uploaded upon - # successful completion of all build steps. - class Artifacts - include Google::Apis::Core::Hashable - - # A list of images to be pushed upon the successful completion of all build - # steps. - # The images will be pushed using the builder service account's credentials. - # The digests of the pushed images will be stored in the Build resource's - # results field. - # If any of the images fail to be pushed, the build is marked FAILURE. - # Corresponds to the JSON property `images` - # @return [Array] - attr_accessor :images - - # Files in the workspace to upload to Cloud Storage upon successful - # completion of all build steps. - # Corresponds to the JSON property `objects` - # @return [Google::Apis::CloudbuildV1alpha1::ArtifactObjects] - attr_accessor :objects - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @images = args[:images] if args.key?(:images) - @objects = args[:objects] if args.key?(:objects) - end - end - - # A build resource in the Cloud Build API. - # At a high level, a `Build` describes where to find source code, how to build - # it (for example, the builder image to run on the source), and where to store - # the built artifacts. - # Fields can include the following variables, which will be expanded when the - # build is created: - # - $PROJECT_ID: the project ID of the build. - # - $BUILD_ID: the autogenerated ID of the build. - # - $REPO_NAME: the source repository name specified by RepoSource. - # - $BRANCH_NAME: the branch name specified by RepoSource. - # - $TAG_NAME: the tag name specified by RepoSource. - # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or - # resolved from the specified branch or tag. - # - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA. - class Build - include Google::Apis::Core::Hashable - - # Artifacts produced by a build that should be uploaded upon - # successful completion of all build steps. - # Corresponds to the JSON property `artifacts` - # @return [Google::Apis::CloudbuildV1alpha1::Artifacts] - attr_accessor :artifacts - - # Output only. The ID of the `BuildTrigger` that triggered this build, if it - # was triggered automatically. - # Corresponds to the JSON property `buildTriggerId` - # @return [String] - attr_accessor :build_trigger_id - - # Output only. Time at which the request to create the build was received. - # Corresponds to the JSON property `createTime` - # @return [String] - attr_accessor :create_time - - # Output only. Time at which execution of the build was finished. - # The difference between finish_time and start_time is the duration of the - # build's execution. - # Corresponds to the JSON property `finishTime` - # @return [String] - attr_accessor :finish_time - - # Output only. Unique identifier of the build. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # A list of images to be pushed upon the successful completion of all build - # steps. - # The images are pushed using the builder service account's credentials. - # The digests of the pushed images will be stored in the `Build` resource's - # results field. - # If any of the images fail to be pushed, the build status is marked - # `FAILURE`. - # Corresponds to the JSON property `images` - # @return [Array] - attr_accessor :images - - # Output only. URL to logs for this build in Google Cloud Console. - # Corresponds to the JSON property `logUrl` - # @return [String] - attr_accessor :log_url - - # Google Cloud Storage bucket where logs should be written (see - # [Bucket Name - # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements) - # ). - # Logs file names will be of the format `$`logs_bucket`/log-$`build_id`.txt`. - # Corresponds to the JSON property `logsBucket` - # @return [String] - attr_accessor :logs_bucket - - # Optional arguments to enable specific features of builds. - # Corresponds to the JSON property `options` - # @return [Google::Apis::CloudbuildV1alpha1::BuildOptions] - attr_accessor :options - - # Output only. ID of the project. - # Corresponds to the JSON property `projectId` - # @return [String] - attr_accessor :project_id - - # Artifacts created by the build pipeline. - # Corresponds to the JSON property `results` - # @return [Google::Apis::CloudbuildV1alpha1::Results] - attr_accessor :results - - # Secrets to decrypt using Cloud Key Management Service. - # Corresponds to the JSON property `secrets` - # @return [Array] - attr_accessor :secrets - - # Location of the source in a supported storage service. - # Corresponds to the JSON property `source` - # @return [Google::Apis::CloudbuildV1alpha1::Source] - attr_accessor :source - - # Provenance of the source. Ways to find the original source, or verify that - # some source was used for this build. - # Corresponds to the JSON property `sourceProvenance` - # @return [Google::Apis::CloudbuildV1alpha1::SourceProvenance] - attr_accessor :source_provenance - - # Output only. Time at which execution of the build was started. - # Corresponds to the JSON property `startTime` - # @return [String] - attr_accessor :start_time - - # Output only. Status of the build. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # Output only. Customer-readable message about the current status. - # Corresponds to the JSON property `statusDetail` - # @return [String] - attr_accessor :status_detail - - # Required. The operations to be performed on the workspace. - # Corresponds to the JSON property `steps` - # @return [Array] - attr_accessor :steps - - # Substitutions data for `Build` resource. - # Corresponds to the JSON property `substitutions` - # @return [Hash] - attr_accessor :substitutions - - # Tags for annotation of a `Build`. These are not docker tags. - # Corresponds to the JSON property `tags` - # @return [Array] - attr_accessor :tags - - # Amount of time that this build should be allowed to run, to second - # granularity. If this amount of time elapses, work on the build will cease - # and the build status will be `TIMEOUT`. - # Default time is ten minutes. - # Corresponds to the JSON property `timeout` - # @return [String] - attr_accessor :timeout - - # Output only. Stores timing information for phases of the build. Valid keys - # are: - # * BUILD: time to execute all build steps - # * PUSH: time to push all specified images. - # * FETCHSOURCE: time to fetch source. - # If the build does not specify source or images, - # these keys will not be included. - # Corresponds to the JSON property `timing` - # @return [Hash] - attr_accessor :timing - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @artifacts = args[:artifacts] if args.key?(:artifacts) - @build_trigger_id = args[:build_trigger_id] if args.key?(:build_trigger_id) - @create_time = args[:create_time] if args.key?(:create_time) - @finish_time = args[:finish_time] if args.key?(:finish_time) - @id = args[:id] if args.key?(:id) - @images = args[:images] if args.key?(:images) - @log_url = args[:log_url] if args.key?(:log_url) - @logs_bucket = args[:logs_bucket] if args.key?(:logs_bucket) - @options = args[:options] if args.key?(:options) - @project_id = args[:project_id] if args.key?(:project_id) - @results = args[:results] if args.key?(:results) - @secrets = args[:secrets] if args.key?(:secrets) - @source = args[:source] if args.key?(:source) - @source_provenance = args[:source_provenance] if args.key?(:source_provenance) - @start_time = args[:start_time] if args.key?(:start_time) - @status = args[:status] if args.key?(:status) - @status_detail = args[:status_detail] if args.key?(:status_detail) - @steps = args[:steps] if args.key?(:steps) - @substitutions = args[:substitutions] if args.key?(:substitutions) - @tags = args[:tags] if args.key?(:tags) - @timeout = args[:timeout] if args.key?(:timeout) - @timing = args[:timing] if args.key?(:timing) - end - end - - # Metadata for build operations. - class BuildOperationMetadata - include Google::Apis::Core::Hashable - - # A build resource in the Cloud Build API. - # At a high level, a `Build` describes where to find source code, how to build - # it (for example, the builder image to run on the source), and where to store - # the built artifacts. - # Fields can include the following variables, which will be expanded when the - # build is created: - # - $PROJECT_ID: the project ID of the build. - # - $BUILD_ID: the autogenerated ID of the build. - # - $REPO_NAME: the source repository name specified by RepoSource. - # - $BRANCH_NAME: the branch name specified by RepoSource. - # - $TAG_NAME: the tag name specified by RepoSource. - # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or - # resolved from the specified branch or tag. - # - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA. - # Corresponds to the JSON property `build` - # @return [Google::Apis::CloudbuildV1alpha1::Build] - attr_accessor :build - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @build = args[:build] if args.key?(:build) - end - end - - # Optional arguments to enable specific features of builds. - class BuildOptions - include Google::Apis::Core::Hashable - - # Requested disk size for the VM that runs the build. Note that this is *NOT* - # "disk free"; some of the space will be used by the operating system and - # build utilities. Also note that this is the minimum disk size that will be - # allocated for the build -- the build may run with a larger disk than - # requested. At present, the maximum disk size is 1000GB; builds that request - # more than the maximum are rejected with an error. - # Corresponds to the JSON property `diskSizeGb` - # @return [Fixnum] - attr_accessor :disk_size_gb - - # A list of global environment variable definitions that will exist for all - # build steps in this build. If a variable is defined in both globally and in - # a build step, the variable will use the build step value. - # The elements are of the form "KEY=VALUE" for the environment variable "KEY" - # being given the value "VALUE". - # Corresponds to the JSON property `env` - # @return [Array] - attr_accessor :env - - # Option to define build log streaming behavior to Google Cloud - # Storage. - # Corresponds to the JSON property `logStreamingOption` - # @return [String] - attr_accessor :log_streaming_option - - # Option to specify the logging mode, which determines where the logs are - # stored. - # Corresponds to the JSON property `logging` - # @return [String] - attr_accessor :logging - - # Compute Engine machine type on which to run the build. - # Corresponds to the JSON property `machineType` - # @return [String] - attr_accessor :machine_type - - # Requested verifiability options. - # Corresponds to the JSON property `requestedVerifyOption` - # @return [String] - attr_accessor :requested_verify_option - - # A list of global environment variables, which are encrypted using a Cloud - # Key Management Service crypto key. These values must be specified in the - # build's `Secret`. These variables will be available to all build steps - # in this build. - # Corresponds to the JSON property `secretEnv` - # @return [Array] - attr_accessor :secret_env - - # Requested hash for SourceProvenance. - # Corresponds to the JSON property `sourceProvenanceHash` - # @return [Array] - attr_accessor :source_provenance_hash - - # Option to specify behavior when there is an error in the substitution - # checks. - # Corresponds to the JSON property `substitutionOption` - # @return [String] - attr_accessor :substitution_option - - # Global list of volumes to mount for ALL build steps - # Each volume is created as an empty volume prior to starting the build - # process. Upon completion of the build, volumes and their contents are - # discarded. Global volume names and paths cannot conflict with the volumes - # defined a build step. - # Using a global volume in a build with only one step is not valid as - # it is indicative of a build request with an incorrect configuration. - # Corresponds to the JSON property `volumes` - # @return [Array] - attr_accessor :volumes - - # Option to specify a `WorkerPool` for the build. User specifies the pool - # with the format "[WORKERPOOL_PROJECT_ID]/[WORKERPOOL_NAME]". - # This is an experimental field. - # Corresponds to the JSON property `workerPool` - # @return [String] - attr_accessor :worker_pool - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @disk_size_gb = args[:disk_size_gb] if args.key?(:disk_size_gb) - @env = args[:env] if args.key?(:env) - @log_streaming_option = args[:log_streaming_option] if args.key?(:log_streaming_option) - @logging = args[:logging] if args.key?(:logging) - @machine_type = args[:machine_type] if args.key?(:machine_type) - @requested_verify_option = args[:requested_verify_option] if args.key?(:requested_verify_option) - @secret_env = args[:secret_env] if args.key?(:secret_env) - @source_provenance_hash = args[:source_provenance_hash] if args.key?(:source_provenance_hash) - @substitution_option = args[:substitution_option] if args.key?(:substitution_option) - @volumes = args[:volumes] if args.key?(:volumes) - @worker_pool = args[:worker_pool] if args.key?(:worker_pool) - end - end - - # A step in the build pipeline. - class BuildStep - include Google::Apis::Core::Hashable - - # A list of arguments that will be presented to the step when it is started. - # If the image used to run the step's container has an entrypoint, the `args` - # are used as arguments to that entrypoint. If the image does not define - # an entrypoint, the first element in args is used as the entrypoint, - # and the remainder will be used as arguments. - # Corresponds to the JSON property `args` - # @return [Array] - attr_accessor :args - - # Working directory to use when running this step's container. - # If this value is a relative path, it is relative to the build's working - # directory. If this value is absolute, it may be outside the build's working - # directory, in which case the contents of the path may not be persisted - # across build step executions, unless a `volume` for that path is specified. - # If the build specifies a `RepoSource` with `dir` and a step with a `dir`, - # which specifies an absolute path, the `RepoSource` `dir` is ignored for - # the step's execution. - # Corresponds to the JSON property `dir` - # @return [String] - attr_accessor :dir - - # Entrypoint to be used instead of the build step image's default entrypoint. - # If unset, the image's default entrypoint is used. - # Corresponds to the JSON property `entrypoint` - # @return [String] - attr_accessor :entrypoint - - # A list of environment variable definitions to be used when running a step. - # The elements are of the form "KEY=VALUE" for the environment variable "KEY" - # being given the value "VALUE". - # Corresponds to the JSON property `env` - # @return [Array] - attr_accessor :env - - # Unique identifier for this build step, used in `wait_for` to - # reference this build step as a dependency. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Required. The name of the container image that will run this particular - # build step. - # If the image is available in the host's Docker daemon's cache, it - # will be run directly. If not, the host will attempt to pull the image - # first, using the builder service account's credentials if necessary. - # The Docker daemon's cache will already have the latest versions of all of - # the officially supported build steps - # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/ - # GoogleCloudPlatform/cloud-builders)). - # The Docker daemon will also have cached many of the layers for some popular - # images, like "ubuntu", "debian", but they will be refreshed at the time you - # attempt to use them. - # If you built an image in a previous build step, it will be stored in the - # host's Docker daemon's cache and is available to use as the name for a - # later build step. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Start and end times for a build execution phase. - # Corresponds to the JSON property `pullTiming` - # @return [Google::Apis::CloudbuildV1alpha1::TimeSpan] - attr_accessor :pull_timing - - # A list of environment variables which are encrypted using a Cloud Key - # Management Service crypto key. These values must be specified in the - # build's `Secret`. - # Corresponds to the JSON property `secretEnv` - # @return [Array] - attr_accessor :secret_env - - # Output only. Status of the build step. At this time, build step status is - # only updated on build completion; step status is not updated in real-time - # as the build progresses. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # Time limit for executing this build step. If not defined, the step has no - # time limit and will be allowed to continue to run until either it completes - # or the build itself times out. - # Corresponds to the JSON property `timeout` - # @return [String] - attr_accessor :timeout - - # Start and end times for a build execution phase. - # Corresponds to the JSON property `timing` - # @return [Google::Apis::CloudbuildV1alpha1::TimeSpan] - attr_accessor :timing - - # List of volumes to mount into the build step. - # Each volume is created as an empty volume prior to execution of the - # build step. Upon completion of the build, volumes and their contents are - # discarded. - # Using a named volume in only one step is not valid as it is indicative - # of a build request with an incorrect configuration. - # Corresponds to the JSON property `volumes` - # @return [Array] - attr_accessor :volumes - - # The ID(s) of the step(s) that this build step depends on. - # This build step will not start until all the build steps in `wait_for` - # have completed successfully. If `wait_for` is empty, this build step will - # start when all previous build steps in the `Build.Steps` list have - # completed successfully. - # Corresponds to the JSON property `waitFor` - # @return [Array] - attr_accessor :wait_for - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @args = args[:args] if args.key?(:args) - @dir = args[:dir] if args.key?(:dir) - @entrypoint = args[:entrypoint] if args.key?(:entrypoint) - @env = args[:env] if args.key?(:env) - @id = args[:id] if args.key?(:id) - @name = args[:name] if args.key?(:name) - @pull_timing = args[:pull_timing] if args.key?(:pull_timing) - @secret_env = args[:secret_env] if args.key?(:secret_env) - @status = args[:status] if args.key?(:status) - @timeout = args[:timeout] if args.key?(:timeout) - @timing = args[:timing] if args.key?(:timing) - @volumes = args[:volumes] if args.key?(:volumes) - @wait_for = args[:wait_for] if args.key?(:wait_for) - end - end - - # An image built by the pipeline. - class BuiltImage - include Google::Apis::Core::Hashable - - # Docker Registry 2.0 digest. - # Corresponds to the JSON property `digest` - # @return [String] - attr_accessor :digest - - # Name used to push the container image to Google Container Registry, as - # presented to `docker push`. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Start and end times for a build execution phase. - # Corresponds to the JSON property `pushTiming` - # @return [Google::Apis::CloudbuildV1alpha1::TimeSpan] - attr_accessor :push_timing - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @digest = args[:digest] if args.key?(:digest) - @name = args[:name] if args.key?(:name) - @push_timing = args[:push_timing] if args.key?(:push_timing) - 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 - - # Container message for hashes of byte content of files, used in - # SourceProvenance messages to verify integrity of source input to the build. - class FileHashes - include Google::Apis::Core::Hashable - - # Collection of file hashes. - # Corresponds to the JSON property `fileHash` - # @return [Array] - attr_accessor :file_hash - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @file_hash = args[:file_hash] if args.key?(:file_hash) - end - end - - # Container message for hash values. - class HashProp - include Google::Apis::Core::Hashable - - # The type of hash that was performed. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # The hash value. - # Corresponds to the JSON property `value` - # NOTE: Values are automatically base64 encoded/decoded in the client library. - # @return [String] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @type = args[:type] if args.key?(:type) - @value = args[:value] if args.key?(:value) - end - end - - # Response containing existing `WorkerPools`. - class ListWorkerPoolsResponse - include Google::Apis::Core::Hashable - - # `WorkerPools` for the project. - # Corresponds to the JSON property `workerPools` - # @return [Array] - attr_accessor :worker_pools - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @worker_pools = args[:worker_pools] if args.key?(:worker_pools) - end - end - - # Network describes the GCP network used to create workers in. - class Network - include Google::Apis::Core::Hashable - - # Network on which the workers are created. - # "default" network is used if empty. - # Corresponds to the JSON property `network` - # @return [String] - attr_accessor :network - - # Project id containing the defined network and subnetwork. For a peered VPC, - # this will be the same as the project_id in which the workers are created. - # For a shared VPC, this will be the project sharing the network with the - # project_id project in which workers will be created. For custom workers - # with no VPC, this will be the same as project_id. - # Corresponds to the JSON property `projectId` - # @return [String] - attr_accessor :project_id - - # Subnetwork on which the workers are created. - # "default" subnetwork is used if empty. - # Corresponds to the JSON property `subnetwork` - # @return [String] - attr_accessor :subnetwork - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @network = args[:network] if args.key?(:network) - @project_id = args[:project_id] if args.key?(:project_id) - @subnetwork = args[:subnetwork] if args.key?(:subnetwork) - end - end - - # Location of the source in a Google Cloud Source Repository. - class RepoSource - include Google::Apis::Core::Hashable - - # Regex matching branches to build. - # The syntax of the regular expressions accepted is the syntax accepted by - # RE2 and described at https://github.com/google/re2/wiki/Syntax - # Corresponds to the JSON property `branchName` - # @return [String] - attr_accessor :branch_name - - # Explicit commit SHA to build. - # Corresponds to the JSON property `commitSha` - # @return [String] - attr_accessor :commit_sha - - # Directory, relative to the source root, in which to run the build. - # This must be a relative path. If a step's `dir` is specified and is an - # absolute path, this value is ignored for that step's execution. - # Corresponds to the JSON property `dir` - # @return [String] - attr_accessor :dir - - # ID of the project that owns the Cloud Source Repository. If omitted, the - # project ID requesting the build is assumed. - # Corresponds to the JSON property `projectId` - # @return [String] - attr_accessor :project_id - - # Required. Name of the Cloud Source Repository. - # Corresponds to the JSON property `repoName` - # @return [String] - attr_accessor :repo_name - - # Substitutions to use in a triggered build. - # Should only be used with RunBuildTrigger - # Corresponds to the JSON property `substitutions` - # @return [Hash] - attr_accessor :substitutions - - # Regex matching tags to build. - # The syntax of the regular expressions accepted is the syntax accepted by - # RE2 and described at https://github.com/google/re2/wiki/Syntax - # Corresponds to the JSON property `tagName` - # @return [String] - attr_accessor :tag_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @branch_name = args[:branch_name] if args.key?(:branch_name) - @commit_sha = args[:commit_sha] if args.key?(:commit_sha) - @dir = args[:dir] if args.key?(:dir) - @project_id = args[:project_id] if args.key?(:project_id) - @repo_name = args[:repo_name] if args.key?(:repo_name) - @substitutions = args[:substitutions] if args.key?(:substitutions) - @tag_name = args[:tag_name] if args.key?(:tag_name) - end - end - - # Artifacts created by the build pipeline. - class Results - include Google::Apis::Core::Hashable - - # Path to the artifact manifest. Only populated when artifacts are uploaded. - # Corresponds to the JSON property `artifactManifest` - # @return [String] - attr_accessor :artifact_manifest - - # Start and end times for a build execution phase. - # Corresponds to the JSON property `artifactTiming` - # @return [Google::Apis::CloudbuildV1alpha1::TimeSpan] - attr_accessor :artifact_timing - - # List of build step digests, in the order corresponding to build step - # indices. - # Corresponds to the JSON property `buildStepImages` - # @return [Array] - attr_accessor :build_step_images - - # List of build step outputs, produced by builder images, in the order - # corresponding to build step indices. - # [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders) - # can produce this output by writing to `$BUILDER_OUTPUT/output`. - # Only the first 4KB of data is stored. - # Corresponds to the JSON property `buildStepOutputs` - # @return [Array] - attr_accessor :build_step_outputs - - # Container images that were built as a part of the build. - # Corresponds to the JSON property `images` - # @return [Array] - attr_accessor :images - - # Number of artifacts uploaded. Only populated when artifacts are uploaded. - # Corresponds to the JSON property `numArtifacts` - # @return [Fixnum] - attr_accessor :num_artifacts - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @artifact_manifest = args[:artifact_manifest] if args.key?(:artifact_manifest) - @artifact_timing = args[:artifact_timing] if args.key?(:artifact_timing) - @build_step_images = args[:build_step_images] if args.key?(:build_step_images) - @build_step_outputs = args[:build_step_outputs] if args.key?(:build_step_outputs) - @images = args[:images] if args.key?(:images) - @num_artifacts = args[:num_artifacts] if args.key?(:num_artifacts) - end - end - - # Pairs a set of secret environment variables containing encrypted - # values with the Cloud KMS key to use to decrypt the value. - class Secret - include Google::Apis::Core::Hashable - - # Cloud KMS key name to use to decrypt these envs. - # Corresponds to the JSON property `kmsKeyName` - # @return [String] - attr_accessor :kms_key_name - - # Map of environment variable name to its encrypted value. - # Secret environment variables must be unique across all of a build's - # secrets, and must be used by at least one build step. Values can be at most - # 64 KB in size. There can be at most 100 secret values across all of a - # build's secrets. - # Corresponds to the JSON property `secretEnv` - # @return [Hash] - attr_accessor :secret_env - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kms_key_name = args[:kms_key_name] if args.key?(:kms_key_name) - @secret_env = args[:secret_env] if args.key?(:secret_env) - end - end - - # Location of the source in a supported storage service. - class Source - include Google::Apis::Core::Hashable - - # Location of the source in a Google Cloud Source Repository. - # Corresponds to the JSON property `repoSource` - # @return [Google::Apis::CloudbuildV1alpha1::RepoSource] - attr_accessor :repo_source - - # Location of the source in an archive file in Google Cloud Storage. - # Corresponds to the JSON property `storageSource` - # @return [Google::Apis::CloudbuildV1alpha1::StorageSource] - attr_accessor :storage_source - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @repo_source = args[:repo_source] if args.key?(:repo_source) - @storage_source = args[:storage_source] if args.key?(:storage_source) - end - end - - # Provenance of the source. Ways to find the original source, or verify that - # some source was used for this build. - class SourceProvenance - include Google::Apis::Core::Hashable - - # Output only. Hash(es) of the build source, which can be used to verify that - # the original source integrity was maintained in the build. Note that - # `FileHashes` will only be populated if `BuildOptions` has requested a - # `SourceProvenanceHash`. - # The keys to this map are file paths used as build source and the values - # contain the hash values for those files. - # If the build source came in a single package such as a gzipped tarfile - # (`.tar.gz`), the `FileHash` will be for the single path to that file. - # Corresponds to the JSON property `fileHashes` - # @return [Hash] - attr_accessor :file_hashes - - # Location of the source in a Google Cloud Source Repository. - # Corresponds to the JSON property `resolvedRepoSource` - # @return [Google::Apis::CloudbuildV1alpha1::RepoSource] - attr_accessor :resolved_repo_source - - # Location of the source in an archive file in Google Cloud Storage. - # Corresponds to the JSON property `resolvedStorageSource` - # @return [Google::Apis::CloudbuildV1alpha1::StorageSource] - attr_accessor :resolved_storage_source - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @file_hashes = args[:file_hashes] if args.key?(:file_hashes) - @resolved_repo_source = args[:resolved_repo_source] if args.key?(:resolved_repo_source) - @resolved_storage_source = args[:resolved_storage_source] if args.key?(:resolved_storage_source) - end - end - - # Location of the source in an archive file in Google Cloud Storage. - class StorageSource - include Google::Apis::Core::Hashable - - # Google Cloud Storage bucket containing the source (see - # [Bucket Name - # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements) - # ). - # Corresponds to the JSON property `bucket` - # @return [String] - attr_accessor :bucket - - # Google Cloud Storage generation for the object. If the generation is - # omitted, the latest generation will be used. - # Corresponds to the JSON property `generation` - # @return [Fixnum] - attr_accessor :generation - - # Google Cloud Storage object containing the source. - # This object must be a gzipped archive file (`.tar.gz`) containing source to - # build. - # Corresponds to the JSON property `object` - # @return [String] - attr_accessor :object - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @bucket = args[:bucket] if args.key?(:bucket) - @generation = args[:generation] if args.key?(:generation) - @object = args[:object] if args.key?(:object) - end - end - - # Start and end times for a build execution phase. - class TimeSpan - include Google::Apis::Core::Hashable - - # End of time span. - # Corresponds to the JSON property `endTime` - # @return [String] - attr_accessor :end_time - - # Start of time span. - # Corresponds to the JSON property `startTime` - # @return [String] - attr_accessor :start_time - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @end_time = args[:end_time] if args.key?(:end_time) - @start_time = args[:start_time] if args.key?(:start_time) - end - end - - # Volume describes a Docker container volume which is mounted into build steps - # in order to persist files across build step execution. - class Volume - include Google::Apis::Core::Hashable - - # Name of the volume to mount. - # Volume names must be unique per build step and must be valid names for - # Docker volumes. Each named volume must be used by at least two build steps. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Path at which to mount the volume. - # Paths must be absolute and cannot conflict with other volume paths on the - # same build step or with certain reserved volume paths. - # Corresponds to the JSON property `path` - # @return [String] - attr_accessor :path - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @name = args[:name] if args.key?(:name) - @path = args[:path] if args.key?(:path) - end - end - - # WorkerConfig defines the configuration to be used for a creating workers in - # the pool. - class WorkerConfig - include Google::Apis::Core::Hashable - - # Size of the disk attached to the worker, in GB. - # See https://cloud.google.com/compute/docs/disks/ - # If `0` is specified, Cloud Build will use a standard disk size. - # `disk_size` is overridden if you specify a different disk size in - # `build_options`. In this case, a VM with a disk size specified in the - # `build_options` will be created on demand at build time. For more - # information see - # https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects. - # builds#buildoptions - # Corresponds to the JSON property `diskSizeGb` - # @return [Fixnum] - attr_accessor :disk_size_gb - - # Machine Type of the worker, such as n1-standard-1. - # See https://cloud.google.com/compute/docs/machine-types. - # If left blank, Cloud Build will use a standard unspecified machine to - # create the worker pool. - # `machine_type` is overridden if you specify a different machine type in - # `build_options`. In this case, the VM specified in the `build_options` - # will be created on demand at build time. For more information see - # https://cloud.google.com/cloud-build/docs/speeding-up-builds# - # using_custom_virtual_machine_sizes - # Corresponds to the JSON property `machineType` - # @return [String] - attr_accessor :machine_type - - # Network describes the GCP network used to create workers in. - # Corresponds to the JSON property `network` - # @return [Google::Apis::CloudbuildV1alpha1::Network] - attr_accessor :network - - # The tag applied to the worker, and the same tag used by the firewall rule. - # It is used to identify the Cloud Build workers among other VMs. - # The default value for tag is `worker`. - # Corresponds to the JSON property `tag` - # @return [String] - attr_accessor :tag - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @disk_size_gb = args[:disk_size_gb] if args.key?(:disk_size_gb) - @machine_type = args[:machine_type] if args.key?(:machine_type) - @network = args[:network] if args.key?(:network) - @tag = args[:tag] if args.key?(:tag) - end - end - - # Configuration for a WorkerPool to run the builds. - # Workers are machines that Cloud Build uses to run your builds. By default, - # all workers run in a project owned by Cloud Build. To have full control over - # the workers that execute your builds -- such as enabling them to access - # private resources on your private network -- you can request Cloud Build to - # run the workers in your own project by creating a custom workers pool. - class WorkerPool - include Google::Apis::Core::Hashable - - # Output only. Time at which the request to create the `WorkerPool` was - # received. - # Corresponds to the JSON property `createTime` - # @return [String] - attr_accessor :create_time - - # Output only. Time at which the request to delete the `WorkerPool` was - # received. - # Corresponds to the JSON property `deleteTime` - # @return [String] - attr_accessor :delete_time - - # User-defined name of the `WorkerPool`. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The project ID of the GCP project for which the `WorkerPool` is created. - # Corresponds to the JSON property `projectId` - # @return [String] - attr_accessor :project_id - - # List of regions to create the `WorkerPool`. Regions can't be empty. - # If Cloud Build adds a new GCP region in the future, the existing - # `WorkerPool` will not be enabled in the new region automatically; - # you must add the new region to the `regions` field to enable the - # `WorkerPool` in that region. - # Corresponds to the JSON property `regions` - # @return [Array] - attr_accessor :regions - - # Output only. The service account used to manage the `WorkerPool`. The - # service account must have the Compute Instance Admin (Beta) permission at - # the project level. - # Corresponds to the JSON property `serviceAccountEmail` - # @return [String] - attr_accessor :service_account_email - - # Output only. WorkerPool Status. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # Output only. Time at which the request to update the `WorkerPool` was - # received. - # Corresponds to the JSON property `updateTime` - # @return [String] - attr_accessor :update_time - - # WorkerConfig defines the configuration to be used for a creating workers in - # the pool. - # Corresponds to the JSON property `workerConfig` - # @return [Google::Apis::CloudbuildV1alpha1::WorkerConfig] - attr_accessor :worker_config - - # Total number of workers to be created across all requested regions. - # Corresponds to the JSON property `workerCount` - # @return [Fixnum] - attr_accessor :worker_count - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @create_time = args[:create_time] if args.key?(:create_time) - @delete_time = args[:delete_time] if args.key?(:delete_time) - @name = args[:name] if args.key?(:name) - @project_id = args[:project_id] if args.key?(:project_id) - @regions = args[:regions] if args.key?(:regions) - @service_account_email = args[:service_account_email] if args.key?(:service_account_email) - @status = args[:status] if args.key?(:status) - @update_time = args[:update_time] if args.key?(:update_time) - @worker_config = args[:worker_config] if args.key?(:worker_config) - @worker_count = args[:worker_count] if args.key?(:worker_count) - end - end - end - end -end diff --git a/generated/google/apis/cloudbuild_v1alpha1/representations.rb b/generated/google/apis/cloudbuild_v1alpha1/representations.rb deleted file mode 100644 index 06dd7b039..000000000 --- a/generated/google/apis/cloudbuild_v1alpha1/representations.rb +++ /dev/null @@ -1,435 +0,0 @@ -# Copyright 2015 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -require 'date' -require 'google/apis/core/base_service' -require 'google/apis/core/json_representation' -require 'google/apis/core/hashable' -require 'google/apis/errors' - -module Google - module Apis - module CloudbuildV1alpha1 - - class ArtifactObjects - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ArtifactResult - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Artifacts - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Build - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BuildOperationMetadata - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BuildOptions - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BuildStep - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BuiltImage - 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 FileHashes - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class HashProp - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListWorkerPoolsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Network - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class RepoSource - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Results - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Secret - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Source - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SourceProvenance - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class StorageSource - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class TimeSpan - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Volume - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class WorkerConfig - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class WorkerPool - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ArtifactObjects - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :location, as: 'location' - collection :paths, as: 'paths' - property :timing, as: 'timing', class: Google::Apis::CloudbuildV1alpha1::TimeSpan, decorator: Google::Apis::CloudbuildV1alpha1::TimeSpan::Representation - - end - end - - class ArtifactResult - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :file_hash, as: 'fileHash', class: Google::Apis::CloudbuildV1alpha1::FileHashes, decorator: Google::Apis::CloudbuildV1alpha1::FileHashes::Representation - - property :location, as: 'location' - end - end - - class Artifacts - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :images, as: 'images' - property :objects, as: 'objects', class: Google::Apis::CloudbuildV1alpha1::ArtifactObjects, decorator: Google::Apis::CloudbuildV1alpha1::ArtifactObjects::Representation - - end - end - - class Build - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :artifacts, as: 'artifacts', class: Google::Apis::CloudbuildV1alpha1::Artifacts, decorator: Google::Apis::CloudbuildV1alpha1::Artifacts::Representation - - property :build_trigger_id, as: 'buildTriggerId' - property :create_time, as: 'createTime' - property :finish_time, as: 'finishTime' - property :id, as: 'id' - collection :images, as: 'images' - property :log_url, as: 'logUrl' - property :logs_bucket, as: 'logsBucket' - property :options, as: 'options', class: Google::Apis::CloudbuildV1alpha1::BuildOptions, decorator: Google::Apis::CloudbuildV1alpha1::BuildOptions::Representation - - property :project_id, as: 'projectId' - property :results, as: 'results', class: Google::Apis::CloudbuildV1alpha1::Results, decorator: Google::Apis::CloudbuildV1alpha1::Results::Representation - - collection :secrets, as: 'secrets', class: Google::Apis::CloudbuildV1alpha1::Secret, decorator: Google::Apis::CloudbuildV1alpha1::Secret::Representation - - property :source, as: 'source', class: Google::Apis::CloudbuildV1alpha1::Source, decorator: Google::Apis::CloudbuildV1alpha1::Source::Representation - - property :source_provenance, as: 'sourceProvenance', class: Google::Apis::CloudbuildV1alpha1::SourceProvenance, decorator: Google::Apis::CloudbuildV1alpha1::SourceProvenance::Representation - - property :start_time, as: 'startTime' - property :status, as: 'status' - property :status_detail, as: 'statusDetail' - collection :steps, as: 'steps', class: Google::Apis::CloudbuildV1alpha1::BuildStep, decorator: Google::Apis::CloudbuildV1alpha1::BuildStep::Representation - - hash :substitutions, as: 'substitutions' - collection :tags, as: 'tags' - property :timeout, as: 'timeout' - hash :timing, as: 'timing', class: Google::Apis::CloudbuildV1alpha1::TimeSpan, decorator: Google::Apis::CloudbuildV1alpha1::TimeSpan::Representation - - end - end - - class BuildOperationMetadata - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :build, as: 'build', class: Google::Apis::CloudbuildV1alpha1::Build, decorator: Google::Apis::CloudbuildV1alpha1::Build::Representation - - end - end - - class BuildOptions - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :disk_size_gb, :numeric_string => true, as: 'diskSizeGb' - collection :env, as: 'env' - property :log_streaming_option, as: 'logStreamingOption' - property :logging, as: 'logging' - property :machine_type, as: 'machineType' - property :requested_verify_option, as: 'requestedVerifyOption' - collection :secret_env, as: 'secretEnv' - collection :source_provenance_hash, as: 'sourceProvenanceHash' - property :substitution_option, as: 'substitutionOption' - collection :volumes, as: 'volumes', class: Google::Apis::CloudbuildV1alpha1::Volume, decorator: Google::Apis::CloudbuildV1alpha1::Volume::Representation - - property :worker_pool, as: 'workerPool' - end - end - - class BuildStep - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :args, as: 'args' - property :dir, as: 'dir' - property :entrypoint, as: 'entrypoint' - collection :env, as: 'env' - property :id, as: 'id' - property :name, as: 'name' - property :pull_timing, as: 'pullTiming', class: Google::Apis::CloudbuildV1alpha1::TimeSpan, decorator: Google::Apis::CloudbuildV1alpha1::TimeSpan::Representation - - collection :secret_env, as: 'secretEnv' - property :status, as: 'status' - property :timeout, as: 'timeout' - property :timing, as: 'timing', class: Google::Apis::CloudbuildV1alpha1::TimeSpan, decorator: Google::Apis::CloudbuildV1alpha1::TimeSpan::Representation - - collection :volumes, as: 'volumes', class: Google::Apis::CloudbuildV1alpha1::Volume, decorator: Google::Apis::CloudbuildV1alpha1::Volume::Representation - - collection :wait_for, as: 'waitFor' - end - end - - class BuiltImage - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :digest, as: 'digest' - property :name, as: 'name' - property :push_timing, as: 'pushTiming', class: Google::Apis::CloudbuildV1alpha1::TimeSpan, decorator: Google::Apis::CloudbuildV1alpha1::TimeSpan::Representation - - end - end - - class Empty - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end - end - - class FileHashes - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :file_hash, as: 'fileHash', class: Google::Apis::CloudbuildV1alpha1::HashProp, decorator: Google::Apis::CloudbuildV1alpha1::HashProp::Representation - - end - end - - class HashProp - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :type, as: 'type' - property :value, :base64 => true, as: 'value' - end - end - - class ListWorkerPoolsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :worker_pools, as: 'workerPools', class: Google::Apis::CloudbuildV1alpha1::WorkerPool, decorator: Google::Apis::CloudbuildV1alpha1::WorkerPool::Representation - - end - end - - class Network - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :network, as: 'network' - property :project_id, as: 'projectId' - property :subnetwork, as: 'subnetwork' - end - end - - class RepoSource - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :branch_name, as: 'branchName' - property :commit_sha, as: 'commitSha' - property :dir, as: 'dir' - property :project_id, as: 'projectId' - property :repo_name, as: 'repoName' - hash :substitutions, as: 'substitutions' - property :tag_name, as: 'tagName' - end - end - - class Results - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :artifact_manifest, as: 'artifactManifest' - property :artifact_timing, as: 'artifactTiming', class: Google::Apis::CloudbuildV1alpha1::TimeSpan, decorator: Google::Apis::CloudbuildV1alpha1::TimeSpan::Representation - - collection :build_step_images, as: 'buildStepImages' - collection :build_step_outputs, as: 'buildStepOutputs' - collection :images, as: 'images', class: Google::Apis::CloudbuildV1alpha1::BuiltImage, decorator: Google::Apis::CloudbuildV1alpha1::BuiltImage::Representation - - property :num_artifacts, :numeric_string => true, as: 'numArtifacts' - end - end - - class Secret - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :kms_key_name, as: 'kmsKeyName' - hash :secret_env, as: 'secretEnv' - end - end - - class Source - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :repo_source, as: 'repoSource', class: Google::Apis::CloudbuildV1alpha1::RepoSource, decorator: Google::Apis::CloudbuildV1alpha1::RepoSource::Representation - - property :storage_source, as: 'storageSource', class: Google::Apis::CloudbuildV1alpha1::StorageSource, decorator: Google::Apis::CloudbuildV1alpha1::StorageSource::Representation - - end - end - - class SourceProvenance - # @private - class Representation < Google::Apis::Core::JsonRepresentation - hash :file_hashes, as: 'fileHashes', class: Google::Apis::CloudbuildV1alpha1::FileHashes, decorator: Google::Apis::CloudbuildV1alpha1::FileHashes::Representation - - property :resolved_repo_source, as: 'resolvedRepoSource', class: Google::Apis::CloudbuildV1alpha1::RepoSource, decorator: Google::Apis::CloudbuildV1alpha1::RepoSource::Representation - - property :resolved_storage_source, as: 'resolvedStorageSource', class: Google::Apis::CloudbuildV1alpha1::StorageSource, decorator: Google::Apis::CloudbuildV1alpha1::StorageSource::Representation - - end - end - - class StorageSource - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :bucket, as: 'bucket' - property :generation, :numeric_string => true, as: 'generation' - property :object, as: 'object' - end - end - - class TimeSpan - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :end_time, as: 'endTime' - property :start_time, as: 'startTime' - end - end - - class Volume - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - property :path, as: 'path' - end - end - - class WorkerConfig - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :disk_size_gb, :numeric_string => true, as: 'diskSizeGb' - property :machine_type, as: 'machineType' - property :network, as: 'network', class: Google::Apis::CloudbuildV1alpha1::Network, decorator: Google::Apis::CloudbuildV1alpha1::Network::Representation - - property :tag, as: 'tag' - end - end - - class WorkerPool - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :create_time, as: 'createTime' - property :delete_time, as: 'deleteTime' - property :name, as: 'name' - property :project_id, as: 'projectId' - collection :regions, as: 'regions' - property :service_account_email, as: 'serviceAccountEmail' - property :status, as: 'status' - property :update_time, as: 'updateTime' - property :worker_config, as: 'workerConfig', class: Google::Apis::CloudbuildV1alpha1::WorkerConfig, decorator: Google::Apis::CloudbuildV1alpha1::WorkerConfig::Representation - - property :worker_count, :numeric_string => true, as: 'workerCount' - end - end - end - end -end diff --git a/generated/google/apis/cloudbuild_v1alpha1/service.rb b/generated/google/apis/cloudbuild_v1alpha1/service.rb deleted file mode 100644 index 47eb52d4c..000000000 --- a/generated/google/apis/cloudbuild_v1alpha1/service.rb +++ /dev/null @@ -1,226 +0,0 @@ -# Copyright 2015 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -require 'google/apis/core/base_service' -require 'google/apis/core/json_representation' -require 'google/apis/core/hashable' -require 'google/apis/errors' - -module Google - module Apis - module CloudbuildV1alpha1 - # Cloud Build API - # - # Creates and manages builds on Google Cloud Platform. - # - # @example - # require 'google/apis/cloudbuild_v1alpha1' - # - # Cloudbuild = Google::Apis::CloudbuildV1alpha1 # Alias the module - # service = Cloudbuild::CloudBuildService.new - # - # @see https://cloud.google.com/cloud-build/docs/ - class CloudBuildService < 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://cloudbuild.googleapis.com/', '') - @batch_path = 'batch' - end - - # Creates a `WorkerPool` to run the builds, and returns the new worker pool. - # This API is experimental. - # @param [String] parent - # ID of the parent project. - # @param [Google::Apis::CloudbuildV1alpha1::WorkerPool] worker_pool_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::CloudbuildV1alpha1::WorkerPool] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudbuildV1alpha1::WorkerPool] - # - # @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_worker_pool(parent, worker_pool_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1alpha1/{+parent}/workerPools', options) - command.request_representation = Google::Apis::CloudbuildV1alpha1::WorkerPool::Representation - command.request_object = worker_pool_object - command.response_representation = Google::Apis::CloudbuildV1alpha1::WorkerPool::Representation - command.response_class = Google::Apis::CloudbuildV1alpha1::WorkerPool - 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 `WorkerPool` by its project ID and WorkerPool name. - # This API is experimental. - # @param [String] name - # The field will contain name of the resource requested, for example: - # "projects/project-1/workerPools/workerpool-name" - # @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::CloudbuildV1alpha1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudbuildV1alpha1::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_worker_pool(name, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:delete, 'v1alpha1/{+name}', options) - command.response_representation = Google::Apis::CloudbuildV1alpha1::Empty::Representation - command.response_class = Google::Apis::CloudbuildV1alpha1::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 a `WorkerPool`. - # This API is experimental. - # @param [String] name - # The field will contain name of the resource requested, for example: - # "projects/project-1/workerPools/workerpool-name" - # @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::CloudbuildV1alpha1::WorkerPool] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudbuildV1alpha1::WorkerPool] - # - # @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_worker_pool(name, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1alpha1/{+name}', options) - command.response_representation = Google::Apis::CloudbuildV1alpha1::WorkerPool::Representation - command.response_class = Google::Apis::CloudbuildV1alpha1::WorkerPool - 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 - - # List project's `WorkerPool`s. - # This API is experimental. - # @param [String] parent - # ID of the parent project. - # @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::CloudbuildV1alpha1::ListWorkerPoolsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudbuildV1alpha1::ListWorkerPoolsResponse] - # - # @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_worker_pools(parent, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1alpha1/{+parent}/workerPools', options) - command.response_representation = Google::Apis::CloudbuildV1alpha1::ListWorkerPoolsResponse::Representation - command.response_class = Google::Apis::CloudbuildV1alpha1::ListWorkerPoolsResponse - 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 - - # Update a `WorkerPool`. - # This API is experimental. - # @param [String] name - # The field will contain name of the resource requested, for example: - # "projects/project-1/workerPools/workerpool-name" - # @param [Google::Apis::CloudbuildV1alpha1::WorkerPool] worker_pool_object - # @param [String] update_mask - # A mask specifying which fields in `WorkerPool` should 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::CloudbuildV1alpha1::WorkerPool] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudbuildV1alpha1::WorkerPool] - # - # @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_worker_pool(name, worker_pool_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:patch, 'v1alpha1/{+name}', options) - command.request_representation = Google::Apis::CloudbuildV1alpha1::WorkerPool::Representation - command.request_object = worker_pool_object - command.response_representation = Google::Apis::CloudbuildV1alpha1::WorkerPool::Representation - command.response_class = Google::Apis::CloudbuildV1alpha1::WorkerPool - 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 - - protected - - def apply_command_defaults(command) - command.query['key'] = key unless key.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - end - end - end - end -end diff --git a/generated/google/apis/monitoring_v1.rb b/generated/google/apis/monitoring_v1.rb index 80762a614..270fc9cb5 100644 --- a/generated/google/apis/monitoring_v1.rb +++ b/generated/google/apis/monitoring_v1.rb @@ -30,7 +30,19 @@ module Google # @see https://cloud.google.com/monitoring/api/ module MonitoringV1 VERSION = 'V1' - REVISION = '20191005' + REVISION = '20191202' + + # View and manage your data across Google Cloud Platform services + AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' + + # View and write monitoring data for all of your Google and third-party Cloud and API projects + AUTH_MONITORING = 'https://www.googleapis.com/auth/monitoring' + + # View monitoring data for all of your Google Cloud and third-party projects + AUTH_MONITORING_READ = 'https://www.googleapis.com/auth/monitoring.read' + + # Publish metric data to your Google Cloud projects + AUTH_MONITORING_WRITE = 'https://www.googleapis.com/auth/monitoring.write' end end end diff --git a/generated/google/apis/monitoring_v1/classes.rb b/generated/google/apis/monitoring_v1/classes.rb index 7b9c39872..b5bc603f6 100644 --- a/generated/google/apis/monitoring_v1/classes.rb +++ b/generated/google/apis/monitoring_v1/classes.rb @@ -22,6 +22,266 @@ module Google module Apis module MonitoringV1 + # Describes how to combine multiple time series to provide different views of + # the data. Aggregation consists of an alignment step on individual time series ( + # alignment_period and per_series_aligner) followed by an optional reduction + # step of the data across the aligned time series (cross_series_reducer and + # group_by_fields). For more details, see Aggregation. + class Aggregation + include Google::Apis::Core::Hashable + + # The alignment period for per-time series alignment. If present, + # alignmentPeriod must be at least 60 seconds. After per-time series alignment, + # each time series will contain data points only on the period boundaries. If + # perSeriesAligner is not specified or equals ALIGN_NONE, then this field is + # ignored. If perSeriesAligner is specified and does not equal ALIGN_NONE, then + # this field must be defined; otherwise an error is returned. + # Corresponds to the JSON property `alignmentPeriod` + # @return [String] + attr_accessor :alignment_period + + # The approach to be used to combine time series. Not all reducer functions may + # be applied to all time series, depending on the metric type and the value type + # of the original time series. Reduction may change the metric type of value + # type of the time series.Time series data must be aligned in order to perform + # cross-time series reduction. If crossSeriesReducer is specified, then + # perSeriesAligner must be specified and not equal ALIGN_NONE and + # alignmentPeriod must be specified; otherwise, an error is returned. + # Corresponds to the JSON property `crossSeriesReducer` + # @return [String] + attr_accessor :cross_series_reducer + + # The set of fields to preserve when crossSeriesReducer is specified. The + # groupByFields determine how the time series are partitioned into subsets prior + # to applying the aggregation function. Each subset contains time series that + # have the same value for each of the grouping fields. Each individual time + # series is a member of exactly one subset. The crossSeriesReducer is applied to + # each subset of time series. It is not possible to reduce across different + # resource types, so this field implicitly contains resource.type. Fields not + # specified in groupByFields are aggregated away. If groupByFields is not + # specified and all the time series have the same resource type, then the time + # series are aggregated into a single output time series. If crossSeriesReducer + # is not defined, this field is ignored. + # Corresponds to the JSON property `groupByFields` + # @return [Array] + attr_accessor :group_by_fields + + # The approach to be used to align individual time series. Not all alignment + # functions may be applied to all time series, depending on the metric type and + # value type of the original time series. Alignment may change the metric type + # or the value type of the time series.Time series data must be aligned in order + # to perform cross-time series reduction. If crossSeriesReducer is specified, + # then perSeriesAligner must be specified and not equal ALIGN_NONE and + # alignmentPeriod must be specified; otherwise, an error is returned. + # Corresponds to the JSON property `perSeriesAligner` + # @return [String] + attr_accessor :per_series_aligner + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @alignment_period = args[:alignment_period] if args.key?(:alignment_period) + @cross_series_reducer = args[:cross_series_reducer] if args.key?(:cross_series_reducer) + @group_by_fields = args[:group_by_fields] if args.key?(:group_by_fields) + @per_series_aligner = args[:per_series_aligner] if args.key?(:per_series_aligner) + end + end + + # A chart axis. + class Axis + include Google::Apis::Core::Hashable + + # The label of the axis. + # Corresponds to the JSON property `label` + # @return [String] + attr_accessor :label + + # The axis scale. By default, a linear scale is used. + # Corresponds to the JSON property `scale` + # @return [String] + attr_accessor :scale + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @label = args[:label] if args.key?(:label) + @scale = args[:scale] if args.key?(:scale) + end + end + + # Options to control visual rendering of a chart. + class ChartOptions + include Google::Apis::Core::Hashable + + # The chart mode. + # Corresponds to the JSON property `mode` + # @return [String] + attr_accessor :mode + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @mode = args[:mode] if args.key?(:mode) + end + end + + # Defines the layout properties and content for a column. + class Column + include Google::Apis::Core::Hashable + + # The relative weight of this column. The column weight is used to adjust the + # height of rows on the screen (relative to peers). If omitted, a value of 1 is + # used. + # Corresponds to the JSON property `weight` + # @return [Fixnum] + attr_accessor :weight + + # The display widgets arranged vertically in this column. + # Corresponds to the JSON property `widgets` + # @return [Array] + attr_accessor :widgets + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @weight = args[:weight] if args.key?(:weight) + @widgets = args[:widgets] if args.key?(:widgets) + end + end + + # A simplified layout that divides the available space into vertical columns and + # arranges a set of widgets vertically in each column. + class ColumnLayout + include Google::Apis::Core::Hashable + + # The columns of content to display. + # Corresponds to the JSON property `columns` + # @return [Array] + attr_accessor :columns + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @columns = args[:columns] if args.key?(:columns) + end + end + + # A Google Stackdriver dashboard. Dashboards define the content and layout of + # pages in the Stackdriver web application. + class Dashboard + include Google::Apis::Core::Hashable + + # A simplified layout that divides the available space into vertical columns and + # arranges a set of widgets vertically in each column. + # Corresponds to the JSON property `columnLayout` + # @return [Google::Apis::MonitoringV1::ColumnLayout] + attr_accessor :column_layout + + # The mutable, human-readable name. + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # etag is used for optimistic concurrency control as a way to help prevent + # simultaneous updates of a policy from overwriting each other. An etag is + # returned in the response to GetDashboard, and users are expected to put that + # etag in the request to UpdateDashboard to ensure that their change will be + # applied to the same version of the Dashboard configuration. The field should + # not be passed during dashboard creation. + # Corresponds to the JSON property `etag` + # @return [String] + attr_accessor :etag + + # A basic layout divides the available space into vertical columns of equal + # width and arranges a list of widgets using a row-first strategy. + # Corresponds to the JSON property `gridLayout` + # @return [Google::Apis::MonitoringV1::GridLayout] + attr_accessor :grid_layout + + # The resource name of the dashboard. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # A simplified layout that divides the available space into rows and arranges a + # set of widgets horizontally in each row. + # Corresponds to the JSON property `rowLayout` + # @return [Google::Apis::MonitoringV1::RowLayout] + attr_accessor :row_layout + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @column_layout = args[:column_layout] if args.key?(:column_layout) + @display_name = args[:display_name] if args.key?(:display_name) + @etag = args[:etag] if args.key?(:etag) + @grid_layout = args[:grid_layout] if args.key?(:grid_layout) + @name = args[:name] if args.key?(:name) + @row_layout = args[:row_layout] if args.key?(:row_layout) + end + end + + # Groups a time series query definition with charting options. + class DataSet + include Google::Apis::Core::Hashable + + # A template string for naming TimeSeries in the resulting data set. This should + # be a string with interpolations of the form $`label_name`, which will resolve + # to the label's value. + # Corresponds to the JSON property `legendTemplate` + # @return [String] + attr_accessor :legend_template + + # Optional. The lower bound on data point frequency for this data set + # implemented by specifying the minimum alignment period to use in a time series + # query. For example, if the data is published once every 10 minutes it would + # not make sense to fetch and align data at one minute intervals. + # Corresponds to the JSON property `minAlignmentPeriod` + # @return [String] + attr_accessor :min_alignment_period + + # How this data should be plotted on the chart. + # Corresponds to the JSON property `plotType` + # @return [String] + attr_accessor :plot_type + + # TimeSeriesQuery collects the set of supported methods for querying time series + # data from the Stackdriver metrics API. + # Corresponds to the JSON property `timeSeriesQuery` + # @return [Google::Apis::MonitoringV1::TimeSeriesQuery] + attr_accessor :time_series_query + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @legend_template = args[:legend_template] if args.key?(:legend_template) + @min_alignment_period = args[:min_alignment_period] if args.key?(:min_alignment_period) + @plot_type = args[:plot_type] if args.key?(:plot_type) + @time_series_query = args[:time_series_query] if args.key?(:time_series_query) + end + end + # A set of (label, value) pairs which were dropped during aggregation, attached # to google.api.Distribution.Exemplars in google.api.Distribution values during # aggregation.These values are used in combination with the label values that @@ -51,6 +311,25 @@ module Google 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 + # A single field of a message type. class Field include Google::Apis::Core::Hashable @@ -127,6 +406,89 @@ module Google end end + # A gauge chart shows where the current value sits within a pre-defined range. + # The upper and lower bounds should define the possible range of values for the + # scorecard's query (inclusive). + class GaugeView + include Google::Apis::Core::Hashable + + # The lower bound for this gauge chart. The value of the chart should always be + # greater than or equal to this. + # Corresponds to the JSON property `lowerBound` + # @return [Float] + attr_accessor :lower_bound + + # The upper bound for this gauge chart. The value of the chart should always be + # less than or equal to this. + # Corresponds to the JSON property `upperBound` + # @return [Float] + attr_accessor :upper_bound + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @lower_bound = args[:lower_bound] if args.key?(:lower_bound) + @upper_bound = args[:upper_bound] if args.key?(:upper_bound) + end + end + + # A basic layout divides the available space into vertical columns of equal + # width and arranges a list of widgets using a row-first strategy. + class GridLayout + include Google::Apis::Core::Hashable + + # The number of columns into which the view's width is divided. If omitted or + # set to zero, a system default will be used. + # Corresponds to the JSON property `columns` + # @return [Fixnum] + attr_accessor :columns + + # The informational elements that are arranged into the columns row-first. + # Corresponds to the JSON property `widgets` + # @return [Array] + attr_accessor :widgets + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @columns = args[:columns] if args.key?(:columns) + @widgets = args[:widgets] if args.key?(:widgets) + end + end + + # The ListDashboards request. + class ListDashboardsResponse + include Google::Apis::Core::Hashable + + # The list of requested dashboards. + # Corresponds to the JSON property `dashboards` + # @return [Array] + attr_accessor :dashboards + + # If there are more results than have been returned, then this field is set to a + # non-empty value. To see the additional results, use that value as pageToken in + # the next call to this method. + # 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) + @dashboards = args[:dashboards] if args.key?(:dashboards) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + # A protocol buffer option, which can be attached to a message, field, # enumeration, etc. class Option @@ -159,6 +521,174 @@ module Google end end + # Describes a ranking-based time series filter. Each input time series is ranked + # with an aligner. The filter lets through up to num_time_series time series, + # selecting them based on the relative ranking. + class PickTimeSeriesFilter + include Google::Apis::Core::Hashable + + # How to use the ranking to select time series that pass through the filter. + # Corresponds to the JSON property `direction` + # @return [String] + attr_accessor :direction + + # How many time series to return. + # Corresponds to the JSON property `numTimeSeries` + # @return [Fixnum] + attr_accessor :num_time_series + + # rankingMethod is applied to each time series independently to produce the + # value which will be used to compare the time series to other time series. + # Corresponds to the JSON property `rankingMethod` + # @return [String] + attr_accessor :ranking_method + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @direction = args[:direction] if args.key?(:direction) + @num_time_series = args[:num_time_series] if args.key?(:num_time_series) + @ranking_method = args[:ranking_method] if args.key?(:ranking_method) + end + end + + # Describes a query to build the numerator or denominator of a + # TimeSeriesFilterRatio. + class RatioPart + include Google::Apis::Core::Hashable + + # Describes how to combine multiple time series to provide different views of + # the data. Aggregation consists of an alignment step on individual time series ( + # alignment_period and per_series_aligner) followed by an optional reduction + # step of the data across the aligned time series (cross_series_reducer and + # group_by_fields). For more details, see Aggregation. + # Corresponds to the JSON property `aggregation` + # @return [Google::Apis::MonitoringV1::Aggregation] + attr_accessor :aggregation + + # Required. The monitoring filter that identifies the metric types, resources, + # and projects to query. + # Corresponds to the JSON property `filter` + # @return [String] + attr_accessor :filter + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @aggregation = args[:aggregation] if args.key?(:aggregation) + @filter = args[:filter] if args.key?(:filter) + end + end + + # Defines the layout properties and content for a row. + class Row + include Google::Apis::Core::Hashable + + # The relative weight of this row. The row weight is used to adjust the height + # of rows on the screen (relative to peers). If omitted, a value of 1 is used. + # Corresponds to the JSON property `weight` + # @return [Fixnum] + attr_accessor :weight + + # The display widgets arranged horizontally in this row. + # Corresponds to the JSON property `widgets` + # @return [Array] + attr_accessor :widgets + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @weight = args[:weight] if args.key?(:weight) + @widgets = args[:widgets] if args.key?(:widgets) + end + end + + # A simplified layout that divides the available space into rows and arranges a + # set of widgets horizontally in each row. + class RowLayout + include Google::Apis::Core::Hashable + + # The rows of content to display. + # Corresponds to the JSON property `rows` + # @return [Array] + attr_accessor :rows + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @rows = args[:rows] if args.key?(:rows) + end + end + + # A widget showing the latest value of a metric, and how this value relates to + # one or more thresholds. + class Scorecard + include Google::Apis::Core::Hashable + + # A gauge chart shows where the current value sits within a pre-defined range. + # The upper and lower bounds should define the possible range of values for the + # scorecard's query (inclusive). + # Corresponds to the JSON property `gaugeView` + # @return [Google::Apis::MonitoringV1::GaugeView] + attr_accessor :gauge_view + + # A sparkChart is a small chart suitable for inclusion in a table-cell or inline + # in text. This message contains the configuration for a sparkChart to show up + # on a Scorecard, showing recent trends of the scorecard's timeseries. + # Corresponds to the JSON property `sparkChartView` + # @return [Google::Apis::MonitoringV1::SparkChartView] + attr_accessor :spark_chart_view + + # The thresholds used to determine the state of the scorecard given the time + # series' current value. For an actual value x, the scorecard is in a danger + # state if x is less than or equal to a danger threshold that triggers below, or + # greater than or equal to a danger threshold that triggers above. Similarly, if + # x is above/below a warning threshold that triggers above/below, then the + # scorecard is in a warning state - unless x also puts it in a danger state. ( + # Danger trumps warning.)As an example, consider a scorecard with the following + # four thresholds: ` value: 90, category: 'DANGER', trigger: 'ABOVE', `, ` + # value: 70, category: 'WARNING', trigger: 'ABOVE', `, ` value: 10, category: + # 'DANGER', trigger: 'BELOW', `, ` value: 20, category: 'WARNING', trigger: + # 'BELOW', `Then: values less than or equal to 10 would put the scorecard in a + # DANGER state, values greater than 10 but less than or equal to 20 a WARNING + # state, values strictly between 20 and 70 an OK state, values greater than or + # equal to 70 but less than 90 a WARNING state, and values greater than or equal + # to 90 a DANGER state. + # Corresponds to the JSON property `thresholds` + # @return [Array] + attr_accessor :thresholds + + # TimeSeriesQuery collects the set of supported methods for querying time series + # data from the Stackdriver metrics API. + # Corresponds to the JSON property `timeSeriesQuery` + # @return [Google::Apis::MonitoringV1::TimeSeriesQuery] + attr_accessor :time_series_query + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @gauge_view = args[:gauge_view] if args.key?(:gauge_view) + @spark_chart_view = args[:spark_chart_view] if args.key?(:spark_chart_view) + @thresholds = args[:thresholds] if args.key?(:thresholds) + @time_series_query = args[:time_series_query] if args.key?(:time_series_query) + end + end + # SourceContext represents information about the source of a protobuf element, # like the file in which it is defined. class SourceContext @@ -206,6 +736,266 @@ module Google end end + # A sparkChart is a small chart suitable for inclusion in a table-cell or inline + # in text. This message contains the configuration for a sparkChart to show up + # on a Scorecard, showing recent trends of the scorecard's timeseries. + class SparkChartView + include Google::Apis::Core::Hashable + + # The lower bound on data point frequency in the chart implemented by specifying + # the minimum alignment period to use in a time series query. For example, if + # the data is published once every 10 minutes it would not make sense to fetch + # and align data at one minute intervals. This field is optional and exists only + # as a hint. + # Corresponds to the JSON property `minAlignmentPeriod` + # @return [String] + attr_accessor :min_alignment_period + + # The type of sparkchart to show in this chartView. + # Corresponds to the JSON property `sparkChartType` + # @return [String] + attr_accessor :spark_chart_type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @min_alignment_period = args[:min_alignment_period] if args.key?(:min_alignment_period) + @spark_chart_type = args[:spark_chart_type] if args.key?(:spark_chart_type) + end + end + + # A filter that ranks streams based on their statistical relation to other + # streams in a request. + class StatisticalTimeSeriesFilter + include Google::Apis::Core::Hashable + + # How many time series to output. + # Corresponds to the JSON property `numTimeSeries` + # @return [Fixnum] + attr_accessor :num_time_series + + # rankingMethod is applied to a set of time series, and then the produced value + # for each individual time series is used to compare a given time series to + # others. These are methods that cannot be applied stream-by-stream, but rather + # require the full context of a request to evaluate time series. + # Corresponds to the JSON property `rankingMethod` + # @return [String] + attr_accessor :ranking_method + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @num_time_series = args[:num_time_series] if args.key?(:num_time_series) + @ranking_method = args[:ranking_method] if args.key?(:ranking_method) + end + end + + # A widget that displays textual content. + class Text + include Google::Apis::Core::Hashable + + # The text content to be displayed. + # Corresponds to the JSON property `content` + # @return [String] + attr_accessor :content + + # How the text content is formatted. + # Corresponds to the JSON property `format` + # @return [String] + attr_accessor :format + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @content = args[:content] if args.key?(:content) + @format = args[:format] if args.key?(:format) + end + end + + # Defines a threshold for categorizing time series values. + class Threshold + include Google::Apis::Core::Hashable + + # The state color for this threshold. Color is not allowed in a XyChart. + # Corresponds to the JSON property `color` + # @return [String] + attr_accessor :color + + # The direction for the current threshold. Direction is not allowed in a XyChart. + # Corresponds to the JSON property `direction` + # @return [String] + attr_accessor :direction + + # A label for the threshold. + # Corresponds to the JSON property `label` + # @return [String] + attr_accessor :label + + # The value of the threshold. The value should be defined in the native scale of + # the metric. + # Corresponds to the JSON property `value` + # @return [Float] + attr_accessor :value + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @color = args[:color] if args.key?(:color) + @direction = args[:direction] if args.key?(:direction) + @label = args[:label] if args.key?(:label) + @value = args[:value] if args.key?(:value) + end + end + + # A filter that defines a subset of time series data that is displayed in a + # widget. Time series data is fetched using the ListTimeSeries method. + class TimeSeriesFilter + include Google::Apis::Core::Hashable + + # Describes how to combine multiple time series to provide different views of + # the data. Aggregation consists of an alignment step on individual time series ( + # alignment_period and per_series_aligner) followed by an optional reduction + # step of the data across the aligned time series (cross_series_reducer and + # group_by_fields). For more details, see Aggregation. + # Corresponds to the JSON property `aggregation` + # @return [Google::Apis::MonitoringV1::Aggregation] + attr_accessor :aggregation + + # Required. The monitoring filter that identifies the metric types, resources, + # and projects to query. + # Corresponds to the JSON property `filter` + # @return [String] + attr_accessor :filter + + # Describes a ranking-based time series filter. Each input time series is ranked + # with an aligner. The filter lets through up to num_time_series time series, + # selecting them based on the relative ranking. + # Corresponds to the JSON property `pickTimeSeriesFilter` + # @return [Google::Apis::MonitoringV1::PickTimeSeriesFilter] + attr_accessor :pick_time_series_filter + + # A filter that ranks streams based on their statistical relation to other + # streams in a request. + # Corresponds to the JSON property `statisticalTimeSeriesFilter` + # @return [Google::Apis::MonitoringV1::StatisticalTimeSeriesFilter] + attr_accessor :statistical_time_series_filter + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @aggregation = args[:aggregation] if args.key?(:aggregation) + @filter = args[:filter] if args.key?(:filter) + @pick_time_series_filter = args[:pick_time_series_filter] if args.key?(:pick_time_series_filter) + @statistical_time_series_filter = args[:statistical_time_series_filter] if args.key?(:statistical_time_series_filter) + end + end + + # A pair of time series filters that define a ratio computation. The output time + # series is the pair-wise division of each aligned element from the numerator + # and denominator time series. + class TimeSeriesFilterRatio + include Google::Apis::Core::Hashable + + # Describes a query to build the numerator or denominator of a + # TimeSeriesFilterRatio. + # Corresponds to the JSON property `denominator` + # @return [Google::Apis::MonitoringV1::RatioPart] + attr_accessor :denominator + + # Describes a query to build the numerator or denominator of a + # TimeSeriesFilterRatio. + # Corresponds to the JSON property `numerator` + # @return [Google::Apis::MonitoringV1::RatioPart] + attr_accessor :numerator + + # Describes a ranking-based time series filter. Each input time series is ranked + # with an aligner. The filter lets through up to num_time_series time series, + # selecting them based on the relative ranking. + # Corresponds to the JSON property `pickTimeSeriesFilter` + # @return [Google::Apis::MonitoringV1::PickTimeSeriesFilter] + attr_accessor :pick_time_series_filter + + # Describes how to combine multiple time series to provide different views of + # the data. Aggregation consists of an alignment step on individual time series ( + # alignment_period and per_series_aligner) followed by an optional reduction + # step of the data across the aligned time series (cross_series_reducer and + # group_by_fields). For more details, see Aggregation. + # Corresponds to the JSON property `secondaryAggregation` + # @return [Google::Apis::MonitoringV1::Aggregation] + attr_accessor :secondary_aggregation + + # A filter that ranks streams based on their statistical relation to other + # streams in a request. + # Corresponds to the JSON property `statisticalTimeSeriesFilter` + # @return [Google::Apis::MonitoringV1::StatisticalTimeSeriesFilter] + attr_accessor :statistical_time_series_filter + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @denominator = args[:denominator] if args.key?(:denominator) + @numerator = args[:numerator] if args.key?(:numerator) + @pick_time_series_filter = args[:pick_time_series_filter] if args.key?(:pick_time_series_filter) + @secondary_aggregation = args[:secondary_aggregation] if args.key?(:secondary_aggregation) + @statistical_time_series_filter = args[:statistical_time_series_filter] if args.key?(:statistical_time_series_filter) + end + end + + # TimeSeriesQuery collects the set of supported methods for querying time series + # data from the Stackdriver metrics API. + class TimeSeriesQuery + include Google::Apis::Core::Hashable + + # A filter that defines a subset of time series data that is displayed in a + # widget. Time series data is fetched using the ListTimeSeries method. + # Corresponds to the JSON property `timeSeriesFilter` + # @return [Google::Apis::MonitoringV1::TimeSeriesFilter] + attr_accessor :time_series_filter + + # A pair of time series filters that define a ratio computation. The output time + # series is the pair-wise division of each aligned element from the numerator + # and denominator time series. + # Corresponds to the JSON property `timeSeriesFilterRatio` + # @return [Google::Apis::MonitoringV1::TimeSeriesFilterRatio] + attr_accessor :time_series_filter_ratio + + # The unit of data contained in fetched time series. If non-empty, this unit + # will override any unit that accompanies fetched data. The format is the same + # as the unit field in MetricDescriptor. + # Corresponds to the JSON property `unitOverride` + # @return [String] + attr_accessor :unit_override + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @time_series_filter = args[:time_series_filter] if args.key?(:time_series_filter) + @time_series_filter_ratio = args[:time_series_filter_ratio] if args.key?(:time_series_filter_ratio) + @unit_override = args[:unit_override] if args.key?(:unit_override) + end + end + # A protocol buffer message type. class Type include Google::Apis::Core::Hashable @@ -255,6 +1045,109 @@ module Google @syntax = args[:syntax] if args.key?(:syntax) end end + + # Widget contains a single dashboard component and configuration of how to + # present the component in the dashboard. + class Widget + include Google::Apis::Core::Hashable + + # 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 ``. + # Corresponds to the JSON property `blank` + # @return [Google::Apis::MonitoringV1::Empty] + attr_accessor :blank + + # A widget showing the latest value of a metric, and how this value relates to + # one or more thresholds. + # Corresponds to the JSON property `scorecard` + # @return [Google::Apis::MonitoringV1::Scorecard] + attr_accessor :scorecard + + # A widget that displays textual content. + # Corresponds to the JSON property `text` + # @return [Google::Apis::MonitoringV1::Text] + attr_accessor :text + + # Optional. The title of the widget. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + # A chart that displays data on a 2D (X and Y axes) plane. + # Corresponds to the JSON property `xyChart` + # @return [Google::Apis::MonitoringV1::XyChart] + attr_accessor :xy_chart + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @blank = args[:blank] if args.key?(:blank) + @scorecard = args[:scorecard] if args.key?(:scorecard) + @text = args[:text] if args.key?(:text) + @title = args[:title] if args.key?(:title) + @xy_chart = args[:xy_chart] if args.key?(:xy_chart) + end + end + + # A chart that displays data on a 2D (X and Y axes) plane. + class XyChart + include Google::Apis::Core::Hashable + + # Options to control visual rendering of a chart. + # Corresponds to the JSON property `chartOptions` + # @return [Google::Apis::MonitoringV1::ChartOptions] + attr_accessor :chart_options + + # The data displayed in this chart. + # Corresponds to the JSON property `dataSets` + # @return [Array] + attr_accessor :data_sets + + # Threshold lines drawn horizontally across the chart. + # Corresponds to the JSON property `thresholds` + # @return [Array] + attr_accessor :thresholds + + # The duration used to display a comparison chart. A comparison chart shows + # values from two time periods simultaneously (e.g., week-over-week metrics). + # The duration must be positive, and it can only be applied to charts with data + # sets of LINE plot type. + # Corresponds to the JSON property `timeshiftDuration` + # @return [String] + attr_accessor :timeshift_duration + + # A chart axis. + # Corresponds to the JSON property `xAxis` + # @return [Google::Apis::MonitoringV1::Axis] + attr_accessor :x_axis + + # A chart axis. + # Corresponds to the JSON property `yAxis` + # @return [Google::Apis::MonitoringV1::Axis] + attr_accessor :y_axis + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @chart_options = args[:chart_options] if args.key?(:chart_options) + @data_sets = args[:data_sets] if args.key?(:data_sets) + @thresholds = args[:thresholds] if args.key?(:thresholds) + @timeshift_duration = args[:timeshift_duration] if args.key?(:timeshift_duration) + @x_axis = args[:x_axis] if args.key?(:x_axis) + @y_axis = args[:y_axis] if args.key?(:y_axis) + end + end end end end diff --git a/generated/google/apis/monitoring_v1/representations.rb b/generated/google/apis/monitoring_v1/representations.rb index a41100294..1f7245b97 100644 --- a/generated/google/apis/monitoring_v1/representations.rb +++ b/generated/google/apis/monitoring_v1/representations.rb @@ -22,24 +22,120 @@ module Google module Apis module MonitoringV1 + class Aggregation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Axis + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ChartOptions + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Column + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ColumnLayout + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Dashboard + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DataSet + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class DroppedLabels 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 Field class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class GaugeView + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GridLayout + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListDashboardsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class Option class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class PickTimeSeriesFilter + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class RatioPart + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Row + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class RowLayout + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Scorecard + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class SourceContext class Representation < Google::Apis::Core::JsonRepresentation; end @@ -52,12 +148,134 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class SparkChartView + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class StatisticalTimeSeriesFilter + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Text + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Threshold + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TimeSeriesFilter + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TimeSeriesFilterRatio + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TimeSeriesQuery + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class Type class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class Widget + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class XyChart + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Aggregation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :alignment_period, as: 'alignmentPeriod' + property :cross_series_reducer, as: 'crossSeriesReducer' + collection :group_by_fields, as: 'groupByFields' + property :per_series_aligner, as: 'perSeriesAligner' + end + end + + class Axis + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :label, as: 'label' + property :scale, as: 'scale' + end + end + + class ChartOptions + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :mode, as: 'mode' + end + end + + class Column + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :weight, :numeric_string => true, as: 'weight' + collection :widgets, as: 'widgets', class: Google::Apis::MonitoringV1::Widget, decorator: Google::Apis::MonitoringV1::Widget::Representation + + end + end + + class ColumnLayout + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :columns, as: 'columns', class: Google::Apis::MonitoringV1::Column, decorator: Google::Apis::MonitoringV1::Column::Representation + + end + end + + class Dashboard + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :column_layout, as: 'columnLayout', class: Google::Apis::MonitoringV1::ColumnLayout, decorator: Google::Apis::MonitoringV1::ColumnLayout::Representation + + property :display_name, as: 'displayName' + property :etag, as: 'etag' + property :grid_layout, as: 'gridLayout', class: Google::Apis::MonitoringV1::GridLayout, decorator: Google::Apis::MonitoringV1::GridLayout::Representation + + property :name, as: 'name' + property :row_layout, as: 'rowLayout', class: Google::Apis::MonitoringV1::RowLayout, decorator: Google::Apis::MonitoringV1::RowLayout::Representation + + end + end + + class DataSet + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :legend_template, as: 'legendTemplate' + property :min_alignment_period, as: 'minAlignmentPeriod' + property :plot_type, as: 'plotType' + property :time_series_query, as: 'timeSeriesQuery', class: Google::Apis::MonitoringV1::TimeSeriesQuery, decorator: Google::Apis::MonitoringV1::TimeSeriesQuery::Representation + + end + end + class DroppedLabels # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -65,6 +283,12 @@ module Google end end + class Empty + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + class Field # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -82,6 +306,32 @@ module Google end end + class GaugeView + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :lower_bound, as: 'lowerBound' + property :upper_bound, as: 'upperBound' + end + end + + class GridLayout + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :columns, :numeric_string => true, as: 'columns' + collection :widgets, as: 'widgets', class: Google::Apis::MonitoringV1::Widget, decorator: Google::Apis::MonitoringV1::Widget::Representation + + end + end + + class ListDashboardsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :dashboards, as: 'dashboards', class: Google::Apis::MonitoringV1::Dashboard, decorator: Google::Apis::MonitoringV1::Dashboard::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + class Option # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -90,6 +340,55 @@ module Google end end + class PickTimeSeriesFilter + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :direction, as: 'direction' + property :num_time_series, as: 'numTimeSeries' + property :ranking_method, as: 'rankingMethod' + end + end + + class RatioPart + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :aggregation, as: 'aggregation', class: Google::Apis::MonitoringV1::Aggregation, decorator: Google::Apis::MonitoringV1::Aggregation::Representation + + property :filter, as: 'filter' + end + end + + class Row + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :weight, :numeric_string => true, as: 'weight' + collection :widgets, as: 'widgets', class: Google::Apis::MonitoringV1::Widget, decorator: Google::Apis::MonitoringV1::Widget::Representation + + end + end + + class RowLayout + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :rows, as: 'rows', class: Google::Apis::MonitoringV1::Row, decorator: Google::Apis::MonitoringV1::Row::Representation + + end + end + + class Scorecard + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :gauge_view, as: 'gaugeView', class: Google::Apis::MonitoringV1::GaugeView, decorator: Google::Apis::MonitoringV1::GaugeView::Representation + + property :spark_chart_view, as: 'sparkChartView', class: Google::Apis::MonitoringV1::SparkChartView, decorator: Google::Apis::MonitoringV1::SparkChartView::Representation + + collection :thresholds, as: 'thresholds', class: Google::Apis::MonitoringV1::Threshold, decorator: Google::Apis::MonitoringV1::Threshold::Representation + + property :time_series_query, as: 'timeSeriesQuery', class: Google::Apis::MonitoringV1::TimeSeriesQuery, decorator: Google::Apis::MonitoringV1::TimeSeriesQuery::Representation + + end + end + class SourceContext # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -104,6 +403,80 @@ module Google end end + class SparkChartView + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :min_alignment_period, as: 'minAlignmentPeriod' + property :spark_chart_type, as: 'sparkChartType' + end + end + + class StatisticalTimeSeriesFilter + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :num_time_series, as: 'numTimeSeries' + property :ranking_method, as: 'rankingMethod' + end + end + + class Text + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :content, as: 'content' + property :format, as: 'format' + end + end + + class Threshold + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :color, as: 'color' + property :direction, as: 'direction' + property :label, as: 'label' + property :value, as: 'value' + end + end + + class TimeSeriesFilter + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :aggregation, as: 'aggregation', class: Google::Apis::MonitoringV1::Aggregation, decorator: Google::Apis::MonitoringV1::Aggregation::Representation + + property :filter, as: 'filter' + property :pick_time_series_filter, as: 'pickTimeSeriesFilter', class: Google::Apis::MonitoringV1::PickTimeSeriesFilter, decorator: Google::Apis::MonitoringV1::PickTimeSeriesFilter::Representation + + property :statistical_time_series_filter, as: 'statisticalTimeSeriesFilter', class: Google::Apis::MonitoringV1::StatisticalTimeSeriesFilter, decorator: Google::Apis::MonitoringV1::StatisticalTimeSeriesFilter::Representation + + end + end + + class TimeSeriesFilterRatio + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :denominator, as: 'denominator', class: Google::Apis::MonitoringV1::RatioPart, decorator: Google::Apis::MonitoringV1::RatioPart::Representation + + property :numerator, as: 'numerator', class: Google::Apis::MonitoringV1::RatioPart, decorator: Google::Apis::MonitoringV1::RatioPart::Representation + + property :pick_time_series_filter, as: 'pickTimeSeriesFilter', class: Google::Apis::MonitoringV1::PickTimeSeriesFilter, decorator: Google::Apis::MonitoringV1::PickTimeSeriesFilter::Representation + + property :secondary_aggregation, as: 'secondaryAggregation', class: Google::Apis::MonitoringV1::Aggregation, decorator: Google::Apis::MonitoringV1::Aggregation::Representation + + property :statistical_time_series_filter, as: 'statisticalTimeSeriesFilter', class: Google::Apis::MonitoringV1::StatisticalTimeSeriesFilter, decorator: Google::Apis::MonitoringV1::StatisticalTimeSeriesFilter::Representation + + end + end + + class TimeSeriesQuery + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :time_series_filter, as: 'timeSeriesFilter', class: Google::Apis::MonitoringV1::TimeSeriesFilter, decorator: Google::Apis::MonitoringV1::TimeSeriesFilter::Representation + + property :time_series_filter_ratio, as: 'timeSeriesFilterRatio', class: Google::Apis::MonitoringV1::TimeSeriesFilterRatio, decorator: Google::Apis::MonitoringV1::TimeSeriesFilterRatio::Representation + + property :unit_override, as: 'unitOverride' + end + end + class Type # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -118,6 +491,38 @@ module Google property :syntax, as: 'syntax' end end + + class Widget + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :blank, as: 'blank', class: Google::Apis::MonitoringV1::Empty, decorator: Google::Apis::MonitoringV1::Empty::Representation + + property :scorecard, as: 'scorecard', class: Google::Apis::MonitoringV1::Scorecard, decorator: Google::Apis::MonitoringV1::Scorecard::Representation + + property :text, as: 'text', class: Google::Apis::MonitoringV1::Text, decorator: Google::Apis::MonitoringV1::Text::Representation + + property :title, as: 'title' + property :xy_chart, as: 'xyChart', class: Google::Apis::MonitoringV1::XyChart, decorator: Google::Apis::MonitoringV1::XyChart::Representation + + end + end + + class XyChart + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :chart_options, as: 'chartOptions', class: Google::Apis::MonitoringV1::ChartOptions, decorator: Google::Apis::MonitoringV1::ChartOptions::Representation + + collection :data_sets, as: 'dataSets', class: Google::Apis::MonitoringV1::DataSet, decorator: Google::Apis::MonitoringV1::DataSet::Representation + + collection :thresholds, as: 'thresholds', class: Google::Apis::MonitoringV1::Threshold, decorator: Google::Apis::MonitoringV1::Threshold::Representation + + property :timeshift_duration, as: 'timeshiftDuration' + property :x_axis, as: 'xAxis', class: Google::Apis::MonitoringV1::Axis, decorator: Google::Apis::MonitoringV1::Axis::Representation + + property :y_axis, as: 'yAxis', class: Google::Apis::MonitoringV1::Axis, decorator: Google::Apis::MonitoringV1::Axis::Representation + + end + end end end end diff --git a/generated/google/apis/monitoring_v1/service.rb b/generated/google/apis/monitoring_v1/service.rb index 1115f757d..27c3a835c 100644 --- a/generated/google/apis/monitoring_v1/service.rb +++ b/generated/google/apis/monitoring_v1/service.rb @@ -51,6 +51,188 @@ module Google super('https://monitoring.googleapis.com/', '') @batch_path = 'batch' end + + # Creates a new custom dashboard.This method requires the monitoring.dashboards. + # create permission on the specified project. For more information, see Google + # Cloud IAM (https://cloud.google.com/iam). + # @param [String] parent + # The project on which to execute the request. The format is "projects/` + # project_id_or_number`". The `project_id_or_number` must match the dashboard + # resource name. + # @param [Google::Apis::MonitoringV1::Dashboard] dashboard_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::MonitoringV1::Dashboard] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MonitoringV1::Dashboard] + # + # @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_dashboard(parent, dashboard_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+parent}/dashboards', options) + command.request_representation = Google::Apis::MonitoringV1::Dashboard::Representation + command.request_object = dashboard_object + command.response_representation = Google::Apis::MonitoringV1::Dashboard::Representation + command.response_class = Google::Apis::MonitoringV1::Dashboard + 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 an existing custom dashboard.This method requires the monitoring. + # dashboards.delete permission on the specified dashboard. For more information, + # see Google Cloud IAM (https://cloud.google.com/iam). + # @param [String] name + # The resource name of the Dashboard. The format is "projects/` + # project_id_or_number`/dashboards/`dashboard_id`". + # @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::MonitoringV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MonitoringV1::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_dashboard(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/{+name}', options) + command.response_representation = Google::Apis::MonitoringV1::Empty::Representation + command.response_class = Google::Apis::MonitoringV1::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 + + # Fetches a specific dashboard.This method requires the monitoring.dashboards. + # get permission on the specified dashboard. For more information, see Google + # Cloud IAM (https://cloud.google.com/iam). + # @param [String] name + # The resource name of the Dashboard. The format is one of "dashboards/` + # dashboard_id`" (for system dashboards) or "projects/`project_id_or_number`/ + # dashboards/`dashboard_id`" (for custom dashboards). + # @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::MonitoringV1::Dashboard] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MonitoringV1::Dashboard] + # + # @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_dashboard(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}', options) + command.response_representation = Google::Apis::MonitoringV1::Dashboard::Representation + command.response_class = Google::Apis::MonitoringV1::Dashboard + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists the existing dashboards.This method requires the monitoring.dashboards. + # list permission on the specified project. For more information, see Google + # Cloud IAM (https://cloud.google.com/iam). + # @param [String] parent + # The scope of the dashboards to list. A project scope must be specified in the + # form of "projects/`project_id_or_number`". + # @param [Fixnum] page_size + # A positive number that is the maximum number of results to return. If + # unspecified, a default of 1000 is used. + # @param [String] page_token + # If this field is not empty then it must contain the nextPageToken value + # returned by a previous call to this method. Using this field causes the method + # to return additional results from the previous method 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::MonitoringV1::ListDashboardsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MonitoringV1::ListDashboardsResponse] + # + # @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_dashboards(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+parent}/dashboards', options) + command.response_representation = Google::Apis::MonitoringV1::ListDashboardsResponse::Representation + command.response_class = Google::Apis::MonitoringV1::ListDashboardsResponse + 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 + + # Replaces an existing custom dashboard with a new definition.This method + # requires the monitoring.dashboards.update permission on the specified + # dashboard. For more information, see Google Cloud IAM (https://cloud.google. + # com/iam). + # @param [String] name + # The resource name of the dashboard. + # @param [Google::Apis::MonitoringV1::Dashboard] dashboard_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::MonitoringV1::Dashboard] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MonitoringV1::Dashboard] + # + # @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_dashboard(name, dashboard_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1/{+name}', options) + command.request_representation = Google::Apis::MonitoringV1::Dashboard::Representation + command.request_object = dashboard_object + command.response_representation = Google::Apis::MonitoringV1::Dashboard::Representation + command.response_class = Google::Apis::MonitoringV1::Dashboard + 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 diff --git a/generated/google/apis/monitoring_v3.rb b/generated/google/apis/monitoring_v3.rb index 5d803978c..de1a0514d 100644 --- a/generated/google/apis/monitoring_v3.rb +++ b/generated/google/apis/monitoring_v3.rb @@ -30,7 +30,7 @@ module Google # @see https://cloud.google.com/monitoring/api/ module MonitoringV3 VERSION = 'V3' - REVISION = '20191118' + REVISION = '20191202' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/monitoring_v3/classes.rb b/generated/google/apis/monitoring_v3/classes.rb index 21241f535..45ced083e 100644 --- a/generated/google/apis/monitoring_v3/classes.rb +++ b/generated/google/apis/monitoring_v3/classes.rb @@ -2123,39 +2123,17 @@ module Google # @return [String] attr_accessor :type - # The unit in which the metric value is reported. It is only applicable if the - # value_type is INT64, DOUBLE, or DISTRIBUTION. The supported units are a subset - # of The Unified Code for Units of Measure (http://unitsofmeasure.org/ucum.html) - # standard:Basic units (UNIT) - # bit bit - # By byte - # s second - # min minute - # h hour - # d dayPrefixes (PREFIX) - # k kilo (10**3) - # M mega (10**6) - # G giga (10**9) - # T tera (10**12) - # P peta (10**15) - # E exa (10**18) - # Z zetta (10**21) - # Y yotta (10**24) - # m milli (10**-3) - # u micro (10**-6) - # n nano (10**-9) - # p pico (10**-12) - # f femto (10**-15) - # a atto (10**-18) - # z zepto (10**-21) - # y yocto (10**-24) - # Ki kibi (2**10) - # Mi mebi (2**20) - # Gi gibi (2**30) - # Ti tebi (2**40)GrammarThe grammar also includes these connectors: - # / division (as an infix operator, e.g. 1/s). - # . multiplication (as an infix operator, e.g. GBy.d)The grammar for a unit is - # as follows: + # Ki kibi (2^10) + # Mi mebi (2^20) + # Gi gibi (2^30) + # Ti tebi (2^40) + # Pi pebi (2^50)GrammarThe grammar also includes these connectors: + # / division or ratio (as an infix operator). For examples, kBy/`email` or MiBy/ + # 10ms (although you should almost never have /s in a metric unit; rates should + # always be computed at query time from the underlying cumulative or delta + # value). + # . multiplication or composition (as an infix operator). For examples, GBy.d + # or k`watt`.h.The grammar for a unit is as follows: # Expression = Component ` "." Component ` ` "/" Component ` ; # Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ] # | Annotation @@ -2163,14 +2141,24 @@ module Google # ; # Annotation = "`" NAME "`" ; # Notes: - # Annotation is just a comment if it follows a UNIT and is equivalent to 1 if - # it is used alone. For examples, `requests`/s == 1/s, By`transmitted`/s == By/ - # s. - # NAME is a sequence of non-blank printable ASCII characters not containing '`' - # or '`'. - # 1 represents dimensionless value 1, such as in 1/s. - # % represents dimensionless value 1/100, and annotates values giving a - # percentage. + # Annotation is just a comment if it follows a UNIT. If the annotation is used + # alone, then the unit is equivalent to 1. For examples, `request`/s == 1/s, By` + # transmitted`/s == By/s. + # NAME is a sequence of non-blank printable ASCII characters not containing ` + # or `. + # 1 represents a unitary dimensionless unit (https://en.wikipedia.org/wiki/ + # Dimensionless_quantity) of 1, such as in 1/s. It is typically used when none + # of the basic units are appropriate. For example, "new users per day" can be + # represented as 1/d or `new-users`/d (and a metric value 5 would mean "5 new + # users). Alternatively, "thousands of page views per day" would be represented + # as 1000/d or k1/d or k`page_views`/d (and a metric value of 5.3 would mean " + # 5300 page views per day"). + # % represents dimensionless value of 1/100, and annotates values giving a + # percentage (so the metric values are typically in the range of 0..100, and a + # metric value 3 means "3 percent"). + # 10^2.% indicates a metric contains a ratio, typically in the range 0..1, that + # will be multiplied by 100 and displayed as a percentage (so a metric value 0. + # 03 means "3 percent"). # Corresponds to the JSON property `unit` # @return [String] attr_accessor :unit diff --git a/generated/google/apis/policytroubleshooter_v1beta.rb b/generated/google/apis/policytroubleshooter_v1beta.rb index a03d277aa..f5d162231 100644 --- a/generated/google/apis/policytroubleshooter_v1beta.rb +++ b/generated/google/apis/policytroubleshooter_v1beta.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/iam/ module PolicytroubleshooterV1beta VERSION = 'V1beta' - REVISION = '20191118' + REVISION = '20191202' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/policytroubleshooter_v1beta/classes.rb b/generated/google/apis/policytroubleshooter_v1beta/classes.rb index bd70857b2..adefbf674 100644 --- a/generated/google/apis/policytroubleshooter_v1beta/classes.rb +++ b/generated/google/apis/policytroubleshooter_v1beta/classes.rb @@ -22,32 +22,35 @@ module Google module Apis module PolicytroubleshooterV1beta - # AccessTuple defines information required for checking an access attempt. - # In other words, this is the tuple given to `CheckAccess`. + # Information about the member, resource, and permission to check. class GoogleCloudPolicytroubleshooterV1betaAccessTuple include Google::Apis::Core::Hashable - # Required. A full resource name according to - # https://cloud.google.com/apis/design/resource_names. This is the full - # resource name of the resource that access is checked against. + # Required. The full resource name that identifies the resource. For example, + # `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my- + # instance`. + # For examples of full resource names for Google Cloud services, see + # https://cloud.google.com/iam/help/troubleshooter/full-resource-names. # Corresponds to the JSON property `fullResourceName` # @return [String] attr_accessor :full_resource_name - # Required. The Cloud IAM permission under which defines the kind of access - # being explained. Example: "resourcemanager.projects.get" would explain - # if and why the principal has the resourcemanager.projects.get permission - # on the resource specified in full_resource_name declared in this structure. - # See https://cloud.google.com/iam/docs/testing-permissions + # Required. The IAM permission to check for the specified member and resource. + # For a complete list of IAM permissions, see + # https://cloud.google.com/iam/help/permissions/reference. + # For a complete list of predefined IAM roles and the permissions in each + # role, see https://cloud.google.com/iam/help/roles/reference. # Corresponds to the JSON property `permission` # @return [String] attr_accessor :permission - # Required. The principal on behalf of who the access is explained for. - # The format is one of the principal's email addresses associated with - # its gaia account. It must be an account that can appear as an actor. - # For example groups are not supported. Currently, service accounts, users - # are supported. + # Required. The member, or principal, whose access you want to check, in the + # form of + # the email address that represents that member. For example, + # `alice@example.com` or + # `my-service-account@my-project.iam.gserviceaccount.com`. + # The member must be a Google Account or a service account. Other types of + # members are not supported. # Corresponds to the JSON property `principal` # @return [String] attr_accessor :principal @@ -64,11 +67,18 @@ module Google end end - # Binding Explanation. + # Details about how a binding in a policy affects a member's ability to use a + # permission. class GoogleCloudPolicytroubleshooterV1betaBindingExplanation include Google::Apis::Core::Hashable - # REQUIRED: Access decision for this binding. + # Indicates whether _this binding_ provides the specified permission to the + # specified member for the specified resource. + # This field does _not_ indicate whether the member actually has the + # permission for the resource. There might be another binding that overrides + # this binding. To determine whether the member actually has the permission, + # use the `access` field in the + # TroubleshootIamPolicyResponse. # Corresponds to the JSON property `access` # @return [String] attr_accessor :access @@ -81,35 +91,47 @@ module Google # @return [Google::Apis::PolicytroubleshooterV1beta::GoogleTypeExpr] attr_accessor :condition - # For each member in the binding, provides information - # whether or not the principal from the request is included - # in the member by which the CheckResult is keyed. - # May indicate that the caller has no access to this information. - # example key: 'group:cloud-iam-assist-eng@google.com' - # example value '`NOT_GRANTED, HIGH` + # Indicates whether each member in the binding includes the member specified + # in the request, either directly or indirectly. Each key identifies a member + # in the binding, and each value indicates whether the member in the binding + # includes the member in the request. + # For example, suppose that a binding includes the following members: + # * `user:alice@example.com` + # * `group:product-eng@example.com` + # You want to troubleshoot access for `user:bob@example.com`. This user is a + # member of the group `group:product-eng@example.com`. + # For the first member in the binding, the key is `user:alice@example.com`, + # and the `membership` field in the value is set to + # `MEMBERSHIP_NOT_INCLUDED`. + # For the second member in the binding, the key is + # `group:product-eng@example.com`, and the `membership` field in the value is + # set to `MEMBERSHIP_INCLUDED`. # Corresponds to the JSON property `memberships` # @return [Hash] attr_accessor :memberships - # Bubbles up role_permission level relavance to BindingExplanation object. - # If role permission is NORMAL, then binding relevance is NORMAL. - # If role permission is HIGH, then binding relevance is HIGH. + # The relevance of this binding to the overall determination for the entire + # policy. # Corresponds to the JSON property `relevance` # @return [String] attr_accessor :relevance - # The role that this binding grants in the policy. - # for example "roles/compute.serviceAgent" + # The role that this binding grants. For example, + # `roles/compute.serviceAgent`. + # For a complete list of predefined IAM roles, as well as the permissions in + # each role, see https://cloud.google.com/iam/help/roles/reference. # Corresponds to the JSON property `role` # @return [String] attr_accessor :role - # Whether the role of this binding contains the checked permission + # Indicates whether the role granted by this binding contains the specified + # permission. # Corresponds to the JSON property `rolePermission` # @return [String] attr_accessor :role_permission - # The relevance of this permission with respect to the BindingExplanation. + # The relevance of the permission's existence, or nonexistence, in the role + # to the overall determination for the entire policy. # Corresponds to the JSON property `rolePermissionRelevance` # @return [String] attr_accessor :role_permission_relevance @@ -130,17 +152,17 @@ module Google end end - # Encapsulated membership and the relevance of that membership with respect - # to BindingExplanation. + # Details about whether the binding includes the member. class GoogleCloudPolicytroubleshooterV1betaBindingExplanationAnnotatedMembership include Google::Apis::Core::Hashable - # Membership status. + # Indicates whether the binding includes the member. # Corresponds to the JSON property `membership` # @return [String] attr_accessor :membership - # Relevance of this membership with respect to BindingExplanation. + # The relevance of the member's status to the overall determination for the + # binding. # Corresponds to the JSON property `relevance` # @return [String] attr_accessor :relevance @@ -156,39 +178,53 @@ module Google end end - # An explained IAM policy combines the raw policy in the context - # of the resource which it is attached to along with detailed - # evaluation on the evaluation parameters provided through the request. + # Details about how a specific IAM Policy contributed + # to the access check. class GoogleCloudPolicytroubleshooterV1betaExplainedPolicy include Google::Apis::Core::Hashable - # Access decision for this section of the resource's effective policy. + # Indicates whether _this policy_ provides the specified permission to the + # specified member for the specified resource. + # This field does _not_ indicate whether the member actually has the + # permission for the resource. There might be another policy that overrides + # this policy. To determine whether the member actually has the permission, + # use the `access` field in the + # TroubleshootIamPolicyResponse. # Corresponds to the JSON property `access` # @return [String] attr_accessor :access - # Detailed binding evaluation explanations provide information - # about how each binding contributes to the principal's - # access or the lack thereof. + # Details about how each binding in the policy affects the member's ability, + # or inability, to use the permission for the resource. + # If the sender of the request does not have access to the policy, this field + # is omitted. # Corresponds to the JSON property `bindingExplanations` # @return [Array] attr_accessor :binding_explanations - # Resource that this section of the effective policy attaches to. + # The full resource name that identifies the resource. For example, + # `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my- + # instance`. + # If the sender of the request does not have access to the policy, this field + # is omitted. + # For examples of full resource names for Google Cloud services, see + # https://cloud.google.com/iam/help/troubleshooter/full-resource-names. # Corresponds to the JSON property `fullResourceName` # @return [String] attr_accessor :full_resource_name - # Defines an Identity and Access Management (IAM) policy. It is used to - # specify access control policies for Cloud Platform resources. + # An Identity and Access Management (IAM) policy, which specifies access + # controls for Google Cloud resources. # A `Policy` is a collection of `bindings`. A `binding` binds one or more # `members` to a single `role`. Members can be user accounts, service accounts, # Google groups, and domains (such as G Suite). A `role` is a named list of - # permissions (defined by IAM or configured by users). A `binding` can - # optionally specify a `condition`, which is a logic expression that further - # constrains the role binding based on attributes about the request and/or - # target resource. - # **JSON Example** + # permissions; each `role` can be an IAM predefined role or a user-created + # custom role. + # Optionally, a `binding` can specify a `condition`, which is a logical + # expression that allows access to a resource only if the expression evaluates + # to `true`. A condition can add constraints based on attributes of the + # request, the resource, or both. + # **JSON example:** # ` # "bindings": [ # ` @@ -206,13 +242,15 @@ module Google # "condition": ` # "title": "expirable access", # "description": "Does not grant access after Sep 2020", - # "expression": "request.time < - # timestamp('2020-10-01T00:00:00.000Z')", + # "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z') + # ", # ` # ` - # ] + # ], + # "etag": "BwWWja0YfJA=", + # "version": 3 # ` - # **YAML Example** + # **YAML example:** # bindings: # - members: # - user:mike@example.com @@ -227,13 +265,18 @@ module Google # title: expirable access # description: Does not grant access after Sep 2020 # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + # - etag: BwWWja0YfJA= + # - version: 3 # For a description of IAM and its features, see the - # [IAM developer's guide](https://cloud.google.com/iam/docs). + # [IAM documentation](https://cloud.google.com/iam/docs/). # Corresponds to the JSON property `policy` # @return [Google::Apis::PolicytroubleshooterV1beta::GoogleIamV1Policy] attr_accessor :policy - # Relevance of this Policy. + # The relevance of this policy to the overall determination in the + # TroubleshootIamPolicyResponse. + # If the sender of the request does not have access to the policy, this field + # is omitted. # Corresponds to the JSON property `relevance` # @return [String] attr_accessor :relevance @@ -252,12 +295,11 @@ module Google end end - # TroubleshootIamPolicyRequest is used in TroubleshootIamPolicy + # Request for TroubleshootIamPolicy. class GoogleCloudPolicytroubleshooterV1betaTroubleshootIamPolicyRequest include Google::Apis::Core::Hashable - # AccessTuple defines information required for checking an access attempt. - # In other words, this is the tuple given to `CheckAccess`. + # Information about the member, resource, and permission to check. # Corresponds to the JSON property `accessTuple` # @return [Google::Apis::PolicytroubleshooterV1beta::GoogleCloudPolicytroubleshooterV1betaAccessTuple] attr_accessor :access_tuple @@ -272,18 +314,24 @@ module Google end end - # TroubleshootIamPolicyResponse is used in TroubleshootIamPolicy. + # Response for TroubleshootIamPolicy. class GoogleCloudPolicytroubleshooterV1betaTroubleshootIamPolicyResponse include Google::Apis::Core::Hashable - # Reflects whether the probed access was granted, denied - # or ultimately could not be decided from the caller's point of view. + # Indicates whether the member has the specified permission for the specified + # resource, based on evaluating all of the applicable policies. # Corresponds to the JSON property `access` # @return [String] attr_accessor :access - # List of explained policies. - # Each explanation corresponds to one policy along the ancestry path. + # List of IAM policies that were evaluated to check the member's permissions, + # with annotations to indicate how each policy contributed to the final + # result. + # The list of policies can include the policy for the resource itself. It can + # also include policies that are inherited from higher levels of the resource + # hierarchy, including the organization, the folder, and the project. + # To learn more about the resource hierarchy, see + # https://cloud.google.com/iam/help/resource-hierarchy. # Corresponds to the JSON property `explainedPolicies` # @return [Array] attr_accessor :explained_policies @@ -439,6 +487,23 @@ module Google # account. For example, `my-other-app@appspot.gserviceaccount.com`. # * `group:`emailid``: An email address that represents a Google group. # For example, `admins@example.com`. + # * `deleted:user:`emailid`?uid=`uniqueid``: An email address (plus unique + # identifier) representing a user that has been recently deleted. For + # example, `alice@example.com?uid=123456789012345678901`. If the user is + # recovered, this value reverts to `user:`emailid`` and the recovered user + # retains the role in the binding. + # * `deleted:serviceAccount:`emailid`?uid=`uniqueid``: An email address (plus + # unique identifier) representing a service account that has been recently + # deleted. For example, + # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. + # If the service account is undeleted, this value reverts to + # `serviceAccount:`emailid`` and the undeleted service account retains the + # role in the binding. + # * `deleted:group:`emailid`?uid=`uniqueid``: An email address (plus unique + # identifier) representing a Google group that has been recently + # deleted. For example, `admins@example.com?uid=123456789012345678901`. If + # the group is recovered, this value reverts to `group:`emailid`` and the + # recovered group retains the role in the binding. # * `domain:`domain``: The G Suite domain (primary) that represents all the # users of that domain. For example, `google.com` or `example.com`. # Corresponds to the JSON property `members` @@ -463,16 +528,18 @@ module Google end end - # Defines an Identity and Access Management (IAM) policy. It is used to - # specify access control policies for Cloud Platform resources. + # An Identity and Access Management (IAM) policy, which specifies access + # controls for Google Cloud resources. # A `Policy` is a collection of `bindings`. A `binding` binds one or more # `members` to a single `role`. Members can be user accounts, service accounts, # Google groups, and domains (such as G Suite). A `role` is a named list of - # permissions (defined by IAM or configured by users). A `binding` can - # optionally specify a `condition`, which is a logic expression that further - # constrains the role binding based on attributes about the request and/or - # target resource. - # **JSON Example** + # permissions; each `role` can be an IAM predefined role or a user-created + # custom role. + # Optionally, a `binding` can specify a `condition`, which is a logical + # expression that allows access to a resource only if the expression evaluates + # to `true`. A condition can add constraints based on attributes of the + # request, the resource, or both. + # **JSON example:** # ` # "bindings": [ # ` @@ -490,13 +557,15 @@ module Google # "condition": ` # "title": "expirable access", # "description": "Does not grant access after Sep 2020", - # "expression": "request.time < - # timestamp('2020-10-01T00:00:00.000Z')", + # "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z') + # ", # ` # ` - # ] + # ], + # "etag": "BwWWja0YfJA=", + # "version": 3 # ` - # **YAML Example** + # **YAML example:** # bindings: # - members: # - user:mike@example.com @@ -511,8 +580,10 @@ module Google # title: expirable access # description: Does not grant access after Sep 2020 # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + # - etag: BwWWja0YfJA= + # - version: 3 # For a description of IAM and its features, see the - # [IAM developer's guide](https://cloud.google.com/iam/docs). + # [IAM documentation](https://cloud.google.com/iam/docs/). class GoogleIamV1Policy include Google::Apis::Core::Hashable @@ -521,9 +592,9 @@ module Google # @return [Array] attr_accessor :audit_configs - # 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. + # Associates a list of `members` to a `role`. Optionally, may specify a + # `condition` that determines how and when the `bindings` are applied. Each + # of the `bindings` must contain at least one member. # Corresponds to the JSON property `bindings` # @return [Array] attr_accessor :bindings @@ -535,26 +606,31 @@ module Google # conditions: An `etag` is returned in the response to `getIamPolicy`, and # systems are expected to put that etag in the request to `setIamPolicy` to # ensure that their change will be applied to the same version of the policy. - # If no `etag` is provided in the call to `setIamPolicy`, then the existing - # policy is overwritten. Due to blind-set semantics of an etag-less policy, - # 'setIamPolicy' will not fail even if the incoming policy version does not - # meet the requirements for modifying the stored policy. + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. # Corresponds to the JSON property `etag` # NOTE: Values are automatically base64 encoded/decoded in the client library. # @return [String] attr_accessor :etag # Specifies the format of the policy. - # Valid values are 0, 1, and 3. Requests specifying an invalid value will be - # rejected. - # Operations affecting conditional bindings must specify version 3. This can - # be either setting a conditional policy, modifying a conditional binding, - # or removing a binding (conditional or unconditional) 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`, version compliance - # checks against the stored policy is skipped. + # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value + # are rejected. + # Any operation that affects conditional role bindings must specify version + # `3`. This requirement applies to the following operations: + # * Getting a policy that includes a conditional role binding + # * Adding a conditional role binding to a policy + # * Changing a conditional role binding in a policy + # * Removing any role binding, with or without a condition, from a policy + # that includes conditions + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + # If a policy does not include any conditions, operations on that policy may + # specify any valid version or leave the field unset. # Corresponds to the JSON property `version` # @return [Fixnum] attr_accessor :version diff --git a/generated/google/apis/policytroubleshooter_v1beta/service.rb b/generated/google/apis/policytroubleshooter_v1beta/service.rb index 450550e03..b181ff3d5 100644 --- a/generated/google/apis/policytroubleshooter_v1beta/service.rb +++ b/generated/google/apis/policytroubleshooter_v1beta/service.rb @@ -47,9 +47,8 @@ module Google @batch_path = 'batch' end - # Perform a check on whether a member is granted a permission - # on a resource and how that grant/deny is determined accordinga - # to the resource's effective IAM policy interpretation. + # Checks whether a member has a specific permission for a specific resource, + # and explains why the member does or does not have that permission. # @param [Google::Apis::PolicytroubleshooterV1beta::GoogleCloudPolicytroubleshooterV1betaTroubleshootIamPolicyRequest] google_cloud_policytroubleshooter_v1beta_troubleshoot_iam_policy_request_object # @param [String] fields # Selector specifying which fields to include in a partial response. diff --git a/generated/google/apis/servicemanagement_v1.rb b/generated/google/apis/servicemanagement_v1.rb index ab3eb03b1..d54decca8 100644 --- a/generated/google/apis/servicemanagement_v1.rb +++ b/generated/google/apis/servicemanagement_v1.rb @@ -27,7 +27,7 @@ module Google # @see https://cloud.google.com/service-management/ module ServicemanagementV1 VERSION = 'V1' - REVISION = '20191115' + REVISION = '20191204' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/servicemanagement_v1/classes.rb b/generated/google/apis/servicemanagement_v1/classes.rb index a4d491ea0..301a42676 100644 --- a/generated/google/apis/servicemanagement_v1/classes.rb +++ b/generated/google/apis/servicemanagement_v1/classes.rb @@ -623,6 +623,23 @@ module Google # account. For example, `my-other-app@appspot.gserviceaccount.com`. # * `group:`emailid``: An email address that represents a Google group. # For example, `admins@example.com`. + # * `deleted:user:`emailid`?uid=`uniqueid``: An email address (plus unique + # identifier) representing a user that has been recently deleted. For + # example, `alice@example.com?uid=123456789012345678901`. If the user is + # recovered, this value reverts to `user:`emailid`` and the recovered user + # retains the role in the binding. + # * `deleted:serviceAccount:`emailid`?uid=`uniqueid``: An email address (plus + # unique identifier) representing a service account that has been recently + # deleted. For example, + # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. + # If the service account is undeleted, this value reverts to + # `serviceAccount:`emailid`` and the undeleted service account retains the + # role in the binding. + # * `deleted:group:`emailid`?uid=`uniqueid``: An email address (plus unique + # identifier) representing a Google group that has been recently + # deleted. For example, `admins@example.com?uid=123456789012345678901`. If + # the group is recovered, this value reverts to `group:`emailid`` and the + # recovered group retains the role in the binding. # * `domain:`domain``: The G Suite domain (primary) that represents all the # users of that domain. For example, `google.com` or `example.com`. # Corresponds to the JSON property `members` @@ -2457,42 +2474,19 @@ module Google # @return [String] attr_accessor :type - # The unit in which the metric value is reported. It is only applicable - # if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The - # supported units are a subset of [The Unified Code for Units of - # Measure](http://unitsofmeasure.org/ucum.html) standard: - # **Basic units (UNIT)** - # * `bit` bit - # * `By` byte - # * `s` second - # * `min` minute - # * `h` hour - # * `d` day - # **Prefixes (PREFIX)** - # * `k` kilo (10**3) - # * `M` mega (10**6) - # * `G` giga (10**9) - # * `T` tera (10**12) - # * `P` peta (10**15) - # * `E` exa (10**18) - # * `Z` zetta (10**21) - # * `Y` yotta (10**24) - # * `m` milli (10**-3) - # * `u` micro (10**-6) - # * `n` nano (10**-9) - # * `p` pico (10**-12) - # * `f` femto (10**-15) - # * `a` atto (10**-18) - # * `z` zepto (10**-21) - # * `y` yocto (10**-24) - # * `Ki` kibi (2**10) - # * `Mi` mebi (2**20) - # * `Gi` gibi (2**30) - # * `Ti` tebi (2**40) + # * `Ki` kibi (2^10) + # * `Mi` mebi (2^20) + # * `Gi` gibi (2^30) + # * `Ti` tebi (2^40) + # * `Pi` pebi (2^50) # **Grammar** # The grammar also includes these connectors: - # * `/` division (as an infix operator, e.g. `1/s`). - # * `.` multiplication (as an infix operator, e.g. `GBy.d`) + # * `/` division or ratio (as an infix operator). For examples, + # `kBy/`email`` or `MiBy/10ms` (although you should almost never + # have `/s` in a metric `unit`; rates should always be computed at + # query time from the underlying cumulative or delta value). + # * `.` multiplication or composition (as an infix operator). For + # examples, `GBy.d` or `k`watt`.h`. # The grammar for a unit is as follows: # Expression = Component ` "." Component ` ` "/" Component ` ; # Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ] @@ -2501,14 +2495,25 @@ module Google # ; # Annotation = "`" NAME "`" ; # Notes: - # * `Annotation` is just a comment if it follows a `UNIT` and is - # equivalent to `1` if it is used alone. For examples, - # ``requests`/s == 1/s`, `By`transmitted`/s == By/s`. + # * `Annotation` is just a comment if it follows a `UNIT`. If the annotation + # is used alone, then the unit is equivalent to `1`. For examples, + # ``request`/s == 1/s`, `By`transmitted`/s == By/s`. # * `NAME` is a sequence of non-blank printable ASCII characters not - # containing '`' or '`'. - # * `1` represents dimensionless value 1, such as in `1/s`. - # * `%` represents dimensionless value 1/100, and annotates values giving - # a percentage. + # containing ``` or ```. + # * `1` represents a unitary [dimensionless + # unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such + # as in `1/s`. It is typically used when none of the basic units are + # appropriate. For example, "new users per day" can be represented as + # `1/d` or ``new-users`/d` (and a metric value `5` would mean "5 new + # users). Alternatively, "thousands of page views per day" would be + # represented as `1000/d` or `k1/d` or `k`page_views`/d` (and a metric + # value of `5.3` would mean "5300 page views per day"). + # * `%` represents dimensionless value of 1/100, and annotates values giving + # a percentage (so the metric values are typically in the range of 0..100, + # and a metric value `3` means "3 percent"). + # * `10^2.%` indicates a metric contains a ratio, typically in the range + # 0..1, that will be multiplied by 100 and displayed as a percentage + # (so a metric value `0.03` means "3 percent"). # Corresponds to the JSON property `unit` # @return [String] attr_accessor :unit @@ -3076,16 +3081,18 @@ module Google end end - # Defines an Identity and Access Management (IAM) policy. It is used to - # specify access control policies for Cloud Platform resources. + # An Identity and Access Management (IAM) policy, which specifies access + # controls for Google Cloud resources. # A `Policy` is a collection of `bindings`. A `binding` binds one or more # `members` to a single `role`. Members can be user accounts, service accounts, # Google groups, and domains (such as G Suite). A `role` is a named list of - # permissions (defined by IAM or configured by users). A `binding` can - # optionally specify a `condition`, which is a logic expression that further - # constrains the role binding based on attributes about the request and/or - # target resource. - # **JSON Example** + # permissions; each `role` can be an IAM predefined role or a user-created + # custom role. + # Optionally, a `binding` can specify a `condition`, which is a logical + # expression that allows access to a resource only if the expression evaluates + # to `true`. A condition can add constraints based on attributes of the + # request, the resource, or both. + # **JSON example:** # ` # "bindings": [ # ` @@ -3103,13 +3110,15 @@ module Google # "condition": ` # "title": "expirable access", # "description": "Does not grant access after Sep 2020", - # "expression": "request.time < - # timestamp('2020-10-01T00:00:00.000Z')", + # "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z') + # ", # ` # ` - # ] + # ], + # "etag": "BwWWja0YfJA=", + # "version": 3 # ` - # **YAML Example** + # **YAML example:** # bindings: # - members: # - user:mike@example.com @@ -3124,8 +3133,10 @@ module Google # title: expirable access # description: Does not grant access after Sep 2020 # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + # - etag: BwWWja0YfJA= + # - version: 3 # For a description of IAM and its features, see the - # [IAM developer's guide](https://cloud.google.com/iam/docs). + # [IAM documentation](https://cloud.google.com/iam/docs/). class Policy include Google::Apis::Core::Hashable @@ -3134,9 +3145,9 @@ module Google # @return [Array] attr_accessor :audit_configs - # 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. + # Associates a list of `members` to a `role`. Optionally, may specify a + # `condition` that determines how and when the `bindings` are applied. Each + # of the `bindings` must contain at least one member. # Corresponds to the JSON property `bindings` # @return [Array] attr_accessor :bindings @@ -3148,26 +3159,31 @@ module Google # conditions: An `etag` is returned in the response to `getIamPolicy`, and # systems are expected to put that etag in the request to `setIamPolicy` to # ensure that their change will be applied to the same version of the policy. - # If no `etag` is provided in the call to `setIamPolicy`, then the existing - # policy is overwritten. Due to blind-set semantics of an etag-less policy, - # 'setIamPolicy' will not fail even if the incoming policy version does not - # meet the requirements for modifying the stored policy. + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. # Corresponds to the JSON property `etag` # NOTE: Values are automatically base64 encoded/decoded in the client library. # @return [String] attr_accessor :etag # Specifies the format of the policy. - # Valid values are 0, 1, and 3. Requests specifying an invalid value will be - # rejected. - # Operations affecting conditional bindings must specify version 3. This can - # be either setting a conditional policy, modifying a conditional binding, - # or removing a binding (conditional or unconditional) 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`, version compliance - # checks against the stored policy is skipped. + # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value + # are rejected. + # Any operation that affects conditional role bindings must specify version + # `3`. This requirement applies to the following operations: + # * Getting a policy that includes a conditional role binding + # * Adding a conditional role binding to a policy + # * Changing a conditional role binding in a policy + # * Removing any role binding, with or without a condition, from a policy + # that includes conditions + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + # If a policy does not include any conditions, operations on that policy may + # specify any valid version or leave the field unset. # Corresponds to the JSON property `version` # @return [Fixnum] attr_accessor :version @@ -3904,16 +3920,18 @@ module Google class SetIamPolicyRequest include Google::Apis::Core::Hashable - # Defines an Identity and Access Management (IAM) policy. It is used to - # specify access control policies for Cloud Platform resources. + # An Identity and Access Management (IAM) policy, which specifies access + # controls for Google Cloud resources. # A `Policy` is a collection of `bindings`. A `binding` binds one or more # `members` to a single `role`. Members can be user accounts, service accounts, # Google groups, and domains (such as G Suite). A `role` is a named list of - # permissions (defined by IAM or configured by users). A `binding` can - # optionally specify a `condition`, which is a logic expression that further - # constrains the role binding based on attributes about the request and/or - # target resource. - # **JSON Example** + # permissions; each `role` can be an IAM predefined role or a user-created + # custom role. + # Optionally, a `binding` can specify a `condition`, which is a logical + # expression that allows access to a resource only if the expression evaluates + # to `true`. A condition can add constraints based on attributes of the + # request, the resource, or both. + # **JSON example:** # ` # "bindings": [ # ` @@ -3931,13 +3949,15 @@ module Google # "condition": ` # "title": "expirable access", # "description": "Does not grant access after Sep 2020", - # "expression": "request.time < - # timestamp('2020-10-01T00:00:00.000Z')", + # "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z') + # ", # ` # ` - # ] + # ], + # "etag": "BwWWja0YfJA=", + # "version": 3 # ` - # **YAML Example** + # **YAML example:** # bindings: # - members: # - user:mike@example.com @@ -3952,8 +3972,10 @@ module Google # title: expirable access # description: Does not grant access after Sep 2020 # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + # - etag: BwWWja0YfJA= + # - version: 3 # For a description of IAM and its features, see the - # [IAM developer's guide](https://cloud.google.com/iam/docs). + # [IAM documentation](https://cloud.google.com/iam/docs/). # Corresponds to the JSON property `policy` # @return [Google::Apis::ServicemanagementV1::Policy] attr_accessor :policy