From 2c3ca589fe0d50bb9ede8d256006ee84eefe50cf Mon Sep 17 00:00:00 2001 From: Google APIs Date: Thu, 19 Dec 2019 00:37:21 +0000 Subject: [PATCH] Autogenerated update (2019-12-19) Delete: - surveys_v2 Update: - binaryauthorization_v1 - firebase_v1beta1 --- .../google/apis/binaryauthorization_v1.rb | 2 +- generated/google/apis/cloudbuild_v1alpha1.rb | 34 + .../apis/cloudbuild_v1alpha1/classes.rb | 1174 +++++++++++++++ .../cloudbuild_v1alpha1/representations.rb | 435 ++++++ .../apis/cloudbuild_v1alpha1/service.rb | 223 +++ generated/google/apis/firebase_v1beta1.rb | 2 +- ...ys_v2.rb => prod_tt_sasportal_v1alpha1.rb} | 24 +- .../prod_tt_sasportal_v1alpha1/classes.rb | 1084 ++++++++++++++ .../representations.rb | 503 +++++++ .../prod_tt_sasportal_v1alpha1/service.rb | 1322 +++++++++++++++++ generated/google/apis/sasportal_v1alpha1.rb | 34 + .../google/apis/sasportal_v1alpha1/classes.rb | 1084 ++++++++++++++ .../sasportal_v1alpha1/representations.rb | 503 +++++++ .../google/apis/sasportal_v1alpha1/service.rb | 1322 +++++++++++++++++ generated/google/apis/surveys_v2/classes.rb | 691 --------- .../google/apis/surveys_v2/representations.rb | 305 ---- generated/google/apis/surveys_v2/service.rb | 348 ----- generated/google/apis/toolresults_v1.rb | 31 + .../google/apis/toolresults_v1/classes.rb | 696 +++++++++ .../apis/toolresults_v1/representations.rb | 438 ++++++ .../google/apis/toolresults_v1/service.rb | 59 + 21 files changed, 8953 insertions(+), 1361 deletions(-) create mode 100644 generated/google/apis/cloudbuild_v1alpha1.rb create mode 100644 generated/google/apis/cloudbuild_v1alpha1/classes.rb create mode 100644 generated/google/apis/cloudbuild_v1alpha1/representations.rb create mode 100644 generated/google/apis/cloudbuild_v1alpha1/service.rb rename generated/google/apis/{surveys_v2.rb => prod_tt_sasportal_v1alpha1.rb} (54%) create mode 100644 generated/google/apis/prod_tt_sasportal_v1alpha1/classes.rb create mode 100644 generated/google/apis/prod_tt_sasportal_v1alpha1/representations.rb create mode 100644 generated/google/apis/prod_tt_sasportal_v1alpha1/service.rb create mode 100644 generated/google/apis/sasportal_v1alpha1.rb create mode 100644 generated/google/apis/sasportal_v1alpha1/classes.rb create mode 100644 generated/google/apis/sasportal_v1alpha1/representations.rb create mode 100644 generated/google/apis/sasportal_v1alpha1/service.rb delete mode 100644 generated/google/apis/surveys_v2/classes.rb delete mode 100644 generated/google/apis/surveys_v2/representations.rb delete mode 100644 generated/google/apis/surveys_v2/service.rb create mode 100644 generated/google/apis/toolresults_v1.rb create mode 100644 generated/google/apis/toolresults_v1/classes.rb create mode 100644 generated/google/apis/toolresults_v1/representations.rb create mode 100644 generated/google/apis/toolresults_v1/service.rb diff --git a/generated/google/apis/binaryauthorization_v1.rb b/generated/google/apis/binaryauthorization_v1.rb index 6236c9996..b109d9b1a 100644 --- a/generated/google/apis/binaryauthorization_v1.rb +++ b/generated/google/apis/binaryauthorization_v1.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/binary-authorization/ module BinaryauthorizationV1 VERSION = 'V1' - REVISION = '20191206' + REVISION = '20191213' # 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/cloudbuild_v1alpha1.rb b/generated/google/apis/cloudbuild_v1alpha1.rb new file mode 100644 index 000000000..3518e7f98 --- /dev/null +++ b/generated/google/apis/cloudbuild_v1alpha1.rb @@ -0,0 +1,34 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'google/apis/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 = '20191212' + + # 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 new file mode 100644 index 000000000..bf4fe2e85 --- /dev/null +++ b/generated/google/apis/cloudbuild_v1alpha1/classes.rb @@ -0,0 +1,1174 @@ +# 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. + # Format: projects/`project`/workerPools/`workerPool` + # This field is experimental. + # 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 new file mode 100644 index 000000000..06dd7b039 --- /dev/null +++ b/generated/google/apis/cloudbuild_v1alpha1/representations.rb @@ -0,0 +1,435 @@ +# 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 new file mode 100644 index 000000000..853fd6b78 --- /dev/null +++ b/generated/google/apis/cloudbuild_v1alpha1/service.rb @@ -0,0 +1,223 @@ +# 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] 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, 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['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/firebase_v1beta1.rb b/generated/google/apis/firebase_v1beta1.rb index 949e76097..6df70f6c7 100644 --- a/generated/google/apis/firebase_v1beta1.rb +++ b/generated/google/apis/firebase_v1beta1.rb @@ -26,7 +26,7 @@ module Google # @see https://firebase.google.com module FirebaseV1beta1 VERSION = 'V1beta1' - REVISION = '20191213' + REVISION = '20191217' # 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/surveys_v2.rb b/generated/google/apis/prod_tt_sasportal_v1alpha1.rb similarity index 54% rename from generated/google/apis/surveys_v2.rb rename to generated/google/apis/prod_tt_sasportal_v1alpha1.rb index a6c26cbda..d8790d685 100644 --- a/generated/google/apis/surveys_v2.rb +++ b/generated/google/apis/prod_tt_sasportal_v1alpha1.rb @@ -12,26 +12,20 @@ # See the License for the specific language governing permissions and # limitations under the License. -require 'google/apis/surveys_v2/service.rb' -require 'google/apis/surveys_v2/classes.rb' -require 'google/apis/surveys_v2/representations.rb' +require 'google/apis/prod_tt_sasportal_v1alpha1/service.rb' +require 'google/apis/prod_tt_sasportal_v1alpha1/classes.rb' +require 'google/apis/prod_tt_sasportal_v1alpha1/representations.rb' module Google module Apis - # Surveys API + # SAS Portal API (Testing) # - # Creates and conducts surveys, lists the surveys that an authenticated user - # owns, and retrieves survey results and information about specified surveys. + # # - module SurveysV2 - VERSION = 'V2' - REVISION = '20180508' - - # View and manage your surveys and results - AUTH_SURVEYS = 'https://www.googleapis.com/auth/surveys' - - # View your surveys and survey results - AUTH_SURVEYS_READONLY = 'https://www.googleapis.com/auth/surveys.readonly' + # @see https://developers.google.com/spectrum-access-system/ + module ProdTtSasportalV1alpha1 + VERSION = 'V1alpha1' + REVISION = '20191217' # View your email address AUTH_USERINFO_EMAIL = 'https://www.googleapis.com/auth/userinfo.email' diff --git a/generated/google/apis/prod_tt_sasportal_v1alpha1/classes.rb b/generated/google/apis/prod_tt_sasportal_v1alpha1/classes.rb new file mode 100644 index 000000000..509fb8d37 --- /dev/null +++ b/generated/google/apis/prod_tt_sasportal_v1alpha1/classes.rb @@ -0,0 +1,1084 @@ +# 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 ProdTtSasportalV1alpha1 + + # Associates `members` with a `role`. + class SasPortalAssignment + include Google::Apis::Core::Hashable + + # The identities the role is assigned to. It can have the following + # values: + # * ``user_email``: An email address that represents a specific + # Google account. For example: `alice@gmail.com`. + # * ``group_email``: An email address that represents a Google + # group. For example, `viewers@gmail.com`. + # Corresponds to the JSON property `members` + # @return [Array] + attr_accessor :members + + # Required. Role that is assigned to `members`. + # Corresponds to the JSON property `role` + # @return [String] + attr_accessor :role + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @members = args[:members] if args.key?(:members) + @role = args[:role] if args.key?(:role) + end + end + + # Request for CreateSignedDevice method. + class SasPortalCreateSignedDeviceRequest + include Google::Apis::Core::Hashable + + # Required. JSON Web Token signed using a CPI private key. Payload + # must be the JSON encoding of the [Device]. + # Corresponds to the JSON property `encodedDevice` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :encoded_device + + # Required. Unique installer id (cpiId) from the Certified Professional + # Installers database. + # Corresponds to the JSON property `installerId` + # @return [String] + attr_accessor :installer_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @encoded_device = args[:encoded_device] if args.key?(:encoded_device) + @installer_id = args[:installer_id] if args.key?(:installer_id) + end + end + + # Entity representing a SAS customer. + class SasPortalCustomer + include Google::Apis::Core::Hashable + + # Required. Name of the organization that the customer entity represents. + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # Output only. Resource name of the customer. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # User IDs used by the devices belonging to this customer. + # Corresponds to the JSON property `sasUserIds` + # @return [Array] + attr_accessor :sas_user_ids + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @display_name = args[:display_name] if args.key?(:display_name) + @name = args[:name] if args.key?(:name) + @sas_user_ids = args[:sas_user_ids] if args.key?(:sas_user_ids) + end + end + + # + class SasPortalDevice + include Google::Apis::Core::Hashable + + # Information about the device configuration. + # Corresponds to the JSON property `activeConfig` + # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalDeviceConfig] + attr_accessor :active_config + + # Device display name. + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # The FCC identifier of the device. + # Corresponds to the JSON property `fccId` + # @return [String] + attr_accessor :fcc_id + + # Output only. Grants held by the device. + # Corresponds to the JSON property `grants` + # @return [Array] + attr_accessor :grants + + # Output only. The resource path name. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Information about the device configuration. + # Corresponds to the JSON property `preloadedConfig` + # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalDeviceConfig] + attr_accessor :preloaded_config + + # A serial number assigned to the device by the device + # manufacturer. + # Corresponds to the JSON property `serialNumber` + # @return [String] + attr_accessor :serial_number + + # Output only. Device state. + # Corresponds to the JSON property `state` + # @return [String] + attr_accessor :state + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @active_config = args[:active_config] if args.key?(:active_config) + @display_name = args[:display_name] if args.key?(:display_name) + @fcc_id = args[:fcc_id] if args.key?(:fcc_id) + @grants = args[:grants] if args.key?(:grants) + @name = args[:name] if args.key?(:name) + @preloaded_config = args[:preloaded_config] if args.key?(:preloaded_config) + @serial_number = args[:serial_number] if args.key?(:serial_number) + @state = args[:state] if args.key?(:state) + end + end + + # Information about the device's air interface. + class SasPortalDeviceAirInterface + include Google::Apis::Core::Hashable + + # This field specifies the radio access technology that is used for the CBSD. + # Conditional + # Corresponds to the JSON property `radioTechnology` + # @return [String] + attr_accessor :radio_technology + + # This field is related to the radioTechnology field and provides the air + # interface specification that the CBSD is compliant with at the time of + # registration. + # Optional + # Corresponds to the JSON property `supportedSpec` + # @return [String] + attr_accessor :supported_spec + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @radio_technology = args[:radio_technology] if args.key?(:radio_technology) + @supported_spec = args[:supported_spec] if args.key?(:supported_spec) + end + end + + # Information about the device configuration. + class SasPortalDeviceConfig + include Google::Apis::Core::Hashable + + # Information about the device's air interface. + # Corresponds to the JSON property `airInterface` + # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalDeviceAirInterface] + attr_accessor :air_interface + + # The call sign of the device operator. + # Corresponds to the JSON property `callSign` + # @return [String] + attr_accessor :call_sign + + # FCC category of the device. + # Corresponds to the JSON property `category` + # @return [String] + attr_accessor :category + + # Information about the device installation parameters. + # Corresponds to the JSON property `installationParams` + # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalInstallationParams] + attr_accessor :installation_params + + # Output-only. Whether the configuration has been signed by a CPI. + # Corresponds to the JSON property `isSigned` + # @return [Boolean] + attr_accessor :is_signed + alias_method :is_signed?, :is_signed + + # Measurement reporting capabilities of the device. + # Corresponds to the JSON property `measurementCapabilities` + # @return [Array] + attr_accessor :measurement_capabilities + + # Information about the model of the device. + # Corresponds to the JSON property `model` + # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalDeviceModel] + attr_accessor :model + + # State of the configuration. + # Corresponds to the JSON property `state` + # @return [String] + attr_accessor :state + + # Output-only. The last time the device configuration was edited. + # Corresponds to the JSON property `updateTime` + # @return [String] + attr_accessor :update_time + + # Output only. The identifier of a device user. + # Corresponds to the JSON property `userId` + # @return [String] + attr_accessor :user_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @air_interface = args[:air_interface] if args.key?(:air_interface) + @call_sign = args[:call_sign] if args.key?(:call_sign) + @category = args[:category] if args.key?(:category) + @installation_params = args[:installation_params] if args.key?(:installation_params) + @is_signed = args[:is_signed] if args.key?(:is_signed) + @measurement_capabilities = args[:measurement_capabilities] if args.key?(:measurement_capabilities) + @model = args[:model] if args.key?(:model) + @state = args[:state] if args.key?(:state) + @update_time = args[:update_time] if args.key?(:update_time) + @user_id = args[:user_id] if args.key?(:user_id) + end + end + + # Device grant. It is an authorization provided by the Spectrum + # Access System to a device to transmit using specified operating + # parameters after a successful heartbeat by the device. + class SasPortalDeviceGrant + include Google::Apis::Core::Hashable + + # Type of channel used. + # Corresponds to the JSON property `channelType` + # @return [String] + attr_accessor :channel_type + + # The expiration time of the grant. + # Corresponds to the JSON property `expireTime` + # @return [String] + attr_accessor :expire_time + + # Frequency range from `low_frequency` to `high_frequency`. + # Corresponds to the JSON property `frequencyRange` + # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalFrequencyRange] + attr_accessor :frequency_range + + # Maximum Equivalent Isotropically Radiated Power (EIRP) permitted + # by the grant. The maximum EIRP is in units of dBm/MHz. The + # value of maxEirp represents the average (RMS) EIRP that would be + # measured by the procedure defined in FCC part 96.41(e)(3). + # Corresponds to the JSON property `maxEirp` + # @return [Float] + attr_accessor :max_eirp + + # The DPA move lists on which this grant appears. + # Corresponds to the JSON property `moveList` + # @return [Array] + attr_accessor :move_list + + # State of the grant. + # Corresponds to the JSON property `state` + # @return [String] + attr_accessor :state + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @channel_type = args[:channel_type] if args.key?(:channel_type) + @expire_time = args[:expire_time] if args.key?(:expire_time) + @frequency_range = args[:frequency_range] if args.key?(:frequency_range) + @max_eirp = args[:max_eirp] if args.key?(:max_eirp) + @move_list = args[:move_list] if args.key?(:move_list) + @state = args[:state] if args.key?(:state) + end + end + + # Information about the model of the device. + class SasPortalDeviceModel + include Google::Apis::Core::Hashable + + # The firmware version of the device. + # Corresponds to the JSON property `firmwareVersion` + # @return [String] + attr_accessor :firmware_version + + # The hardware version of the device. + # Corresponds to the JSON property `hardwareVersion` + # @return [String] + attr_accessor :hardware_version + + # The name of the device model. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The software version of the device. + # Corresponds to the JSON property `softwareVersion` + # @return [String] + attr_accessor :software_version + + # The name of the device vendor. + # Corresponds to the JSON property `vendor` + # @return [String] + attr_accessor :vendor + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @firmware_version = args[:firmware_version] if args.key?(:firmware_version) + @hardware_version = args[:hardware_version] if args.key?(:hardware_version) + @name = args[:name] if args.key?(:name) + @software_version = args[:software_version] if args.key?(:software_version) + @vendor = args[:vendor] if args.key?(:vendor) + end + end + + # An entry in a DPA's move list. + class SasPortalDpaMoveList + include Google::Apis::Core::Hashable + + # The ID of the DPA. + # Corresponds to the JSON property `dpaId` + # @return [String] + attr_accessor :dpa_id + + # Frequency range from `low_frequency` to `high_frequency`. + # Corresponds to the JSON property `frequencyRange` + # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalFrequencyRange] + attr_accessor :frequency_range + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @dpa_id = args[:dpa_id] if args.key?(:dpa_id) + @frequency_range = args[:frequency_range] if args.key?(:frequency_range) + 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 SasPortalEmpty + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Frequency range from `low_frequency` to `high_frequency`. + class SasPortalFrequencyRange + include Google::Apis::Core::Hashable + + # The highest frequency of the frequency range in MHz. + # Corresponds to the JSON property `highFrequencyMhz` + # @return [Float] + attr_accessor :high_frequency_mhz + + # The lowest frequency of the frequency range in MHz. + # Corresponds to the JSON property `lowFrequencyMhz` + # @return [Float] + attr_accessor :low_frequency_mhz + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @high_frequency_mhz = args[:high_frequency_mhz] if args.key?(:high_frequency_mhz) + @low_frequency_mhz = args[:low_frequency_mhz] if args.key?(:low_frequency_mhz) + end + end + + # Request for GenerateSecret method] + # [spectrum.sas.portal.v1alpha1.DeviceManager.GenerateSecret]. + class SasPortalGenerateSecretRequest + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Response for GenerateSecret method. + class SasPortalGenerateSecretResponse + include Google::Apis::Core::Hashable + + # The secret generated by the string and used by + # [ValidateInstaller] method. + # Corresponds to the JSON property `secret` + # @return [String] + attr_accessor :secret + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @secret = args[:secret] if args.key?(:secret) + end + end + + # Request message for `GetPolicy` method. + class SasPortalGetPolicyRequest + include Google::Apis::Core::Hashable + + # Required. The resource for which the policy is being requested. + # Corresponds to the JSON property `resource` + # @return [String] + attr_accessor :resource + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @resource = args[:resource] if args.key?(:resource) + end + end + + # Information about the device installation parameters. + class SasPortalInstallationParams + include Google::Apis::Core::Hashable + + # Boresight direction of the horizontal plane of the antenna in + # degrees with respect to true north. The value of this parameter + # is an integer with a value between 0 and 359 inclusive. A value + # of 0 degrees means true north; a value of 90 degrees means + # east. This parameter is optional for Category A devices and + # conditional for Category B devices. + # Corresponds to the JSON property `antennaAzimuth` + # @return [Fixnum] + attr_accessor :antenna_azimuth + + # 3-dB antenna beamwidth of the antenna in the horizontal-plane in + # degrees. This parameter is an unsigned integer having a value + # between 0 and 360 (degrees) inclusive; it is optional for + # Category A devices and conditional for Category B devices. + # Corresponds to the JSON property `antennaBeamwidth` + # @return [Fixnum] + attr_accessor :antenna_beamwidth + + # Antenna downtilt in degrees and is an integer with a value + # between -90 and +90 inclusive; a negative value means the antenna + # is tilted up (above horizontal). This parameter is optional for + # Category A devices and conditional for Category B devices. + # Corresponds to the JSON property `antennaDowntilt` + # @return [Fixnum] + attr_accessor :antenna_downtilt + + # Peak antenna gain in dBi. This parameter is an integer with a + # value between -127 and +128 (dBi) inclusive. + # Corresponds to the JSON property `antennaGain` + # @return [Fixnum] + attr_accessor :antenna_gain + + # If an external antenna is used, the antenna model is optionally + # provided in this field. The string has a maximum length of 128 + # octets. + # Corresponds to the JSON property `antennaModel` + # @return [String] + attr_accessor :antenna_model + + # This parameter is the maximum device EIRP in units of dBm/10MHz + # and is an integer with a value between -127 and +47 (dBm/10 MHz) + # inclusive. If not included, SAS interprets it as maximum + # allowable EIRP in units of dBm/10MHz for device category. + # Corresponds to the JSON property `eirpCapability` + # @return [Fixnum] + attr_accessor :eirp_capability + + # Device antenna height in meters. When the heightType parameter + # value is "AGL", the antenna height should be given relative to + # ground level. When the heightType parameter value is "AMSL", it + # is given with respect to WGS84 datum. + # Corresponds to the JSON property `height` + # @return [Float] + attr_accessor :height + + # Specifies how the height is measured. + # Corresponds to the JSON property `heightType` + # @return [String] + attr_accessor :height_type + + # A positive number in meters to indicate accuracy of the device + # antenna horizontal location. This optional parameter should only + # be present if its value is less than the FCC requirement of 50 + # meters. + # Corresponds to the JSON property `horizontalAccuracy` + # @return [Float] + attr_accessor :horizontal_accuracy + + # Whether the device antenna is indoor or not. True: indoor. False: + # outdoor. + # Corresponds to the JSON property `indoorDeployment` + # @return [Boolean] + attr_accessor :indoor_deployment + alias_method :indoor_deployment?, :indoor_deployment + + # Latitude of the device antenna location in degrees relative to + # the WGS 84 datum. The allowed range is from -90.000000 to + # +90.000000. Positive values represent latitudes north of the + # equator; negative values south of the equator. + # Corresponds to the JSON property `latitude` + # @return [Float] + attr_accessor :latitude + + # Longitude of the device antenna location. in degrees relative to + # the WGS 84 datum. The allowed range is from -180.000000 to + # +180.000000. Positive values represent longitudes east of the + # prime meridian; negative values west of the prime + # meridian. + # Corresponds to the JSON property `longitude` + # @return [Float] + attr_accessor :longitude + + # A positive number in meters to indicate accuracy of the device + # antenna vertical location. This optional parameter should only be + # present if its value is less than the FCC requirement of 3 + # meters. + # Corresponds to the JSON property `verticalAccuracy` + # @return [Float] + attr_accessor :vertical_accuracy + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @antenna_azimuth = args[:antenna_azimuth] if args.key?(:antenna_azimuth) + @antenna_beamwidth = args[:antenna_beamwidth] if args.key?(:antenna_beamwidth) + @antenna_downtilt = args[:antenna_downtilt] if args.key?(:antenna_downtilt) + @antenna_gain = args[:antenna_gain] if args.key?(:antenna_gain) + @antenna_model = args[:antenna_model] if args.key?(:antenna_model) + @eirp_capability = args[:eirp_capability] if args.key?(:eirp_capability) + @height = args[:height] if args.key?(:height) + @height_type = args[:height_type] if args.key?(:height_type) + @horizontal_accuracy = args[:horizontal_accuracy] if args.key?(:horizontal_accuracy) + @indoor_deployment = args[:indoor_deployment] if args.key?(:indoor_deployment) + @latitude = args[:latitude] if args.key?(:latitude) + @longitude = args[:longitude] if args.key?(:longitude) + @vertical_accuracy = args[:vertical_accuracy] if args.key?(:vertical_accuracy) + end + end + + # Response for `ListCustomers`. + class SasPortalListCustomersResponse + include Google::Apis::Core::Hashable + + # The list of customers that + # match the request. + # Corresponds to the JSON property `customers` + # @return [Array] + attr_accessor :customers + + # A pagination token returned from a previous call to ListCustomers method that + # indicates from + # where listing should continue. If the field is missing or empty, it means + # there are no more customers. + # 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) + @customers = args[:customers] if args.key?(:customers) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # Response for ListDevices method. + class SasPortalListDevicesResponse + include Google::Apis::Core::Hashable + + # The devices that match the request. + # Corresponds to the JSON property `devices` + # @return [Array] + attr_accessor :devices + + # A pagination token returned from a previous call to ListDevices method + # that indicates from where listing should continue. If the field + # is missing or empty, it means there is no more devices. + # 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) + @devices = args[:devices] if args.key?(:devices) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # Response for ListNodes method. + class SasPortalListNodesResponse + include Google::Apis::Core::Hashable + + # A pagination token returned from a previous call to + # ListNodes method + # that indicates from where listing should continue. If the field is missing + # or empty, it means there is no more nodes. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The nodes that match the request. + # Corresponds to the JSON property `nodes` + # @return [Array] + attr_accessor :nodes + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @nodes = args[:nodes] if args.key?(:nodes) + end + end + + # Request for MoveDevice method. + class SasPortalMoveDeviceRequest + include Google::Apis::Core::Hashable + + # Required. The name of the new parent resource (Node or Customer) to + # reparent the device under. + # Corresponds to the JSON property `destination` + # @return [String] + attr_accessor :destination + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @destination = args[:destination] if args.key?(:destination) + end + end + + # Request for MoveNode method. + class SasPortalMoveNodeRequest + include Google::Apis::Core::Hashable + + # Required. The name of the new parent resource node or Customer) to reparent + # the node under. + # Corresponds to the JSON property `destination` + # @return [String] + attr_accessor :destination + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @destination = args[:destination] if args.key?(:destination) + end + end + + # The Node. + class SasPortalNode + include Google::Apis::Core::Hashable + + # The node's display name. + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # Output only. Resource name. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # User ids used by the devices belonging to this node. + # Corresponds to the JSON property `sasUserIds` + # @return [Array] + attr_accessor :sas_user_ids + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @display_name = args[:display_name] if args.key?(:display_name) + @name = args[:name] if args.key?(:name) + @sas_user_ids = args[:sas_user_ids] if args.key?(:sas_user_ids) + end + end + + # This resource represents a long-running operation that is the result of a + # network API call. + class SasPortalOperation + include Google::Apis::Core::Hashable + + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # Corresponds to the JSON property `done` + # @return [Boolean] + attr_accessor :done + alias_method :done?, :done + + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # Corresponds to the JSON property `error` + # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalStatus] + attr_accessor :error + + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # Corresponds to the JSON property `metadata` + # @return [Hash] + attr_accessor :metadata + + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/`unique_id``. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The normal response of the operation in case of success. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # Corresponds to the JSON property `response` + # @return [Hash] + attr_accessor :response + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @done = args[:done] if args.key?(:done) + @error = args[:error] if args.key?(:error) + @metadata = args[:metadata] if args.key?(:metadata) + @name = args[:name] if args.key?(:name) + @response = args[:response] if args.key?(:response) + end + end + + # Defines an access control policy to the resources. + class SasPortalPolicy + include Google::Apis::Core::Hashable + + # + # Corresponds to the JSON property `assignments` + # @return [Array] + attr_accessor :assignments + + # The [etag] is used for optimistic concurrency control as a way to + # help prevent simultaneous updates of a policy from overwriting + # each other. It is strongly suggested that systems make use of + # the [etag] in the read-modify-write cycle to perform policy + # updates in order to avoid race conditions: An [etag] is returned + # in the response to [GetPolicy], and systems are expected to put + # that etag in the request to [SetPolicy] to ensure that their + # change will be applied to the same version of the policy. + # If no [etag] is provided in the call to [SetPolicy], then the + # existing policy is overwritten blindly. + # Corresponds to the JSON property `etag` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :etag + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @assignments = args[:assignments] if args.key?(:assignments) + @etag = args[:etag] if args.key?(:etag) + end + end + + # Request message for `SetPolicy` method. + class SasPortalSetPolicyRequest + include Google::Apis::Core::Hashable + + # Defines an access control policy to the resources. + # Corresponds to the JSON property `policy` + # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalPolicy] + attr_accessor :policy + + # Required. The resource for which the policy is being specified. This policy + # replaces any existing policy. + # Corresponds to the JSON property `resource` + # @return [String] + attr_accessor :resource + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @policy = args[:policy] if args.key?(:policy) + @resource = args[:resource] if args.key?(:resource) + end + end + + # Request for SignDevice method. + class SasPortalSignDeviceRequest + include Google::Apis::Core::Hashable + + # Required. The device to sign. + # The device fields name, fcc_id and serial_number must be set. + # Corresponds to the JSON property `device` + # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalDevice] + attr_accessor :device + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @device = args[:device] if args.key?(:device) + end + end + + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + class SasPortalStatus + include Google::Apis::Core::Hashable + + # The status code, which should be an enum value of google.rpc.Code. + # Corresponds to the JSON property `code` + # @return [Fixnum] + attr_accessor :code + + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + # Corresponds to the JSON property `details` + # @return [Array>] + attr_accessor :details + + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # google.rpc.Status.details field, or localized by the client. + # Corresponds to the JSON property `message` + # @return [String] + attr_accessor :message + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @code = args[:code] if args.key?(:code) + @details = args[:details] if args.key?(:details) + @message = args[:message] if args.key?(:message) + end + end + + # Request message for `TestPermissions` method. + class SasPortalTestPermissionsRequest + include Google::Apis::Core::Hashable + + # The set of permissions to check for the `resource`. + # Corresponds to the JSON property `permissions` + # @return [Array] + attr_accessor :permissions + + # Required. The resource for which the permissions are being requested. + # Corresponds to the JSON property `resource` + # @return [String] + attr_accessor :resource + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @permissions = args[:permissions] if args.key?(:permissions) + @resource = args[:resource] if args.key?(:resource) + end + end + + # Response message for `TestPermissions` method. + class SasPortalTestPermissionsResponse + include Google::Apis::Core::Hashable + + # A set of permissions that the caller is allowed. + # Corresponds to the JSON property `permissions` + # @return [Array] + attr_accessor :permissions + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @permissions = args[:permissions] if args.key?(:permissions) + end + end + + # Request for UpdateSignedDevice method. + class SasPortalUpdateSignedDeviceRequest + include Google::Apis::Core::Hashable + + # Required. The JSON Web Token signed using a CPI private key. Payload + # must be the JSON encoding + # of the device. + # Corresponds to the JSON property `encodedDevice` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :encoded_device + + # Required. Unique installer ID (CPI ID) from the Certified Professional + # Installers database. + # Corresponds to the JSON property `installerId` + # @return [String] + attr_accessor :installer_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @encoded_device = args[:encoded_device] if args.key?(:encoded_device) + @installer_id = args[:installer_id] if args.key?(:installer_id) + end + end + + # Request for ValidateInstaller method. + class SasPortalValidateInstallerRequest + include Google::Apis::Core::Hashable + + # Required. JSON Web Token signed using a CPI private key. Payload + # must include a "secret" claim whose value is the secret. + # Corresponds to the JSON property `encodedSecret` + # @return [String] + attr_accessor :encoded_secret + + # Required. Unique installer id (cpiId) from the Certified + # Professional Installers database. + # Corresponds to the JSON property `installerId` + # @return [String] + attr_accessor :installer_id + + # Required. Secret returned by the GenerateSecret method. + # Corresponds to the JSON property `secret` + # @return [String] + attr_accessor :secret + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @encoded_secret = args[:encoded_secret] if args.key?(:encoded_secret) + @installer_id = args[:installer_id] if args.key?(:installer_id) + @secret = args[:secret] if args.key?(:secret) + end + end + + # Response for ValidateInstaller method] + # [spectrum.sas.portal.v1alpha1.DeviceManager.ValidateInstaller]. + class SasPortalValidateInstallerResponse + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + end + end +end diff --git a/generated/google/apis/prod_tt_sasportal_v1alpha1/representations.rb b/generated/google/apis/prod_tt_sasportal_v1alpha1/representations.rb new file mode 100644 index 000000000..5ec0ae072 --- /dev/null +++ b/generated/google/apis/prod_tt_sasportal_v1alpha1/representations.rb @@ -0,0 +1,503 @@ +# 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 ProdTtSasportalV1alpha1 + + class SasPortalAssignment + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalCreateSignedDeviceRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalCustomer + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalDevice + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalDeviceAirInterface + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalDeviceConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalDeviceGrant + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalDeviceModel + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalDpaMoveList + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalEmpty + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalFrequencyRange + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalGenerateSecretRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalGenerateSecretResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalGetPolicyRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalInstallationParams + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalListCustomersResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalListDevicesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalListNodesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalMoveDeviceRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalMoveNodeRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalNode + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalOperation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalPolicy + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalSetPolicyRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalSignDeviceRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalStatus + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalTestPermissionsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalTestPermissionsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalUpdateSignedDeviceRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalValidateInstallerRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalValidateInstallerResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalAssignment + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :members, as: 'members' + property :role, as: 'role' + end + end + + class SasPortalCreateSignedDeviceRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :encoded_device, :base64 => true, as: 'encodedDevice' + property :installer_id, as: 'installerId' + end + end + + class SasPortalCustomer + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :display_name, as: 'displayName' + property :name, as: 'name' + collection :sas_user_ids, as: 'sasUserIds' + end + end + + class SasPortalDevice + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :active_config, as: 'activeConfig', class: Google::Apis::ProdTtSasportalV1alpha1::SasPortalDeviceConfig, decorator: Google::Apis::ProdTtSasportalV1alpha1::SasPortalDeviceConfig::Representation + + property :display_name, as: 'displayName' + property :fcc_id, as: 'fccId' + collection :grants, as: 'grants', class: Google::Apis::ProdTtSasportalV1alpha1::SasPortalDeviceGrant, decorator: Google::Apis::ProdTtSasportalV1alpha1::SasPortalDeviceGrant::Representation + + property :name, as: 'name' + property :preloaded_config, as: 'preloadedConfig', class: Google::Apis::ProdTtSasportalV1alpha1::SasPortalDeviceConfig, decorator: Google::Apis::ProdTtSasportalV1alpha1::SasPortalDeviceConfig::Representation + + property :serial_number, as: 'serialNumber' + property :state, as: 'state' + end + end + + class SasPortalDeviceAirInterface + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :radio_technology, as: 'radioTechnology' + property :supported_spec, as: 'supportedSpec' + end + end + + class SasPortalDeviceConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :air_interface, as: 'airInterface', class: Google::Apis::ProdTtSasportalV1alpha1::SasPortalDeviceAirInterface, decorator: Google::Apis::ProdTtSasportalV1alpha1::SasPortalDeviceAirInterface::Representation + + property :call_sign, as: 'callSign' + property :category, as: 'category' + property :installation_params, as: 'installationParams', class: Google::Apis::ProdTtSasportalV1alpha1::SasPortalInstallationParams, decorator: Google::Apis::ProdTtSasportalV1alpha1::SasPortalInstallationParams::Representation + + property :is_signed, as: 'isSigned' + collection :measurement_capabilities, as: 'measurementCapabilities' + property :model, as: 'model', class: Google::Apis::ProdTtSasportalV1alpha1::SasPortalDeviceModel, decorator: Google::Apis::ProdTtSasportalV1alpha1::SasPortalDeviceModel::Representation + + property :state, as: 'state' + property :update_time, as: 'updateTime' + property :user_id, as: 'userId' + end + end + + class SasPortalDeviceGrant + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :channel_type, as: 'channelType' + property :expire_time, as: 'expireTime' + property :frequency_range, as: 'frequencyRange', class: Google::Apis::ProdTtSasportalV1alpha1::SasPortalFrequencyRange, decorator: Google::Apis::ProdTtSasportalV1alpha1::SasPortalFrequencyRange::Representation + + property :max_eirp, as: 'maxEirp' + collection :move_list, as: 'moveList', class: Google::Apis::ProdTtSasportalV1alpha1::SasPortalDpaMoveList, decorator: Google::Apis::ProdTtSasportalV1alpha1::SasPortalDpaMoveList::Representation + + property :state, as: 'state' + end + end + + class SasPortalDeviceModel + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :firmware_version, as: 'firmwareVersion' + property :hardware_version, as: 'hardwareVersion' + property :name, as: 'name' + property :software_version, as: 'softwareVersion' + property :vendor, as: 'vendor' + end + end + + class SasPortalDpaMoveList + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :dpa_id, as: 'dpaId' + property :frequency_range, as: 'frequencyRange', class: Google::Apis::ProdTtSasportalV1alpha1::SasPortalFrequencyRange, decorator: Google::Apis::ProdTtSasportalV1alpha1::SasPortalFrequencyRange::Representation + + end + end + + class SasPortalEmpty + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class SasPortalFrequencyRange + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :high_frequency_mhz, as: 'highFrequencyMhz' + property :low_frequency_mhz, as: 'lowFrequencyMhz' + end + end + + class SasPortalGenerateSecretRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class SasPortalGenerateSecretResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :secret, as: 'secret' + end + end + + class SasPortalGetPolicyRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :resource, as: 'resource' + end + end + + class SasPortalInstallationParams + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :antenna_azimuth, as: 'antennaAzimuth' + property :antenna_beamwidth, as: 'antennaBeamwidth' + property :antenna_downtilt, as: 'antennaDowntilt' + property :antenna_gain, as: 'antennaGain' + property :antenna_model, as: 'antennaModel' + property :eirp_capability, as: 'eirpCapability' + property :height, as: 'height' + property :height_type, as: 'heightType' + property :horizontal_accuracy, as: 'horizontalAccuracy' + property :indoor_deployment, as: 'indoorDeployment' + property :latitude, as: 'latitude' + property :longitude, as: 'longitude' + property :vertical_accuracy, as: 'verticalAccuracy' + end + end + + class SasPortalListCustomersResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :customers, as: 'customers', class: Google::Apis::ProdTtSasportalV1alpha1::SasPortalCustomer, decorator: Google::Apis::ProdTtSasportalV1alpha1::SasPortalCustomer::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class SasPortalListDevicesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :devices, as: 'devices', class: Google::Apis::ProdTtSasportalV1alpha1::SasPortalDevice, decorator: Google::Apis::ProdTtSasportalV1alpha1::SasPortalDevice::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class SasPortalListNodesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :nodes, as: 'nodes', class: Google::Apis::ProdTtSasportalV1alpha1::SasPortalNode, decorator: Google::Apis::ProdTtSasportalV1alpha1::SasPortalNode::Representation + + end + end + + class SasPortalMoveDeviceRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :destination, as: 'destination' + end + end + + class SasPortalMoveNodeRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :destination, as: 'destination' + end + end + + class SasPortalNode + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :display_name, as: 'displayName' + property :name, as: 'name' + collection :sas_user_ids, as: 'sasUserIds' + end + end + + class SasPortalOperation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :done, as: 'done' + property :error, as: 'error', class: Google::Apis::ProdTtSasportalV1alpha1::SasPortalStatus, decorator: Google::Apis::ProdTtSasportalV1alpha1::SasPortalStatus::Representation + + hash :metadata, as: 'metadata' + property :name, as: 'name' + hash :response, as: 'response' + end + end + + class SasPortalPolicy + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :assignments, as: 'assignments', class: Google::Apis::ProdTtSasportalV1alpha1::SasPortalAssignment, decorator: Google::Apis::ProdTtSasportalV1alpha1::SasPortalAssignment::Representation + + property :etag, :base64 => true, as: 'etag' + end + end + + class SasPortalSetPolicyRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :policy, as: 'policy', class: Google::Apis::ProdTtSasportalV1alpha1::SasPortalPolicy, decorator: Google::Apis::ProdTtSasportalV1alpha1::SasPortalPolicy::Representation + + property :resource, as: 'resource' + end + end + + class SasPortalSignDeviceRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :device, as: 'device', class: Google::Apis::ProdTtSasportalV1alpha1::SasPortalDevice, decorator: Google::Apis::ProdTtSasportalV1alpha1::SasPortalDevice::Representation + + end + end + + class SasPortalStatus + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :code, as: 'code' + collection :details, as: 'details' + property :message, as: 'message' + end + end + + class SasPortalTestPermissionsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :permissions, as: 'permissions' + property :resource, as: 'resource' + end + end + + class SasPortalTestPermissionsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :permissions, as: 'permissions' + end + end + + class SasPortalUpdateSignedDeviceRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :encoded_device, :base64 => true, as: 'encodedDevice' + property :installer_id, as: 'installerId' + end + end + + class SasPortalValidateInstallerRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :encoded_secret, as: 'encodedSecret' + property :installer_id, as: 'installerId' + property :secret, as: 'secret' + end + end + + class SasPortalValidateInstallerResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + end + end +end diff --git a/generated/google/apis/prod_tt_sasportal_v1alpha1/service.rb b/generated/google/apis/prod_tt_sasportal_v1alpha1/service.rb new file mode 100644 index 000000000..81bb13da1 --- /dev/null +++ b/generated/google/apis/prod_tt_sasportal_v1alpha1/service.rb @@ -0,0 +1,1322 @@ +# 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 ProdTtSasportalV1alpha1 + # SAS Portal API (Testing) + # + # + # + # @example + # require 'google/apis/prod_tt_sasportal_v1alpha1' + # + # ProdTtSasportal = Google::Apis::ProdTtSasportalV1alpha1 # Alias the module + # service = ProdTtSasportal::SASPortalTestingService.new + # + # @see https://developers.google.com/spectrum-access-system/ + class SASPortalTestingService < 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://prod-tt-sasportal.googleapis.com/', '') + @batch_path = 'batch' + end + + # Returns a requested customer. + # @param [String] name + # Required. The name of the customer. + # @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::ProdTtSasportalV1alpha1::SasPortalCustomer] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalCustomer] + # + # @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_customer(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1alpha1/{+name}', options) + command.response_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalCustomer::Representation + command.response_class = Google::Apis::ProdTtSasportalV1alpha1::SasPortalCustomer + 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 a list of requested customers. + # @param [Fixnum] page_size + # The maximum number of customers + # to return in the response. + # @param [String] page_token + # A pagination token returned from a previous call to ListCustomers method that + # indicates where + # this listing should continue from. + # @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::ProdTtSasportalV1alpha1::SasPortalListCustomersResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalListCustomersResponse] + # + # @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_customers(page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1alpha1/customers', options) + command.response_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalListCustomersResponse::Representation + command.response_class = Google::Apis::ProdTtSasportalV1alpha1::SasPortalListCustomersResponse + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates an existing customer. + # @param [String] name + # Output only. Resource name of the customer. + # @param [Google::Apis::ProdTtSasportalV1alpha1::SasPortalCustomer] sas_portal_customer_object + # @param [String] update_mask + # Fields to be updated. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ProdTtSasportalV1alpha1::SasPortalCustomer] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalCustomer] + # + # @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_customer(name, sas_portal_customer_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::ProdTtSasportalV1alpha1::SasPortalCustomer::Representation + command.request_object = sas_portal_customer_object + command.response_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalCustomer::Representation + command.response_class = Google::Apis::ProdTtSasportalV1alpha1::SasPortalCustomer + 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 + + # Creates a device under a node or customer. + # @param [String] parent + # Required. The name of the parent resource. + # @param [Google::Apis::ProdTtSasportalV1alpha1::SasPortalDevice] sas_portal_device_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::ProdTtSasportalV1alpha1::SasPortalDevice] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalDevice] + # + # @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_customer_device(parent, sas_portal_device_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1alpha1/{+parent}/devices', options) + command.request_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalDevice::Representation + command.request_object = sas_portal_device_object + command.response_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalDevice::Representation + command.response_class = Google::Apis::ProdTtSasportalV1alpha1::SasPortalDevice + 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 + + # Creates a signed device under a + # node or customer. + # @param [String] parent + # Required. The name of the parent resource. + # @param [Google::Apis::ProdTtSasportalV1alpha1::SasPortalCreateSignedDeviceRequest] sas_portal_create_signed_device_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ProdTtSasportalV1alpha1::SasPortalDevice] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalDevice] + # + # @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_customer_device_signed(parent, sas_portal_create_signed_device_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1alpha1/{+parent}/devices:createSigned', options) + command.request_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalCreateSignedDeviceRequest::Representation + command.request_object = sas_portal_create_signed_device_request_object + command.response_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalDevice::Representation + command.response_class = Google::Apis::ProdTtSasportalV1alpha1::SasPortalDevice + 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 device. + # @param [String] name + # Required. The name of the device. + # @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::ProdTtSasportalV1alpha1::SasPortalEmpty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalEmpty] + # + # @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_customer_device(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1alpha1/{+name}', options) + command.response_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalEmpty::Representation + command.response_class = Google::Apis::ProdTtSasportalV1alpha1::SasPortalEmpty + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets details about a device. + # @param [String] name + # Required. The name of the device. + # @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::ProdTtSasportalV1alpha1::SasPortalDevice] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalDevice] + # + # @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_customer_device(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1alpha1/{+name}', options) + command.response_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalDevice::Representation + command.response_class = Google::Apis::ProdTtSasportalV1alpha1::SasPortalDevice + 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 devices under a node or customer. + # @param [String] parent + # Required. The name of the parent resource. + # @param [String] filter + # The filter expression. The filter should have one of the following + # formats: "sn=123454" or "display_name=MyDevice". sn + # corresponds to serial_number of the device. The filter is case insensitive. + # @param [Fixnum] page_size + # The maximum number of devices to return in the response. + # @param [String] page_token + # A pagination token returned from a previous call to ListDevices + # that indicates where this listing should continue from. + # @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::ProdTtSasportalV1alpha1::SasPortalListDevicesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalListDevicesResponse] + # + # @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_customer_devices(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1alpha1/{+parent}/devices', options) + command.response_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalListDevicesResponse::Representation + command.response_class = Google::Apis::ProdTtSasportalV1alpha1::SasPortalListDevicesResponse + command.params['parent'] = parent unless parent.nil? + command.query['filter'] = filter unless filter.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Moves a device under another node or customer. + # @param [String] name + # Required. The name of the device to move. + # @param [Google::Apis::ProdTtSasportalV1alpha1::SasPortalMoveDeviceRequest] sas_portal_move_device_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ProdTtSasportalV1alpha1::SasPortalOperation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalOperation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def move_customer_device(name, sas_portal_move_device_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1alpha1/{+name}:move', options) + command.request_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalMoveDeviceRequest::Representation + command.request_object = sas_portal_move_device_request_object + command.response_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalOperation::Representation + command.response_class = Google::Apis::ProdTtSasportalV1alpha1::SasPortalOperation + 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 + + # Updates a device. + # @param [String] name + # Output only. The resource path name. + # @param [Google::Apis::ProdTtSasportalV1alpha1::SasPortalDevice] sas_portal_device_object + # @param [String] update_mask + # Fields to be updated. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ProdTtSasportalV1alpha1::SasPortalDevice] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalDevice] + # + # @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_customer_device(name, sas_portal_device_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::ProdTtSasportalV1alpha1::SasPortalDevice::Representation + command.request_object = sas_portal_device_object + command.response_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalDevice::Representation + command.response_class = Google::Apis::ProdTtSasportalV1alpha1::SasPortalDevice + 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 + + # Signs a device. + # @param [String] name + # Output only. The resource path name. + # @param [Google::Apis::ProdTtSasportalV1alpha1::SasPortalSignDeviceRequest] sas_portal_sign_device_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ProdTtSasportalV1alpha1::SasPortalEmpty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalEmpty] + # + # @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 sign_customer_device_device(name, sas_portal_sign_device_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1alpha1/{+name}:signDevice', options) + command.request_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalSignDeviceRequest::Representation + command.request_object = sas_portal_sign_device_request_object + command.response_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalEmpty::Representation + command.response_class = Google::Apis::ProdTtSasportalV1alpha1::SasPortalEmpty + 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 + + # Updates a signed device. + # @param [String] name + # Required. The name of the device to update. + # @param [Google::Apis::ProdTtSasportalV1alpha1::SasPortalUpdateSignedDeviceRequest] sas_portal_update_signed_device_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ProdTtSasportalV1alpha1::SasPortalDevice] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalDevice] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_customer_device_signed(name, sas_portal_update_signed_device_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1alpha1/{+name}:updateSigned', options) + command.request_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalUpdateSignedDeviceRequest::Representation + command.request_object = sas_portal_update_signed_device_request_object + command.response_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalDevice::Representation + command.response_class = Google::Apis::ProdTtSasportalV1alpha1::SasPortalDevice + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a new node. + # @param [String] parent + # Required. The parent resource name where the node is to be created. + # @param [Google::Apis::ProdTtSasportalV1alpha1::SasPortalNode] sas_portal_node_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::ProdTtSasportalV1alpha1::SasPortalNode] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalNode] + # + # @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_customer_node(parent, sas_portal_node_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1alpha1/{+parent}/nodes', options) + command.request_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalNode::Representation + command.request_object = sas_portal_node_object + command.response_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalNode::Representation + command.response_class = Google::Apis::ProdTtSasportalV1alpha1::SasPortalNode + 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 node. + # @param [String] name + # Required. The name of the node. + # @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::ProdTtSasportalV1alpha1::SasPortalEmpty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalEmpty] + # + # @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_customer_node(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1alpha1/{+name}', options) + command.response_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalEmpty::Representation + command.response_class = Google::Apis::ProdTtSasportalV1alpha1::SasPortalEmpty + 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 a requested node. + # @param [String] name + # Required. The name of the node. + # @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::ProdTtSasportalV1alpha1::SasPortalNode] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalNode] + # + # @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_customer_node(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1alpha1/{+name}', options) + command.response_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalNode::Representation + command.response_class = Google::Apis::ProdTtSasportalV1alpha1::SasPortalNode + 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 nodes. + # @param [String] parent + # Required. The parent resource name, for example, "nodes/1". + # @param [Fixnum] page_size + # The maximum number of nodes to return in the response. + # @param [String] page_token + # A pagination token returned from a previous call to ListNodes method + # that indicates where this listing should continue from. + # @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::ProdTtSasportalV1alpha1::SasPortalListNodesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalListNodesResponse] + # + # @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_customer_nodes(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1alpha1/{+parent}/nodes', options) + command.response_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalListNodesResponse::Representation + command.response_class = Google::Apis::ProdTtSasportalV1alpha1::SasPortalListNodesResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Moves a node under another node or customer. + # @param [String] name + # Required. The name of the node to + # move. + # @param [Google::Apis::ProdTtSasportalV1alpha1::SasPortalMoveNodeRequest] sas_portal_move_node_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ProdTtSasportalV1alpha1::SasPortalOperation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalOperation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def move_customer_node(name, sas_portal_move_node_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1alpha1/{+name}:move', options) + command.request_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalMoveNodeRequest::Representation + command.request_object = sas_portal_move_node_request_object + command.response_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalOperation::Representation + command.response_class = Google::Apis::ProdTtSasportalV1alpha1::SasPortalOperation + 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 + + # Updates an existing node. + # @param [String] name + # Output only. Resource name. + # @param [Google::Apis::ProdTtSasportalV1alpha1::SasPortalNode] sas_portal_node_object + # @param [String] update_mask + # Fields to be updated. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ProdTtSasportalV1alpha1::SasPortalNode] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalNode] + # + # @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_customer_node(name, sas_portal_node_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::ProdTtSasportalV1alpha1::SasPortalNode::Representation + command.request_object = sas_portal_node_object + command.response_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalNode::Representation + command.response_class = Google::Apis::ProdTtSasportalV1alpha1::SasPortalNode + 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 + + # Generates a secret to be used with the ValidateInstaller method + # @param [Google::Apis::ProdTtSasportalV1alpha1::SasPortalGenerateSecretRequest] sas_portal_generate_secret_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ProdTtSasportalV1alpha1::SasPortalGenerateSecretResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalGenerateSecretResponse] + # + # @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 generate_installer_secret(sas_portal_generate_secret_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1alpha1/installer:generateSecret', options) + command.request_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalGenerateSecretRequest::Representation + command.request_object = sas_portal_generate_secret_request_object + command.response_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalGenerateSecretResponse::Representation + command.response_class = Google::Apis::ProdTtSasportalV1alpha1::SasPortalGenerateSecretResponse + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Validates the identity of a Certified Professional Installer (CPI). + # @param [Google::Apis::ProdTtSasportalV1alpha1::SasPortalValidateInstallerRequest] sas_portal_validate_installer_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ProdTtSasportalV1alpha1::SasPortalValidateInstallerResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalValidateInstallerResponse] + # + # @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 validate_installer(sas_portal_validate_installer_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1alpha1/installer:validate', options) + command.request_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalValidateInstallerRequest::Representation + command.request_object = sas_portal_validate_installer_request_object + command.response_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalValidateInstallerResponse::Representation + command.response_class = Google::Apis::ProdTtSasportalV1alpha1::SasPortalValidateInstallerResponse + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a device under a node or customer. + # @param [String] parent + # Required. The name of the parent resource. + # @param [Google::Apis::ProdTtSasportalV1alpha1::SasPortalDevice] sas_portal_device_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::ProdTtSasportalV1alpha1::SasPortalDevice] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalDevice] + # + # @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_node_device(parent, sas_portal_device_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1alpha1/{+parent}/devices', options) + command.request_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalDevice::Representation + command.request_object = sas_portal_device_object + command.response_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalDevice::Representation + command.response_class = Google::Apis::ProdTtSasportalV1alpha1::SasPortalDevice + 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 + + # Creates a signed device under a + # node or customer. + # @param [String] parent + # Required. The name of the parent resource. + # @param [Google::Apis::ProdTtSasportalV1alpha1::SasPortalCreateSignedDeviceRequest] sas_portal_create_signed_device_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ProdTtSasportalV1alpha1::SasPortalDevice] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalDevice] + # + # @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_node_device_signed(parent, sas_portal_create_signed_device_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1alpha1/{+parent}/devices:createSigned', options) + command.request_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalCreateSignedDeviceRequest::Representation + command.request_object = sas_portal_create_signed_device_request_object + command.response_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalDevice::Representation + command.response_class = Google::Apis::ProdTtSasportalV1alpha1::SasPortalDevice + 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 device. + # @param [String] name + # Required. The name of the device. + # @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::ProdTtSasportalV1alpha1::SasPortalEmpty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalEmpty] + # + # @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_node_device(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1alpha1/{+name}', options) + command.response_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalEmpty::Representation + command.response_class = Google::Apis::ProdTtSasportalV1alpha1::SasPortalEmpty + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets details about a device. + # @param [String] name + # Required. The name of the device. + # @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::ProdTtSasportalV1alpha1::SasPortalDevice] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalDevice] + # + # @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_node_device(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1alpha1/{+name}', options) + command.response_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalDevice::Representation + command.response_class = Google::Apis::ProdTtSasportalV1alpha1::SasPortalDevice + 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 devices under a node or customer. + # @param [String] parent + # Required. The name of the parent resource. + # @param [String] filter + # The filter expression. The filter should have one of the following + # formats: "sn=123454" or "display_name=MyDevice". sn + # corresponds to serial_number of the device. The filter is case insensitive. + # @param [Fixnum] page_size + # The maximum number of devices to return in the response. + # @param [String] page_token + # A pagination token returned from a previous call to ListDevices + # that indicates where this listing should continue from. + # @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::ProdTtSasportalV1alpha1::SasPortalListDevicesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalListDevicesResponse] + # + # @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_node_devices(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1alpha1/{+parent}/devices', options) + command.response_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalListDevicesResponse::Representation + command.response_class = Google::Apis::ProdTtSasportalV1alpha1::SasPortalListDevicesResponse + command.params['parent'] = parent unless parent.nil? + command.query['filter'] = filter unless filter.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Moves a device under another node or customer. + # @param [String] name + # Required. The name of the device to move. + # @param [Google::Apis::ProdTtSasportalV1alpha1::SasPortalMoveDeviceRequest] sas_portal_move_device_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ProdTtSasportalV1alpha1::SasPortalOperation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalOperation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def move_node_device(name, sas_portal_move_device_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1alpha1/{+name}:move', options) + command.request_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalMoveDeviceRequest::Representation + command.request_object = sas_portal_move_device_request_object + command.response_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalOperation::Representation + command.response_class = Google::Apis::ProdTtSasportalV1alpha1::SasPortalOperation + 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 + + # Updates a device. + # @param [String] name + # Output only. The resource path name. + # @param [Google::Apis::ProdTtSasportalV1alpha1::SasPortalDevice] sas_portal_device_object + # @param [String] update_mask + # Fields to be updated. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ProdTtSasportalV1alpha1::SasPortalDevice] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalDevice] + # + # @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_node_device(name, sas_portal_device_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::ProdTtSasportalV1alpha1::SasPortalDevice::Representation + command.request_object = sas_portal_device_object + command.response_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalDevice::Representation + command.response_class = Google::Apis::ProdTtSasportalV1alpha1::SasPortalDevice + 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 + + # Signs a device. + # @param [String] name + # Output only. The resource path name. + # @param [Google::Apis::ProdTtSasportalV1alpha1::SasPortalSignDeviceRequest] sas_portal_sign_device_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ProdTtSasportalV1alpha1::SasPortalEmpty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalEmpty] + # + # @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 sign_node_device_device(name, sas_portal_sign_device_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1alpha1/{+name}:signDevice', options) + command.request_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalSignDeviceRequest::Representation + command.request_object = sas_portal_sign_device_request_object + command.response_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalEmpty::Representation + command.response_class = Google::Apis::ProdTtSasportalV1alpha1::SasPortalEmpty + 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 + + # Updates a signed device. + # @param [String] name + # Required. The name of the device to update. + # @param [Google::Apis::ProdTtSasportalV1alpha1::SasPortalUpdateSignedDeviceRequest] sas_portal_update_signed_device_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ProdTtSasportalV1alpha1::SasPortalDevice] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalDevice] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_node_device_signed(name, sas_portal_update_signed_device_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1alpha1/{+name}:updateSigned', options) + command.request_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalUpdateSignedDeviceRequest::Representation + command.request_object = sas_portal_update_signed_device_request_object + command.response_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalDevice::Representation + command.response_class = Google::Apis::ProdTtSasportalV1alpha1::SasPortalDevice + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a new node. + # @param [String] parent + # Required. The parent resource name where the node is to be created. + # @param [Google::Apis::ProdTtSasportalV1alpha1::SasPortalNode] sas_portal_node_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::ProdTtSasportalV1alpha1::SasPortalNode] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalNode] + # + # @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_node_node(parent, sas_portal_node_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1alpha1/{+parent}/nodes', options) + command.request_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalNode::Representation + command.request_object = sas_portal_node_object + command.response_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalNode::Representation + command.response_class = Google::Apis::ProdTtSasportalV1alpha1::SasPortalNode + 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 node. + # @param [String] name + # Required. The name of the node. + # @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::ProdTtSasportalV1alpha1::SasPortalEmpty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalEmpty] + # + # @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_node_node(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1alpha1/{+name}', options) + command.response_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalEmpty::Representation + command.response_class = Google::Apis::ProdTtSasportalV1alpha1::SasPortalEmpty + 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 a requested node. + # @param [String] name + # Required. The name of the node. + # @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::ProdTtSasportalV1alpha1::SasPortalNode] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalNode] + # + # @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_node_node(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1alpha1/{+name}', options) + command.response_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalNode::Representation + command.response_class = Google::Apis::ProdTtSasportalV1alpha1::SasPortalNode + 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 nodes. + # @param [String] parent + # Required. The parent resource name, for example, "nodes/1". + # @param [Fixnum] page_size + # The maximum number of nodes to return in the response. + # @param [String] page_token + # A pagination token returned from a previous call to ListNodes method + # that indicates where this listing should continue from. + # @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::ProdTtSasportalV1alpha1::SasPortalListNodesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalListNodesResponse] + # + # @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_node_nodes(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1alpha1/{+parent}/nodes', options) + command.response_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalListNodesResponse::Representation + command.response_class = Google::Apis::ProdTtSasportalV1alpha1::SasPortalListNodesResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Moves a node under another node or customer. + # @param [String] name + # Required. The name of the node to + # move. + # @param [Google::Apis::ProdTtSasportalV1alpha1::SasPortalMoveNodeRequest] sas_portal_move_node_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ProdTtSasportalV1alpha1::SasPortalOperation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalOperation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def move_node_node(name, sas_portal_move_node_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1alpha1/{+name}:move', options) + command.request_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalMoveNodeRequest::Representation + command.request_object = sas_portal_move_node_request_object + command.response_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalOperation::Representation + command.response_class = Google::Apis::ProdTtSasportalV1alpha1::SasPortalOperation + 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 + + # Updates an existing node. + # @param [String] name + # Output only. Resource name. + # @param [Google::Apis::ProdTtSasportalV1alpha1::SasPortalNode] sas_portal_node_object + # @param [String] update_mask + # Fields to be updated. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ProdTtSasportalV1alpha1::SasPortalNode] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalNode] + # + # @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_node_node(name, sas_portal_node_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::ProdTtSasportalV1alpha1::SasPortalNode::Representation + command.request_object = sas_portal_node_object + command.response_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalNode::Representation + command.response_class = Google::Apis::ProdTtSasportalV1alpha1::SasPortalNode + 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 + + # Gets the access control policy for a resource. + # Returns an empty policy if the resource exists and does not have a policy + # set. + # @param [Google::Apis::ProdTtSasportalV1alpha1::SasPortalGetPolicyRequest] sas_portal_get_policy_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ProdTtSasportalV1alpha1::SasPortalPolicy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalPolicy] + # + # @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_policy(sas_portal_get_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1alpha1/policies:get', options) + command.request_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalGetPolicyRequest::Representation + command.request_object = sas_portal_get_policy_request_object + command.response_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalPolicy::Representation + command.response_class = Google::Apis::ProdTtSasportalV1alpha1::SasPortalPolicy + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Sets the access control policy on the specified resource. Replaces any + # existing policy. + # @param [Google::Apis::ProdTtSasportalV1alpha1::SasPortalSetPolicyRequest] sas_portal_set_policy_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ProdTtSasportalV1alpha1::SasPortalPolicy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalPolicy] + # + # @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 set_policy(sas_portal_set_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1alpha1/policies:set', options) + command.request_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalSetPolicyRequest::Representation + command.request_object = sas_portal_set_policy_request_object + command.response_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalPolicy::Representation + command.response_class = Google::Apis::ProdTtSasportalV1alpha1::SasPortalPolicy + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Returns permissions that a caller has on the specified resource. + # @param [Google::Apis::ProdTtSasportalV1alpha1::SasPortalTestPermissionsRequest] sas_portal_test_permissions_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ProdTtSasportalV1alpha1::SasPortalTestPermissionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalTestPermissionsResponse] + # + # @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 test_policy(sas_portal_test_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1alpha1/policies:test', options) + command.request_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalTestPermissionsRequest::Representation + command.request_object = sas_portal_test_permissions_request_object + command.response_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalTestPermissionsResponse::Representation + command.response_class = Google::Apis::ProdTtSasportalV1alpha1::SasPortalTestPermissionsResponse + 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/sasportal_v1alpha1.rb b/generated/google/apis/sasportal_v1alpha1.rb new file mode 100644 index 000000000..1a935a69d --- /dev/null +++ b/generated/google/apis/sasportal_v1alpha1.rb @@ -0,0 +1,34 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'google/apis/sasportal_v1alpha1/service.rb' +require 'google/apis/sasportal_v1alpha1/classes.rb' +require 'google/apis/sasportal_v1alpha1/representations.rb' + +module Google + module Apis + # SAS Portal API + # + # + # + # @see https://developers.google.com/spectrum-access-system/ + module SasportalV1alpha1 + VERSION = 'V1alpha1' + REVISION = '20191217' + + # View your email address + AUTH_USERINFO_EMAIL = 'https://www.googleapis.com/auth/userinfo.email' + end + end +end diff --git a/generated/google/apis/sasportal_v1alpha1/classes.rb b/generated/google/apis/sasportal_v1alpha1/classes.rb new file mode 100644 index 000000000..434faf584 --- /dev/null +++ b/generated/google/apis/sasportal_v1alpha1/classes.rb @@ -0,0 +1,1084 @@ +# 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 SasportalV1alpha1 + + # Associates `members` with a `role`. + class SasPortalAssignment + include Google::Apis::Core::Hashable + + # The identities the role is assigned to. It can have the following + # values: + # * ``user_email``: An email address that represents a specific + # Google account. For example: `alice@gmail.com`. + # * ``group_email``: An email address that represents a Google + # group. For example, `viewers@gmail.com`. + # Corresponds to the JSON property `members` + # @return [Array] + attr_accessor :members + + # Required. Role that is assigned to `members`. + # Corresponds to the JSON property `role` + # @return [String] + attr_accessor :role + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @members = args[:members] if args.key?(:members) + @role = args[:role] if args.key?(:role) + end + end + + # Request for CreateSignedDevice method. + class SasPortalCreateSignedDeviceRequest + include Google::Apis::Core::Hashable + + # Required. JSON Web Token signed using a CPI private key. Payload + # must be the JSON encoding of the [Device]. + # Corresponds to the JSON property `encodedDevice` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :encoded_device + + # Required. Unique installer id (cpiId) from the Certified Professional + # Installers database. + # Corresponds to the JSON property `installerId` + # @return [String] + attr_accessor :installer_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @encoded_device = args[:encoded_device] if args.key?(:encoded_device) + @installer_id = args[:installer_id] if args.key?(:installer_id) + end + end + + # Entity representing a SAS customer. + class SasPortalCustomer + include Google::Apis::Core::Hashable + + # Required. Name of the organization that the customer entity represents. + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # Output only. Resource name of the customer. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # User IDs used by the devices belonging to this customer. + # Corresponds to the JSON property `sasUserIds` + # @return [Array] + attr_accessor :sas_user_ids + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @display_name = args[:display_name] if args.key?(:display_name) + @name = args[:name] if args.key?(:name) + @sas_user_ids = args[:sas_user_ids] if args.key?(:sas_user_ids) + end + end + + # + class SasPortalDevice + include Google::Apis::Core::Hashable + + # Information about the device configuration. + # Corresponds to the JSON property `activeConfig` + # @return [Google::Apis::SasportalV1alpha1::SasPortalDeviceConfig] + attr_accessor :active_config + + # Device display name. + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # The FCC identifier of the device. + # Corresponds to the JSON property `fccId` + # @return [String] + attr_accessor :fcc_id + + # Output only. Grants held by the device. + # Corresponds to the JSON property `grants` + # @return [Array] + attr_accessor :grants + + # Output only. The resource path name. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Information about the device configuration. + # Corresponds to the JSON property `preloadedConfig` + # @return [Google::Apis::SasportalV1alpha1::SasPortalDeviceConfig] + attr_accessor :preloaded_config + + # A serial number assigned to the device by the device + # manufacturer. + # Corresponds to the JSON property `serialNumber` + # @return [String] + attr_accessor :serial_number + + # Output only. Device state. + # Corresponds to the JSON property `state` + # @return [String] + attr_accessor :state + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @active_config = args[:active_config] if args.key?(:active_config) + @display_name = args[:display_name] if args.key?(:display_name) + @fcc_id = args[:fcc_id] if args.key?(:fcc_id) + @grants = args[:grants] if args.key?(:grants) + @name = args[:name] if args.key?(:name) + @preloaded_config = args[:preloaded_config] if args.key?(:preloaded_config) + @serial_number = args[:serial_number] if args.key?(:serial_number) + @state = args[:state] if args.key?(:state) + end + end + + # Information about the device's air interface. + class SasPortalDeviceAirInterface + include Google::Apis::Core::Hashable + + # This field specifies the radio access technology that is used for the CBSD. + # Conditional + # Corresponds to the JSON property `radioTechnology` + # @return [String] + attr_accessor :radio_technology + + # This field is related to the radioTechnology field and provides the air + # interface specification that the CBSD is compliant with at the time of + # registration. + # Optional + # Corresponds to the JSON property `supportedSpec` + # @return [String] + attr_accessor :supported_spec + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @radio_technology = args[:radio_technology] if args.key?(:radio_technology) + @supported_spec = args[:supported_spec] if args.key?(:supported_spec) + end + end + + # Information about the device configuration. + class SasPortalDeviceConfig + include Google::Apis::Core::Hashable + + # Information about the device's air interface. + # Corresponds to the JSON property `airInterface` + # @return [Google::Apis::SasportalV1alpha1::SasPortalDeviceAirInterface] + attr_accessor :air_interface + + # The call sign of the device operator. + # Corresponds to the JSON property `callSign` + # @return [String] + attr_accessor :call_sign + + # FCC category of the device. + # Corresponds to the JSON property `category` + # @return [String] + attr_accessor :category + + # Information about the device installation parameters. + # Corresponds to the JSON property `installationParams` + # @return [Google::Apis::SasportalV1alpha1::SasPortalInstallationParams] + attr_accessor :installation_params + + # Output-only. Whether the configuration has been signed by a CPI. + # Corresponds to the JSON property `isSigned` + # @return [Boolean] + attr_accessor :is_signed + alias_method :is_signed?, :is_signed + + # Measurement reporting capabilities of the device. + # Corresponds to the JSON property `measurementCapabilities` + # @return [Array] + attr_accessor :measurement_capabilities + + # Information about the model of the device. + # Corresponds to the JSON property `model` + # @return [Google::Apis::SasportalV1alpha1::SasPortalDeviceModel] + attr_accessor :model + + # State of the configuration. + # Corresponds to the JSON property `state` + # @return [String] + attr_accessor :state + + # Output-only. The last time the device configuration was edited. + # Corresponds to the JSON property `updateTime` + # @return [String] + attr_accessor :update_time + + # Output only. The identifier of a device user. + # Corresponds to the JSON property `userId` + # @return [String] + attr_accessor :user_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @air_interface = args[:air_interface] if args.key?(:air_interface) + @call_sign = args[:call_sign] if args.key?(:call_sign) + @category = args[:category] if args.key?(:category) + @installation_params = args[:installation_params] if args.key?(:installation_params) + @is_signed = args[:is_signed] if args.key?(:is_signed) + @measurement_capabilities = args[:measurement_capabilities] if args.key?(:measurement_capabilities) + @model = args[:model] if args.key?(:model) + @state = args[:state] if args.key?(:state) + @update_time = args[:update_time] if args.key?(:update_time) + @user_id = args[:user_id] if args.key?(:user_id) + end + end + + # Device grant. It is an authorization provided by the Spectrum + # Access System to a device to transmit using specified operating + # parameters after a successful heartbeat by the device. + class SasPortalDeviceGrant + include Google::Apis::Core::Hashable + + # Type of channel used. + # Corresponds to the JSON property `channelType` + # @return [String] + attr_accessor :channel_type + + # The expiration time of the grant. + # Corresponds to the JSON property `expireTime` + # @return [String] + attr_accessor :expire_time + + # Frequency range from `low_frequency` to `high_frequency`. + # Corresponds to the JSON property `frequencyRange` + # @return [Google::Apis::SasportalV1alpha1::SasPortalFrequencyRange] + attr_accessor :frequency_range + + # Maximum Equivalent Isotropically Radiated Power (EIRP) permitted + # by the grant. The maximum EIRP is in units of dBm/MHz. The + # value of maxEirp represents the average (RMS) EIRP that would be + # measured by the procedure defined in FCC part 96.41(e)(3). + # Corresponds to the JSON property `maxEirp` + # @return [Float] + attr_accessor :max_eirp + + # The DPA move lists on which this grant appears. + # Corresponds to the JSON property `moveList` + # @return [Array] + attr_accessor :move_list + + # State of the grant. + # Corresponds to the JSON property `state` + # @return [String] + attr_accessor :state + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @channel_type = args[:channel_type] if args.key?(:channel_type) + @expire_time = args[:expire_time] if args.key?(:expire_time) + @frequency_range = args[:frequency_range] if args.key?(:frequency_range) + @max_eirp = args[:max_eirp] if args.key?(:max_eirp) + @move_list = args[:move_list] if args.key?(:move_list) + @state = args[:state] if args.key?(:state) + end + end + + # Information about the model of the device. + class SasPortalDeviceModel + include Google::Apis::Core::Hashable + + # The firmware version of the device. + # Corresponds to the JSON property `firmwareVersion` + # @return [String] + attr_accessor :firmware_version + + # The hardware version of the device. + # Corresponds to the JSON property `hardwareVersion` + # @return [String] + attr_accessor :hardware_version + + # The name of the device model. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The software version of the device. + # Corresponds to the JSON property `softwareVersion` + # @return [String] + attr_accessor :software_version + + # The name of the device vendor. + # Corresponds to the JSON property `vendor` + # @return [String] + attr_accessor :vendor + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @firmware_version = args[:firmware_version] if args.key?(:firmware_version) + @hardware_version = args[:hardware_version] if args.key?(:hardware_version) + @name = args[:name] if args.key?(:name) + @software_version = args[:software_version] if args.key?(:software_version) + @vendor = args[:vendor] if args.key?(:vendor) + end + end + + # An entry in a DPA's move list. + class SasPortalDpaMoveList + include Google::Apis::Core::Hashable + + # The ID of the DPA. + # Corresponds to the JSON property `dpaId` + # @return [String] + attr_accessor :dpa_id + + # Frequency range from `low_frequency` to `high_frequency`. + # Corresponds to the JSON property `frequencyRange` + # @return [Google::Apis::SasportalV1alpha1::SasPortalFrequencyRange] + attr_accessor :frequency_range + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @dpa_id = args[:dpa_id] if args.key?(:dpa_id) + @frequency_range = args[:frequency_range] if args.key?(:frequency_range) + 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 SasPortalEmpty + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Frequency range from `low_frequency` to `high_frequency`. + class SasPortalFrequencyRange + include Google::Apis::Core::Hashable + + # The highest frequency of the frequency range in MHz. + # Corresponds to the JSON property `highFrequencyMhz` + # @return [Float] + attr_accessor :high_frequency_mhz + + # The lowest frequency of the frequency range in MHz. + # Corresponds to the JSON property `lowFrequencyMhz` + # @return [Float] + attr_accessor :low_frequency_mhz + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @high_frequency_mhz = args[:high_frequency_mhz] if args.key?(:high_frequency_mhz) + @low_frequency_mhz = args[:low_frequency_mhz] if args.key?(:low_frequency_mhz) + end + end + + # Request for GenerateSecret method] + # [spectrum.sas.portal.v1alpha1.DeviceManager.GenerateSecret]. + class SasPortalGenerateSecretRequest + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Response for GenerateSecret method. + class SasPortalGenerateSecretResponse + include Google::Apis::Core::Hashable + + # The secret generated by the string and used by + # [ValidateInstaller] method. + # Corresponds to the JSON property `secret` + # @return [String] + attr_accessor :secret + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @secret = args[:secret] if args.key?(:secret) + end + end + + # Request message for `GetPolicy` method. + class SasPortalGetPolicyRequest + include Google::Apis::Core::Hashable + + # Required. The resource for which the policy is being requested. + # Corresponds to the JSON property `resource` + # @return [String] + attr_accessor :resource + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @resource = args[:resource] if args.key?(:resource) + end + end + + # Information about the device installation parameters. + class SasPortalInstallationParams + include Google::Apis::Core::Hashable + + # Boresight direction of the horizontal plane of the antenna in + # degrees with respect to true north. The value of this parameter + # is an integer with a value between 0 and 359 inclusive. A value + # of 0 degrees means true north; a value of 90 degrees means + # east. This parameter is optional for Category A devices and + # conditional for Category B devices. + # Corresponds to the JSON property `antennaAzimuth` + # @return [Fixnum] + attr_accessor :antenna_azimuth + + # 3-dB antenna beamwidth of the antenna in the horizontal-plane in + # degrees. This parameter is an unsigned integer having a value + # between 0 and 360 (degrees) inclusive; it is optional for + # Category A devices and conditional for Category B devices. + # Corresponds to the JSON property `antennaBeamwidth` + # @return [Fixnum] + attr_accessor :antenna_beamwidth + + # Antenna downtilt in degrees and is an integer with a value + # between -90 and +90 inclusive; a negative value means the antenna + # is tilted up (above horizontal). This parameter is optional for + # Category A devices and conditional for Category B devices. + # Corresponds to the JSON property `antennaDowntilt` + # @return [Fixnum] + attr_accessor :antenna_downtilt + + # Peak antenna gain in dBi. This parameter is an integer with a + # value between -127 and +128 (dBi) inclusive. + # Corresponds to the JSON property `antennaGain` + # @return [Fixnum] + attr_accessor :antenna_gain + + # If an external antenna is used, the antenna model is optionally + # provided in this field. The string has a maximum length of 128 + # octets. + # Corresponds to the JSON property `antennaModel` + # @return [String] + attr_accessor :antenna_model + + # This parameter is the maximum device EIRP in units of dBm/10MHz + # and is an integer with a value between -127 and +47 (dBm/10 MHz) + # inclusive. If not included, SAS interprets it as maximum + # allowable EIRP in units of dBm/10MHz for device category. + # Corresponds to the JSON property `eirpCapability` + # @return [Fixnum] + attr_accessor :eirp_capability + + # Device antenna height in meters. When the heightType parameter + # value is "AGL", the antenna height should be given relative to + # ground level. When the heightType parameter value is "AMSL", it + # is given with respect to WGS84 datum. + # Corresponds to the JSON property `height` + # @return [Float] + attr_accessor :height + + # Specifies how the height is measured. + # Corresponds to the JSON property `heightType` + # @return [String] + attr_accessor :height_type + + # A positive number in meters to indicate accuracy of the device + # antenna horizontal location. This optional parameter should only + # be present if its value is less than the FCC requirement of 50 + # meters. + # Corresponds to the JSON property `horizontalAccuracy` + # @return [Float] + attr_accessor :horizontal_accuracy + + # Whether the device antenna is indoor or not. True: indoor. False: + # outdoor. + # Corresponds to the JSON property `indoorDeployment` + # @return [Boolean] + attr_accessor :indoor_deployment + alias_method :indoor_deployment?, :indoor_deployment + + # Latitude of the device antenna location in degrees relative to + # the WGS 84 datum. The allowed range is from -90.000000 to + # +90.000000. Positive values represent latitudes north of the + # equator; negative values south of the equator. + # Corresponds to the JSON property `latitude` + # @return [Float] + attr_accessor :latitude + + # Longitude of the device antenna location. in degrees relative to + # the WGS 84 datum. The allowed range is from -180.000000 to + # +180.000000. Positive values represent longitudes east of the + # prime meridian; negative values west of the prime + # meridian. + # Corresponds to the JSON property `longitude` + # @return [Float] + attr_accessor :longitude + + # A positive number in meters to indicate accuracy of the device + # antenna vertical location. This optional parameter should only be + # present if its value is less than the FCC requirement of 3 + # meters. + # Corresponds to the JSON property `verticalAccuracy` + # @return [Float] + attr_accessor :vertical_accuracy + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @antenna_azimuth = args[:antenna_azimuth] if args.key?(:antenna_azimuth) + @antenna_beamwidth = args[:antenna_beamwidth] if args.key?(:antenna_beamwidth) + @antenna_downtilt = args[:antenna_downtilt] if args.key?(:antenna_downtilt) + @antenna_gain = args[:antenna_gain] if args.key?(:antenna_gain) + @antenna_model = args[:antenna_model] if args.key?(:antenna_model) + @eirp_capability = args[:eirp_capability] if args.key?(:eirp_capability) + @height = args[:height] if args.key?(:height) + @height_type = args[:height_type] if args.key?(:height_type) + @horizontal_accuracy = args[:horizontal_accuracy] if args.key?(:horizontal_accuracy) + @indoor_deployment = args[:indoor_deployment] if args.key?(:indoor_deployment) + @latitude = args[:latitude] if args.key?(:latitude) + @longitude = args[:longitude] if args.key?(:longitude) + @vertical_accuracy = args[:vertical_accuracy] if args.key?(:vertical_accuracy) + end + end + + # Response for `ListCustomers`. + class SasPortalListCustomersResponse + include Google::Apis::Core::Hashable + + # The list of customers that + # match the request. + # Corresponds to the JSON property `customers` + # @return [Array] + attr_accessor :customers + + # A pagination token returned from a previous call to ListCustomers method that + # indicates from + # where listing should continue. If the field is missing or empty, it means + # there are no more customers. + # 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) + @customers = args[:customers] if args.key?(:customers) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # Response for ListDevices method. + class SasPortalListDevicesResponse + include Google::Apis::Core::Hashable + + # The devices that match the request. + # Corresponds to the JSON property `devices` + # @return [Array] + attr_accessor :devices + + # A pagination token returned from a previous call to ListDevices method + # that indicates from where listing should continue. If the field + # is missing or empty, it means there is no more devices. + # 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) + @devices = args[:devices] if args.key?(:devices) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # Response for ListNodes method. + class SasPortalListNodesResponse + include Google::Apis::Core::Hashable + + # A pagination token returned from a previous call to + # ListNodes method + # that indicates from where listing should continue. If the field is missing + # or empty, it means there is no more nodes. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The nodes that match the request. + # Corresponds to the JSON property `nodes` + # @return [Array] + attr_accessor :nodes + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @nodes = args[:nodes] if args.key?(:nodes) + end + end + + # Request for MoveDevice method. + class SasPortalMoveDeviceRequest + include Google::Apis::Core::Hashable + + # Required. The name of the new parent resource (Node or Customer) to + # reparent the device under. + # Corresponds to the JSON property `destination` + # @return [String] + attr_accessor :destination + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @destination = args[:destination] if args.key?(:destination) + end + end + + # Request for MoveNode method. + class SasPortalMoveNodeRequest + include Google::Apis::Core::Hashable + + # Required. The name of the new parent resource node or Customer) to reparent + # the node under. + # Corresponds to the JSON property `destination` + # @return [String] + attr_accessor :destination + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @destination = args[:destination] if args.key?(:destination) + end + end + + # The Node. + class SasPortalNode + include Google::Apis::Core::Hashable + + # The node's display name. + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # Output only. Resource name. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # User ids used by the devices belonging to this node. + # Corresponds to the JSON property `sasUserIds` + # @return [Array] + attr_accessor :sas_user_ids + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @display_name = args[:display_name] if args.key?(:display_name) + @name = args[:name] if args.key?(:name) + @sas_user_ids = args[:sas_user_ids] if args.key?(:sas_user_ids) + end + end + + # This resource represents a long-running operation that is the result of a + # network API call. + class SasPortalOperation + include Google::Apis::Core::Hashable + + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # Corresponds to the JSON property `done` + # @return [Boolean] + attr_accessor :done + alias_method :done?, :done + + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # Corresponds to the JSON property `error` + # @return [Google::Apis::SasportalV1alpha1::SasPortalStatus] + attr_accessor :error + + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # Corresponds to the JSON property `metadata` + # @return [Hash] + attr_accessor :metadata + + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/`unique_id``. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The normal response of the operation in case of success. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # Corresponds to the JSON property `response` + # @return [Hash] + attr_accessor :response + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @done = args[:done] if args.key?(:done) + @error = args[:error] if args.key?(:error) + @metadata = args[:metadata] if args.key?(:metadata) + @name = args[:name] if args.key?(:name) + @response = args[:response] if args.key?(:response) + end + end + + # Defines an access control policy to the resources. + class SasPortalPolicy + include Google::Apis::Core::Hashable + + # + # Corresponds to the JSON property `assignments` + # @return [Array] + attr_accessor :assignments + + # The [etag] is used for optimistic concurrency control as a way to + # help prevent simultaneous updates of a policy from overwriting + # each other. It is strongly suggested that systems make use of + # the [etag] in the read-modify-write cycle to perform policy + # updates in order to avoid race conditions: An [etag] is returned + # in the response to [GetPolicy], and systems are expected to put + # that etag in the request to [SetPolicy] to ensure that their + # change will be applied to the same version of the policy. + # If no [etag] is provided in the call to [SetPolicy], then the + # existing policy is overwritten blindly. + # Corresponds to the JSON property `etag` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :etag + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @assignments = args[:assignments] if args.key?(:assignments) + @etag = args[:etag] if args.key?(:etag) + end + end + + # Request message for `SetPolicy` method. + class SasPortalSetPolicyRequest + include Google::Apis::Core::Hashable + + # Defines an access control policy to the resources. + # Corresponds to the JSON property `policy` + # @return [Google::Apis::SasportalV1alpha1::SasPortalPolicy] + attr_accessor :policy + + # Required. The resource for which the policy is being specified. This policy + # replaces any existing policy. + # Corresponds to the JSON property `resource` + # @return [String] + attr_accessor :resource + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @policy = args[:policy] if args.key?(:policy) + @resource = args[:resource] if args.key?(:resource) + end + end + + # Request for SignDevice method. + class SasPortalSignDeviceRequest + include Google::Apis::Core::Hashable + + # Required. The device to sign. + # The device fields name, fcc_id and serial_number must be set. + # Corresponds to the JSON property `device` + # @return [Google::Apis::SasportalV1alpha1::SasPortalDevice] + attr_accessor :device + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @device = args[:device] if args.key?(:device) + end + end + + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + class SasPortalStatus + include Google::Apis::Core::Hashable + + # The status code, which should be an enum value of google.rpc.Code. + # Corresponds to the JSON property `code` + # @return [Fixnum] + attr_accessor :code + + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + # Corresponds to the JSON property `details` + # @return [Array>] + attr_accessor :details + + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # google.rpc.Status.details field, or localized by the client. + # Corresponds to the JSON property `message` + # @return [String] + attr_accessor :message + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @code = args[:code] if args.key?(:code) + @details = args[:details] if args.key?(:details) + @message = args[:message] if args.key?(:message) + end + end + + # Request message for `TestPermissions` method. + class SasPortalTestPermissionsRequest + include Google::Apis::Core::Hashable + + # The set of permissions to check for the `resource`. + # Corresponds to the JSON property `permissions` + # @return [Array] + attr_accessor :permissions + + # Required. The resource for which the permissions are being requested. + # Corresponds to the JSON property `resource` + # @return [String] + attr_accessor :resource + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @permissions = args[:permissions] if args.key?(:permissions) + @resource = args[:resource] if args.key?(:resource) + end + end + + # Response message for `TestPermissions` method. + class SasPortalTestPermissionsResponse + include Google::Apis::Core::Hashable + + # A set of permissions that the caller is allowed. + # Corresponds to the JSON property `permissions` + # @return [Array] + attr_accessor :permissions + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @permissions = args[:permissions] if args.key?(:permissions) + end + end + + # Request for UpdateSignedDevice method. + class SasPortalUpdateSignedDeviceRequest + include Google::Apis::Core::Hashable + + # Required. The JSON Web Token signed using a CPI private key. Payload + # must be the JSON encoding + # of the device. + # Corresponds to the JSON property `encodedDevice` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :encoded_device + + # Required. Unique installer ID (CPI ID) from the Certified Professional + # Installers database. + # Corresponds to the JSON property `installerId` + # @return [String] + attr_accessor :installer_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @encoded_device = args[:encoded_device] if args.key?(:encoded_device) + @installer_id = args[:installer_id] if args.key?(:installer_id) + end + end + + # Request for ValidateInstaller method. + class SasPortalValidateInstallerRequest + include Google::Apis::Core::Hashable + + # Required. JSON Web Token signed using a CPI private key. Payload + # must include a "secret" claim whose value is the secret. + # Corresponds to the JSON property `encodedSecret` + # @return [String] + attr_accessor :encoded_secret + + # Required. Unique installer id (cpiId) from the Certified + # Professional Installers database. + # Corresponds to the JSON property `installerId` + # @return [String] + attr_accessor :installer_id + + # Required. Secret returned by the GenerateSecret method. + # Corresponds to the JSON property `secret` + # @return [String] + attr_accessor :secret + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @encoded_secret = args[:encoded_secret] if args.key?(:encoded_secret) + @installer_id = args[:installer_id] if args.key?(:installer_id) + @secret = args[:secret] if args.key?(:secret) + end + end + + # Response for ValidateInstaller method] + # [spectrum.sas.portal.v1alpha1.DeviceManager.ValidateInstaller]. + class SasPortalValidateInstallerResponse + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + end + end +end diff --git a/generated/google/apis/sasportal_v1alpha1/representations.rb b/generated/google/apis/sasportal_v1alpha1/representations.rb new file mode 100644 index 000000000..102500cd9 --- /dev/null +++ b/generated/google/apis/sasportal_v1alpha1/representations.rb @@ -0,0 +1,503 @@ +# 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 SasportalV1alpha1 + + class SasPortalAssignment + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalCreateSignedDeviceRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalCustomer + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalDevice + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalDeviceAirInterface + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalDeviceConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalDeviceGrant + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalDeviceModel + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalDpaMoveList + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalEmpty + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalFrequencyRange + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalGenerateSecretRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalGenerateSecretResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalGetPolicyRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalInstallationParams + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalListCustomersResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalListDevicesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalListNodesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalMoveDeviceRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalMoveNodeRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalNode + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalOperation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalPolicy + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalSetPolicyRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalSignDeviceRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalStatus + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalTestPermissionsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalTestPermissionsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalUpdateSignedDeviceRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalValidateInstallerRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalValidateInstallerResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SasPortalAssignment + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :members, as: 'members' + property :role, as: 'role' + end + end + + class SasPortalCreateSignedDeviceRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :encoded_device, :base64 => true, as: 'encodedDevice' + property :installer_id, as: 'installerId' + end + end + + class SasPortalCustomer + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :display_name, as: 'displayName' + property :name, as: 'name' + collection :sas_user_ids, as: 'sasUserIds' + end + end + + class SasPortalDevice + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :active_config, as: 'activeConfig', class: Google::Apis::SasportalV1alpha1::SasPortalDeviceConfig, decorator: Google::Apis::SasportalV1alpha1::SasPortalDeviceConfig::Representation + + property :display_name, as: 'displayName' + property :fcc_id, as: 'fccId' + collection :grants, as: 'grants', class: Google::Apis::SasportalV1alpha1::SasPortalDeviceGrant, decorator: Google::Apis::SasportalV1alpha1::SasPortalDeviceGrant::Representation + + property :name, as: 'name' + property :preloaded_config, as: 'preloadedConfig', class: Google::Apis::SasportalV1alpha1::SasPortalDeviceConfig, decorator: Google::Apis::SasportalV1alpha1::SasPortalDeviceConfig::Representation + + property :serial_number, as: 'serialNumber' + property :state, as: 'state' + end + end + + class SasPortalDeviceAirInterface + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :radio_technology, as: 'radioTechnology' + property :supported_spec, as: 'supportedSpec' + end + end + + class SasPortalDeviceConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :air_interface, as: 'airInterface', class: Google::Apis::SasportalV1alpha1::SasPortalDeviceAirInterface, decorator: Google::Apis::SasportalV1alpha1::SasPortalDeviceAirInterface::Representation + + property :call_sign, as: 'callSign' + property :category, as: 'category' + property :installation_params, as: 'installationParams', class: Google::Apis::SasportalV1alpha1::SasPortalInstallationParams, decorator: Google::Apis::SasportalV1alpha1::SasPortalInstallationParams::Representation + + property :is_signed, as: 'isSigned' + collection :measurement_capabilities, as: 'measurementCapabilities' + property :model, as: 'model', class: Google::Apis::SasportalV1alpha1::SasPortalDeviceModel, decorator: Google::Apis::SasportalV1alpha1::SasPortalDeviceModel::Representation + + property :state, as: 'state' + property :update_time, as: 'updateTime' + property :user_id, as: 'userId' + end + end + + class SasPortalDeviceGrant + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :channel_type, as: 'channelType' + property :expire_time, as: 'expireTime' + property :frequency_range, as: 'frequencyRange', class: Google::Apis::SasportalV1alpha1::SasPortalFrequencyRange, decorator: Google::Apis::SasportalV1alpha1::SasPortalFrequencyRange::Representation + + property :max_eirp, as: 'maxEirp' + collection :move_list, as: 'moveList', class: Google::Apis::SasportalV1alpha1::SasPortalDpaMoveList, decorator: Google::Apis::SasportalV1alpha1::SasPortalDpaMoveList::Representation + + property :state, as: 'state' + end + end + + class SasPortalDeviceModel + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :firmware_version, as: 'firmwareVersion' + property :hardware_version, as: 'hardwareVersion' + property :name, as: 'name' + property :software_version, as: 'softwareVersion' + property :vendor, as: 'vendor' + end + end + + class SasPortalDpaMoveList + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :dpa_id, as: 'dpaId' + property :frequency_range, as: 'frequencyRange', class: Google::Apis::SasportalV1alpha1::SasPortalFrequencyRange, decorator: Google::Apis::SasportalV1alpha1::SasPortalFrequencyRange::Representation + + end + end + + class SasPortalEmpty + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class SasPortalFrequencyRange + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :high_frequency_mhz, as: 'highFrequencyMhz' + property :low_frequency_mhz, as: 'lowFrequencyMhz' + end + end + + class SasPortalGenerateSecretRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class SasPortalGenerateSecretResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :secret, as: 'secret' + end + end + + class SasPortalGetPolicyRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :resource, as: 'resource' + end + end + + class SasPortalInstallationParams + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :antenna_azimuth, as: 'antennaAzimuth' + property :antenna_beamwidth, as: 'antennaBeamwidth' + property :antenna_downtilt, as: 'antennaDowntilt' + property :antenna_gain, as: 'antennaGain' + property :antenna_model, as: 'antennaModel' + property :eirp_capability, as: 'eirpCapability' + property :height, as: 'height' + property :height_type, as: 'heightType' + property :horizontal_accuracy, as: 'horizontalAccuracy' + property :indoor_deployment, as: 'indoorDeployment' + property :latitude, as: 'latitude' + property :longitude, as: 'longitude' + property :vertical_accuracy, as: 'verticalAccuracy' + end + end + + class SasPortalListCustomersResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :customers, as: 'customers', class: Google::Apis::SasportalV1alpha1::SasPortalCustomer, decorator: Google::Apis::SasportalV1alpha1::SasPortalCustomer::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class SasPortalListDevicesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :devices, as: 'devices', class: Google::Apis::SasportalV1alpha1::SasPortalDevice, decorator: Google::Apis::SasportalV1alpha1::SasPortalDevice::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class SasPortalListNodesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :nodes, as: 'nodes', class: Google::Apis::SasportalV1alpha1::SasPortalNode, decorator: Google::Apis::SasportalV1alpha1::SasPortalNode::Representation + + end + end + + class SasPortalMoveDeviceRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :destination, as: 'destination' + end + end + + class SasPortalMoveNodeRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :destination, as: 'destination' + end + end + + class SasPortalNode + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :display_name, as: 'displayName' + property :name, as: 'name' + collection :sas_user_ids, as: 'sasUserIds' + end + end + + class SasPortalOperation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :done, as: 'done' + property :error, as: 'error', class: Google::Apis::SasportalV1alpha1::SasPortalStatus, decorator: Google::Apis::SasportalV1alpha1::SasPortalStatus::Representation + + hash :metadata, as: 'metadata' + property :name, as: 'name' + hash :response, as: 'response' + end + end + + class SasPortalPolicy + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :assignments, as: 'assignments', class: Google::Apis::SasportalV1alpha1::SasPortalAssignment, decorator: Google::Apis::SasportalV1alpha1::SasPortalAssignment::Representation + + property :etag, :base64 => true, as: 'etag' + end + end + + class SasPortalSetPolicyRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :policy, as: 'policy', class: Google::Apis::SasportalV1alpha1::SasPortalPolicy, decorator: Google::Apis::SasportalV1alpha1::SasPortalPolicy::Representation + + property :resource, as: 'resource' + end + end + + class SasPortalSignDeviceRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :device, as: 'device', class: Google::Apis::SasportalV1alpha1::SasPortalDevice, decorator: Google::Apis::SasportalV1alpha1::SasPortalDevice::Representation + + end + end + + class SasPortalStatus + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :code, as: 'code' + collection :details, as: 'details' + property :message, as: 'message' + end + end + + class SasPortalTestPermissionsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :permissions, as: 'permissions' + property :resource, as: 'resource' + end + end + + class SasPortalTestPermissionsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :permissions, as: 'permissions' + end + end + + class SasPortalUpdateSignedDeviceRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :encoded_device, :base64 => true, as: 'encodedDevice' + property :installer_id, as: 'installerId' + end + end + + class SasPortalValidateInstallerRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :encoded_secret, as: 'encodedSecret' + property :installer_id, as: 'installerId' + property :secret, as: 'secret' + end + end + + class SasPortalValidateInstallerResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + end + end +end diff --git a/generated/google/apis/sasportal_v1alpha1/service.rb b/generated/google/apis/sasportal_v1alpha1/service.rb new file mode 100644 index 000000000..df2a1c271 --- /dev/null +++ b/generated/google/apis/sasportal_v1alpha1/service.rb @@ -0,0 +1,1322 @@ +# 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 SasportalV1alpha1 + # SAS Portal API + # + # + # + # @example + # require 'google/apis/sasportal_v1alpha1' + # + # Sasportal = Google::Apis::SasportalV1alpha1 # Alias the module + # service = Sasportal::SasportalService.new + # + # @see https://developers.google.com/spectrum-access-system/ + class SasportalService < 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://sasportal.googleapis.com/', '') + @batch_path = 'batch' + end + + # Returns a requested customer. + # @param [String] name + # Required. The name of the customer. + # @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::SasportalV1alpha1::SasPortalCustomer] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SasportalV1alpha1::SasPortalCustomer] + # + # @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_customer(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1alpha1/{+name}', options) + command.response_representation = Google::Apis::SasportalV1alpha1::SasPortalCustomer::Representation + command.response_class = Google::Apis::SasportalV1alpha1::SasPortalCustomer + 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 a list of requested customers. + # @param [Fixnum] page_size + # The maximum number of customers + # to return in the response. + # @param [String] page_token + # A pagination token returned from a previous call to ListCustomers method that + # indicates where + # this listing should continue from. + # @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::SasportalV1alpha1::SasPortalListCustomersResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SasportalV1alpha1::SasPortalListCustomersResponse] + # + # @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_customers(page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1alpha1/customers', options) + command.response_representation = Google::Apis::SasportalV1alpha1::SasPortalListCustomersResponse::Representation + command.response_class = Google::Apis::SasportalV1alpha1::SasPortalListCustomersResponse + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates an existing customer. + # @param [String] name + # Output only. Resource name of the customer. + # @param [Google::Apis::SasportalV1alpha1::SasPortalCustomer] sas_portal_customer_object + # @param [String] update_mask + # Fields to be updated. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SasportalV1alpha1::SasPortalCustomer] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SasportalV1alpha1::SasPortalCustomer] + # + # @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_customer(name, sas_portal_customer_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::SasportalV1alpha1::SasPortalCustomer::Representation + command.request_object = sas_portal_customer_object + command.response_representation = Google::Apis::SasportalV1alpha1::SasPortalCustomer::Representation + command.response_class = Google::Apis::SasportalV1alpha1::SasPortalCustomer + 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 + + # Creates a device under a node or customer. + # @param [String] parent + # Required. The name of the parent resource. + # @param [Google::Apis::SasportalV1alpha1::SasPortalDevice] sas_portal_device_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::SasportalV1alpha1::SasPortalDevice] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SasportalV1alpha1::SasPortalDevice] + # + # @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_customer_device(parent, sas_portal_device_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1alpha1/{+parent}/devices', options) + command.request_representation = Google::Apis::SasportalV1alpha1::SasPortalDevice::Representation + command.request_object = sas_portal_device_object + command.response_representation = Google::Apis::SasportalV1alpha1::SasPortalDevice::Representation + command.response_class = Google::Apis::SasportalV1alpha1::SasPortalDevice + 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 + + # Creates a signed device under a + # node or customer. + # @param [String] parent + # Required. The name of the parent resource. + # @param [Google::Apis::SasportalV1alpha1::SasPortalCreateSignedDeviceRequest] sas_portal_create_signed_device_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SasportalV1alpha1::SasPortalDevice] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SasportalV1alpha1::SasPortalDevice] + # + # @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_customer_device_signed(parent, sas_portal_create_signed_device_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1alpha1/{+parent}/devices:createSigned', options) + command.request_representation = Google::Apis::SasportalV1alpha1::SasPortalCreateSignedDeviceRequest::Representation + command.request_object = sas_portal_create_signed_device_request_object + command.response_representation = Google::Apis::SasportalV1alpha1::SasPortalDevice::Representation + command.response_class = Google::Apis::SasportalV1alpha1::SasPortalDevice + 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 device. + # @param [String] name + # Required. The name of the device. + # @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::SasportalV1alpha1::SasPortalEmpty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SasportalV1alpha1::SasPortalEmpty] + # + # @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_customer_device(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1alpha1/{+name}', options) + command.response_representation = Google::Apis::SasportalV1alpha1::SasPortalEmpty::Representation + command.response_class = Google::Apis::SasportalV1alpha1::SasPortalEmpty + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets details about a device. + # @param [String] name + # Required. The name of the device. + # @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::SasportalV1alpha1::SasPortalDevice] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SasportalV1alpha1::SasPortalDevice] + # + # @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_customer_device(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1alpha1/{+name}', options) + command.response_representation = Google::Apis::SasportalV1alpha1::SasPortalDevice::Representation + command.response_class = Google::Apis::SasportalV1alpha1::SasPortalDevice + 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 devices under a node or customer. + # @param [String] parent + # Required. The name of the parent resource. + # @param [String] filter + # The filter expression. The filter should have one of the following + # formats: "sn=123454" or "display_name=MyDevice". sn + # corresponds to serial_number of the device. The filter is case insensitive. + # @param [Fixnum] page_size + # The maximum number of devices to return in the response. + # @param [String] page_token + # A pagination token returned from a previous call to ListDevices + # that indicates where this listing should continue from. + # @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::SasportalV1alpha1::SasPortalListDevicesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SasportalV1alpha1::SasPortalListDevicesResponse] + # + # @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_customer_devices(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1alpha1/{+parent}/devices', options) + command.response_representation = Google::Apis::SasportalV1alpha1::SasPortalListDevicesResponse::Representation + command.response_class = Google::Apis::SasportalV1alpha1::SasPortalListDevicesResponse + command.params['parent'] = parent unless parent.nil? + command.query['filter'] = filter unless filter.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Moves a device under another node or customer. + # @param [String] name + # Required. The name of the device to move. + # @param [Google::Apis::SasportalV1alpha1::SasPortalMoveDeviceRequest] sas_portal_move_device_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SasportalV1alpha1::SasPortalOperation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SasportalV1alpha1::SasPortalOperation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def move_customer_device(name, sas_portal_move_device_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1alpha1/{+name}:move', options) + command.request_representation = Google::Apis::SasportalV1alpha1::SasPortalMoveDeviceRequest::Representation + command.request_object = sas_portal_move_device_request_object + command.response_representation = Google::Apis::SasportalV1alpha1::SasPortalOperation::Representation + command.response_class = Google::Apis::SasportalV1alpha1::SasPortalOperation + 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 + + # Updates a device. + # @param [String] name + # Output only. The resource path name. + # @param [Google::Apis::SasportalV1alpha1::SasPortalDevice] sas_portal_device_object + # @param [String] update_mask + # Fields to be updated. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SasportalV1alpha1::SasPortalDevice] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SasportalV1alpha1::SasPortalDevice] + # + # @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_customer_device(name, sas_portal_device_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::SasportalV1alpha1::SasPortalDevice::Representation + command.request_object = sas_portal_device_object + command.response_representation = Google::Apis::SasportalV1alpha1::SasPortalDevice::Representation + command.response_class = Google::Apis::SasportalV1alpha1::SasPortalDevice + 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 + + # Signs a device. + # @param [String] name + # Output only. The resource path name. + # @param [Google::Apis::SasportalV1alpha1::SasPortalSignDeviceRequest] sas_portal_sign_device_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SasportalV1alpha1::SasPortalEmpty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SasportalV1alpha1::SasPortalEmpty] + # + # @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 sign_customer_device_device(name, sas_portal_sign_device_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1alpha1/{+name}:signDevice', options) + command.request_representation = Google::Apis::SasportalV1alpha1::SasPortalSignDeviceRequest::Representation + command.request_object = sas_portal_sign_device_request_object + command.response_representation = Google::Apis::SasportalV1alpha1::SasPortalEmpty::Representation + command.response_class = Google::Apis::SasportalV1alpha1::SasPortalEmpty + 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 + + # Updates a signed device. + # @param [String] name + # Required. The name of the device to update. + # @param [Google::Apis::SasportalV1alpha1::SasPortalUpdateSignedDeviceRequest] sas_portal_update_signed_device_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SasportalV1alpha1::SasPortalDevice] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SasportalV1alpha1::SasPortalDevice] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_customer_device_signed(name, sas_portal_update_signed_device_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1alpha1/{+name}:updateSigned', options) + command.request_representation = Google::Apis::SasportalV1alpha1::SasPortalUpdateSignedDeviceRequest::Representation + command.request_object = sas_portal_update_signed_device_request_object + command.response_representation = Google::Apis::SasportalV1alpha1::SasPortalDevice::Representation + command.response_class = Google::Apis::SasportalV1alpha1::SasPortalDevice + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a new node. + # @param [String] parent + # Required. The parent resource name where the node is to be created. + # @param [Google::Apis::SasportalV1alpha1::SasPortalNode] sas_portal_node_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::SasportalV1alpha1::SasPortalNode] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SasportalV1alpha1::SasPortalNode] + # + # @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_customer_node(parent, sas_portal_node_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1alpha1/{+parent}/nodes', options) + command.request_representation = Google::Apis::SasportalV1alpha1::SasPortalNode::Representation + command.request_object = sas_portal_node_object + command.response_representation = Google::Apis::SasportalV1alpha1::SasPortalNode::Representation + command.response_class = Google::Apis::SasportalV1alpha1::SasPortalNode + 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 node. + # @param [String] name + # Required. The name of the node. + # @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::SasportalV1alpha1::SasPortalEmpty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SasportalV1alpha1::SasPortalEmpty] + # + # @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_customer_node(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1alpha1/{+name}', options) + command.response_representation = Google::Apis::SasportalV1alpha1::SasPortalEmpty::Representation + command.response_class = Google::Apis::SasportalV1alpha1::SasPortalEmpty + 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 a requested node. + # @param [String] name + # Required. The name of the node. + # @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::SasportalV1alpha1::SasPortalNode] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SasportalV1alpha1::SasPortalNode] + # + # @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_customer_node(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1alpha1/{+name}', options) + command.response_representation = Google::Apis::SasportalV1alpha1::SasPortalNode::Representation + command.response_class = Google::Apis::SasportalV1alpha1::SasPortalNode + 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 nodes. + # @param [String] parent + # Required. The parent resource name, for example, "nodes/1". + # @param [Fixnum] page_size + # The maximum number of nodes to return in the response. + # @param [String] page_token + # A pagination token returned from a previous call to ListNodes method + # that indicates where this listing should continue from. + # @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::SasportalV1alpha1::SasPortalListNodesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SasportalV1alpha1::SasPortalListNodesResponse] + # + # @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_customer_nodes(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1alpha1/{+parent}/nodes', options) + command.response_representation = Google::Apis::SasportalV1alpha1::SasPortalListNodesResponse::Representation + command.response_class = Google::Apis::SasportalV1alpha1::SasPortalListNodesResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Moves a node under another node or customer. + # @param [String] name + # Required. The name of the node to + # move. + # @param [Google::Apis::SasportalV1alpha1::SasPortalMoveNodeRequest] sas_portal_move_node_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SasportalV1alpha1::SasPortalOperation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SasportalV1alpha1::SasPortalOperation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def move_customer_node(name, sas_portal_move_node_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1alpha1/{+name}:move', options) + command.request_representation = Google::Apis::SasportalV1alpha1::SasPortalMoveNodeRequest::Representation + command.request_object = sas_portal_move_node_request_object + command.response_representation = Google::Apis::SasportalV1alpha1::SasPortalOperation::Representation + command.response_class = Google::Apis::SasportalV1alpha1::SasPortalOperation + 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 + + # Updates an existing node. + # @param [String] name + # Output only. Resource name. + # @param [Google::Apis::SasportalV1alpha1::SasPortalNode] sas_portal_node_object + # @param [String] update_mask + # Fields to be updated. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SasportalV1alpha1::SasPortalNode] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SasportalV1alpha1::SasPortalNode] + # + # @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_customer_node(name, sas_portal_node_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::SasportalV1alpha1::SasPortalNode::Representation + command.request_object = sas_portal_node_object + command.response_representation = Google::Apis::SasportalV1alpha1::SasPortalNode::Representation + command.response_class = Google::Apis::SasportalV1alpha1::SasPortalNode + 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 + + # Generates a secret to be used with the ValidateInstaller method + # @param [Google::Apis::SasportalV1alpha1::SasPortalGenerateSecretRequest] sas_portal_generate_secret_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SasportalV1alpha1::SasPortalGenerateSecretResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SasportalV1alpha1::SasPortalGenerateSecretResponse] + # + # @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 generate_installer_secret(sas_portal_generate_secret_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1alpha1/installer:generateSecret', options) + command.request_representation = Google::Apis::SasportalV1alpha1::SasPortalGenerateSecretRequest::Representation + command.request_object = sas_portal_generate_secret_request_object + command.response_representation = Google::Apis::SasportalV1alpha1::SasPortalGenerateSecretResponse::Representation + command.response_class = Google::Apis::SasportalV1alpha1::SasPortalGenerateSecretResponse + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Validates the identity of a Certified Professional Installer (CPI). + # @param [Google::Apis::SasportalV1alpha1::SasPortalValidateInstallerRequest] sas_portal_validate_installer_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SasportalV1alpha1::SasPortalValidateInstallerResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SasportalV1alpha1::SasPortalValidateInstallerResponse] + # + # @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 validate_installer(sas_portal_validate_installer_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1alpha1/installer:validate', options) + command.request_representation = Google::Apis::SasportalV1alpha1::SasPortalValidateInstallerRequest::Representation + command.request_object = sas_portal_validate_installer_request_object + command.response_representation = Google::Apis::SasportalV1alpha1::SasPortalValidateInstallerResponse::Representation + command.response_class = Google::Apis::SasportalV1alpha1::SasPortalValidateInstallerResponse + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a device under a node or customer. + # @param [String] parent + # Required. The name of the parent resource. + # @param [Google::Apis::SasportalV1alpha1::SasPortalDevice] sas_portal_device_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::SasportalV1alpha1::SasPortalDevice] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SasportalV1alpha1::SasPortalDevice] + # + # @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_node_device(parent, sas_portal_device_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1alpha1/{+parent}/devices', options) + command.request_representation = Google::Apis::SasportalV1alpha1::SasPortalDevice::Representation + command.request_object = sas_portal_device_object + command.response_representation = Google::Apis::SasportalV1alpha1::SasPortalDevice::Representation + command.response_class = Google::Apis::SasportalV1alpha1::SasPortalDevice + 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 + + # Creates a signed device under a + # node or customer. + # @param [String] parent + # Required. The name of the parent resource. + # @param [Google::Apis::SasportalV1alpha1::SasPortalCreateSignedDeviceRequest] sas_portal_create_signed_device_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SasportalV1alpha1::SasPortalDevice] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SasportalV1alpha1::SasPortalDevice] + # + # @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_node_device_signed(parent, sas_portal_create_signed_device_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1alpha1/{+parent}/devices:createSigned', options) + command.request_representation = Google::Apis::SasportalV1alpha1::SasPortalCreateSignedDeviceRequest::Representation + command.request_object = sas_portal_create_signed_device_request_object + command.response_representation = Google::Apis::SasportalV1alpha1::SasPortalDevice::Representation + command.response_class = Google::Apis::SasportalV1alpha1::SasPortalDevice + 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 device. + # @param [String] name + # Required. The name of the device. + # @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::SasportalV1alpha1::SasPortalEmpty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SasportalV1alpha1::SasPortalEmpty] + # + # @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_node_device(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1alpha1/{+name}', options) + command.response_representation = Google::Apis::SasportalV1alpha1::SasPortalEmpty::Representation + command.response_class = Google::Apis::SasportalV1alpha1::SasPortalEmpty + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets details about a device. + # @param [String] name + # Required. The name of the device. + # @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::SasportalV1alpha1::SasPortalDevice] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SasportalV1alpha1::SasPortalDevice] + # + # @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_node_device(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1alpha1/{+name}', options) + command.response_representation = Google::Apis::SasportalV1alpha1::SasPortalDevice::Representation + command.response_class = Google::Apis::SasportalV1alpha1::SasPortalDevice + 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 devices under a node or customer. + # @param [String] parent + # Required. The name of the parent resource. + # @param [String] filter + # The filter expression. The filter should have one of the following + # formats: "sn=123454" or "display_name=MyDevice". sn + # corresponds to serial_number of the device. The filter is case insensitive. + # @param [Fixnum] page_size + # The maximum number of devices to return in the response. + # @param [String] page_token + # A pagination token returned from a previous call to ListDevices + # that indicates where this listing should continue from. + # @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::SasportalV1alpha1::SasPortalListDevicesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SasportalV1alpha1::SasPortalListDevicesResponse] + # + # @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_node_devices(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1alpha1/{+parent}/devices', options) + command.response_representation = Google::Apis::SasportalV1alpha1::SasPortalListDevicesResponse::Representation + command.response_class = Google::Apis::SasportalV1alpha1::SasPortalListDevicesResponse + command.params['parent'] = parent unless parent.nil? + command.query['filter'] = filter unless filter.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Moves a device under another node or customer. + # @param [String] name + # Required. The name of the device to move. + # @param [Google::Apis::SasportalV1alpha1::SasPortalMoveDeviceRequest] sas_portal_move_device_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SasportalV1alpha1::SasPortalOperation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SasportalV1alpha1::SasPortalOperation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def move_node_device(name, sas_portal_move_device_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1alpha1/{+name}:move', options) + command.request_representation = Google::Apis::SasportalV1alpha1::SasPortalMoveDeviceRequest::Representation + command.request_object = sas_portal_move_device_request_object + command.response_representation = Google::Apis::SasportalV1alpha1::SasPortalOperation::Representation + command.response_class = Google::Apis::SasportalV1alpha1::SasPortalOperation + 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 + + # Updates a device. + # @param [String] name + # Output only. The resource path name. + # @param [Google::Apis::SasportalV1alpha1::SasPortalDevice] sas_portal_device_object + # @param [String] update_mask + # Fields to be updated. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SasportalV1alpha1::SasPortalDevice] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SasportalV1alpha1::SasPortalDevice] + # + # @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_node_device(name, sas_portal_device_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::SasportalV1alpha1::SasPortalDevice::Representation + command.request_object = sas_portal_device_object + command.response_representation = Google::Apis::SasportalV1alpha1::SasPortalDevice::Representation + command.response_class = Google::Apis::SasportalV1alpha1::SasPortalDevice + 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 + + # Signs a device. + # @param [String] name + # Output only. The resource path name. + # @param [Google::Apis::SasportalV1alpha1::SasPortalSignDeviceRequest] sas_portal_sign_device_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SasportalV1alpha1::SasPortalEmpty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SasportalV1alpha1::SasPortalEmpty] + # + # @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 sign_node_device_device(name, sas_portal_sign_device_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1alpha1/{+name}:signDevice', options) + command.request_representation = Google::Apis::SasportalV1alpha1::SasPortalSignDeviceRequest::Representation + command.request_object = sas_portal_sign_device_request_object + command.response_representation = Google::Apis::SasportalV1alpha1::SasPortalEmpty::Representation + command.response_class = Google::Apis::SasportalV1alpha1::SasPortalEmpty + 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 + + # Updates a signed device. + # @param [String] name + # Required. The name of the device to update. + # @param [Google::Apis::SasportalV1alpha1::SasPortalUpdateSignedDeviceRequest] sas_portal_update_signed_device_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SasportalV1alpha1::SasPortalDevice] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SasportalV1alpha1::SasPortalDevice] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_node_device_signed(name, sas_portal_update_signed_device_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1alpha1/{+name}:updateSigned', options) + command.request_representation = Google::Apis::SasportalV1alpha1::SasPortalUpdateSignedDeviceRequest::Representation + command.request_object = sas_portal_update_signed_device_request_object + command.response_representation = Google::Apis::SasportalV1alpha1::SasPortalDevice::Representation + command.response_class = Google::Apis::SasportalV1alpha1::SasPortalDevice + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a new node. + # @param [String] parent + # Required. The parent resource name where the node is to be created. + # @param [Google::Apis::SasportalV1alpha1::SasPortalNode] sas_portal_node_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::SasportalV1alpha1::SasPortalNode] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SasportalV1alpha1::SasPortalNode] + # + # @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_node_node(parent, sas_portal_node_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1alpha1/{+parent}/nodes', options) + command.request_representation = Google::Apis::SasportalV1alpha1::SasPortalNode::Representation + command.request_object = sas_portal_node_object + command.response_representation = Google::Apis::SasportalV1alpha1::SasPortalNode::Representation + command.response_class = Google::Apis::SasportalV1alpha1::SasPortalNode + 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 node. + # @param [String] name + # Required. The name of the node. + # @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::SasportalV1alpha1::SasPortalEmpty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SasportalV1alpha1::SasPortalEmpty] + # + # @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_node_node(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1alpha1/{+name}', options) + command.response_representation = Google::Apis::SasportalV1alpha1::SasPortalEmpty::Representation + command.response_class = Google::Apis::SasportalV1alpha1::SasPortalEmpty + 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 a requested node. + # @param [String] name + # Required. The name of the node. + # @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::SasportalV1alpha1::SasPortalNode] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SasportalV1alpha1::SasPortalNode] + # + # @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_node_node(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1alpha1/{+name}', options) + command.response_representation = Google::Apis::SasportalV1alpha1::SasPortalNode::Representation + command.response_class = Google::Apis::SasportalV1alpha1::SasPortalNode + 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 nodes. + # @param [String] parent + # Required. The parent resource name, for example, "nodes/1". + # @param [Fixnum] page_size + # The maximum number of nodes to return in the response. + # @param [String] page_token + # A pagination token returned from a previous call to ListNodes method + # that indicates where this listing should continue from. + # @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::SasportalV1alpha1::SasPortalListNodesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SasportalV1alpha1::SasPortalListNodesResponse] + # + # @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_node_nodes(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1alpha1/{+parent}/nodes', options) + command.response_representation = Google::Apis::SasportalV1alpha1::SasPortalListNodesResponse::Representation + command.response_class = Google::Apis::SasportalV1alpha1::SasPortalListNodesResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Moves a node under another node or customer. + # @param [String] name + # Required. The name of the node to + # move. + # @param [Google::Apis::SasportalV1alpha1::SasPortalMoveNodeRequest] sas_portal_move_node_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SasportalV1alpha1::SasPortalOperation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SasportalV1alpha1::SasPortalOperation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def move_node_node(name, sas_portal_move_node_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1alpha1/{+name}:move', options) + command.request_representation = Google::Apis::SasportalV1alpha1::SasPortalMoveNodeRequest::Representation + command.request_object = sas_portal_move_node_request_object + command.response_representation = Google::Apis::SasportalV1alpha1::SasPortalOperation::Representation + command.response_class = Google::Apis::SasportalV1alpha1::SasPortalOperation + 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 + + # Updates an existing node. + # @param [String] name + # Output only. Resource name. + # @param [Google::Apis::SasportalV1alpha1::SasPortalNode] sas_portal_node_object + # @param [String] update_mask + # Fields to be updated. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SasportalV1alpha1::SasPortalNode] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SasportalV1alpha1::SasPortalNode] + # + # @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_node_node(name, sas_portal_node_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::SasportalV1alpha1::SasPortalNode::Representation + command.request_object = sas_portal_node_object + command.response_representation = Google::Apis::SasportalV1alpha1::SasPortalNode::Representation + command.response_class = Google::Apis::SasportalV1alpha1::SasPortalNode + 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 + + # Gets the access control policy for a resource. + # Returns an empty policy if the resource exists and does not have a policy + # set. + # @param [Google::Apis::SasportalV1alpha1::SasPortalGetPolicyRequest] sas_portal_get_policy_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SasportalV1alpha1::SasPortalPolicy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SasportalV1alpha1::SasPortalPolicy] + # + # @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_policy(sas_portal_get_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1alpha1/policies:get', options) + command.request_representation = Google::Apis::SasportalV1alpha1::SasPortalGetPolicyRequest::Representation + command.request_object = sas_portal_get_policy_request_object + command.response_representation = Google::Apis::SasportalV1alpha1::SasPortalPolicy::Representation + command.response_class = Google::Apis::SasportalV1alpha1::SasPortalPolicy + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Sets the access control policy on the specified resource. Replaces any + # existing policy. + # @param [Google::Apis::SasportalV1alpha1::SasPortalSetPolicyRequest] sas_portal_set_policy_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SasportalV1alpha1::SasPortalPolicy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SasportalV1alpha1::SasPortalPolicy] + # + # @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 set_policy(sas_portal_set_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1alpha1/policies:set', options) + command.request_representation = Google::Apis::SasportalV1alpha1::SasPortalSetPolicyRequest::Representation + command.request_object = sas_portal_set_policy_request_object + command.response_representation = Google::Apis::SasportalV1alpha1::SasPortalPolicy::Representation + command.response_class = Google::Apis::SasportalV1alpha1::SasPortalPolicy + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Returns permissions that a caller has on the specified resource. + # @param [Google::Apis::SasportalV1alpha1::SasPortalTestPermissionsRequest] sas_portal_test_permissions_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SasportalV1alpha1::SasPortalTestPermissionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SasportalV1alpha1::SasPortalTestPermissionsResponse] + # + # @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 test_policy(sas_portal_test_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1alpha1/policies:test', options) + command.request_representation = Google::Apis::SasportalV1alpha1::SasPortalTestPermissionsRequest::Representation + command.request_object = sas_portal_test_permissions_request_object + command.response_representation = Google::Apis::SasportalV1alpha1::SasPortalTestPermissionsResponse::Representation + command.response_class = Google::Apis::SasportalV1alpha1::SasPortalTestPermissionsResponse + 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/surveys_v2/classes.rb b/generated/google/apis/surveys_v2/classes.rb deleted file mode 100644 index 03286764a..000000000 --- a/generated/google/apis/surveys_v2/classes.rb +++ /dev/null @@ -1,691 +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 SurveysV2 - - # - class FieldMask - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `fields` - # @return [Array] - attr_accessor :fields - - # - # Corresponds to the JSON property `id` - # @return [Fixnum] - attr_accessor :id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @fields = args[:fields] if args.key?(:fields) - @id = args[:id] if args.key?(:id) - end - end - - # - class PageInfo - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `resultPerPage` - # @return [Fixnum] - attr_accessor :result_per_page - - # - # Corresponds to the JSON property `startIndex` - # @return [Fixnum] - attr_accessor :start_index - - # - # Corresponds to the JSON property `totalResults` - # @return [Fixnum] - attr_accessor :total_results - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @result_per_page = args[:result_per_page] if args.key?(:result_per_page) - @start_index = args[:start_index] if args.key?(:start_index) - @total_results = args[:total_results] if args.key?(:total_results) - end - end - - # - class ResultsGetRequest - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `resultMask` - # @return [Google::Apis::SurveysV2::ResultsMask] - attr_accessor :result_mask - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @result_mask = args[:result_mask] if args.key?(:result_mask) - end - end - - # - class ResultsMask - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `fields` - # @return [Array] - attr_accessor :fields - - # - # Corresponds to the JSON property `projection` - # @return [String] - attr_accessor :projection - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @fields = args[:fields] if args.key?(:fields) - @projection = args[:projection] if args.key?(:projection) - end - end - - # Representation of an individual survey object. - class Survey - include Google::Apis::Core::Hashable - - # Specifications for the target audience of a survey run through the API. - # Corresponds to the JSON property `audience` - # @return [Google::Apis::SurveysV2::SurveyAudience] - attr_accessor :audience - - # Message defining the cost to run a given survey through API. - # Corresponds to the JSON property `cost` - # @return [Google::Apis::SurveysV2::SurveyCost] - attr_accessor :cost - - # Additional information to store on behalf of the API consumer and associate - # with this question. This binary blob is treated as opaque. This field is - # limited to 64K bytes. - # Corresponds to the JSON property `customerData` - # NOTE: Values are automatically base64 encoded/decoded in the client library. - # @return [String] - attr_accessor :customer_data - - # Text description of the survey. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # List of email addresses for survey owners. Must contain at least the address - # of the user making the API call. - # Corresponds to the JSON property `owners` - # @return [Array] - attr_accessor :owners - - # List of questions defining the survey. - # Corresponds to the JSON property `questions` - # @return [Array] - attr_accessor :questions - - # Message representing why the survey was rejected from review, if it was. - # Corresponds to the JSON property `rejectionReason` - # @return [Google::Apis::SurveysV2::SurveyRejection] - attr_accessor :rejection_reason - - # State that the survey is in. - # Corresponds to the JSON property `state` - # @return [String] - attr_accessor :state - - # Unique survey ID, that is viewable in the URL of the Survey Creator UI - # Corresponds to the JSON property `surveyUrlId` - # @return [String] - attr_accessor :survey_url_id - - # Optional name that will be given to the survey. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # Number of responses desired for the survey. - # Corresponds to the JSON property `wantedResponseCount` - # @return [Fixnum] - attr_accessor :wanted_response_count - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @audience = args[:audience] if args.key?(:audience) - @cost = args[:cost] if args.key?(:cost) - @customer_data = args[:customer_data] if args.key?(:customer_data) - @description = args[:description] if args.key?(:description) - @owners = args[:owners] if args.key?(:owners) - @questions = args[:questions] if args.key?(:questions) - @rejection_reason = args[:rejection_reason] if args.key?(:rejection_reason) - @state = args[:state] if args.key?(:state) - @survey_url_id = args[:survey_url_id] if args.key?(:survey_url_id) - @title = args[:title] if args.key?(:title) - @wanted_response_count = args[:wanted_response_count] if args.key?(:wanted_response_count) - end - end - - # Specifications for the target audience of a survey run through the API. - class SurveyAudience - include Google::Apis::Core::Hashable - - # Optional list of age buckets to target. Supported age buckets are: ['18-24', ' - # 25-34', '35-44', '45-54', '55-64', '65+'] - # Corresponds to the JSON property `ages` - # @return [Array] - attr_accessor :ages - - # Required country code that surveys should be targeted to. Accepts standard ISO - # 3166-1 2 character language codes. For instance, 'US' for the United States, - # and 'GB' for the United Kingdom. - # Corresponds to the JSON property `country` - # @return [String] - attr_accessor :country - - # Country subdivision (states/provinces/etc) that surveys should be targeted to. - # For all countries except GB, ISO-3166-2 subdivision code is required (eg. 'US- - # OH' for Ohio, United States). For GB, NUTS 1 statistical region codes for the - # United Kingdom is required (eg. 'UK-UKC' for North East England). - # Corresponds to the JSON property `countrySubdivision` - # @return [String] - attr_accessor :country_subdivision - - # Optional gender to target. - # Corresponds to the JSON property `gender` - # @return [String] - attr_accessor :gender - - # Language code that surveys should be targeted to. For instance, 'en-US'. - # Surveys may target bilingual users by specifying a list of language codes (for - # example, 'de' and 'en-US'). In that case, all languages will be used for - # targeting users but the survey content (which is displayed) must match the - # first language listed. Accepts standard BCP47 language codes. See - # specification. - # Corresponds to the JSON property `languages` - # @return [Array] - attr_accessor :languages - - # Online population source where the respondents are sampled from. - # Corresponds to the JSON property `populationSource` - # @return [String] - attr_accessor :population_source - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @ages = args[:ages] if args.key?(:ages) - @country = args[:country] if args.key?(:country) - @country_subdivision = args[:country_subdivision] if args.key?(:country_subdivision) - @gender = args[:gender] if args.key?(:gender) - @languages = args[:languages] if args.key?(:languages) - @population_source = args[:population_source] if args.key?(:population_source) - end - end - - # Message defining the cost to run a given survey through API. - class SurveyCost - include Google::Apis::Core::Hashable - - # Cost per survey response in nano units of the given currency. To get the total - # cost for a survey, multiply this value by wanted_response_count. - # Corresponds to the JSON property `costPerResponseNanos` - # @return [Fixnum] - attr_accessor :cost_per_response_nanos - - # Currency code that the cost is given in. - # Corresponds to the JSON property `currencyCode` - # @return [String] - attr_accessor :currency_code - - # *Deprecated* Threshold to start a survey automatically if the quoted price is - # at most this value. When a survey has a Screener (threshold) question, it must - # go through an incidence pricing test to determine the final cost per response. - # Typically you will have to make a followup call to start the survey giving the - # final computed cost per response. If the survey has no threshold_answers, - # setting this property will return an error. By specifying this property, you - # indicate the max price per response you are willing to pay in advance of the - # incidence test. If the price turns out to be lower than the specified value, - # the survey will begin immediately and you will be charged at the rate - # determined by the incidence pricing test. If the price turns out to be greater - # than the specified value the survey will not be started and you will instead - # be notified what price was determined by the incidence test. At that point, - # you must raise the value of this property to be greater than or equal to that - # cost before attempting to start the survey again. This will immediately start - # the survey as long the incidence test was run within the last 21 days. This - # will no longer be available after June 2018. - # Corresponds to the JSON property `maxCostPerResponseNanos` - # @return [Fixnum] - attr_accessor :max_cost_per_response_nanos - - # Cost of survey in nano units of the given currency. DEPRECATED in favor of - # cost_per_response_nanos - # Corresponds to the JSON property `nanos` - # @return [Fixnum] - attr_accessor :nanos - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @cost_per_response_nanos = args[:cost_per_response_nanos] if args.key?(:cost_per_response_nanos) - @currency_code = args[:currency_code] if args.key?(:currency_code) - @max_cost_per_response_nanos = args[:max_cost_per_response_nanos] if args.key?(:max_cost_per_response_nanos) - @nanos = args[:nanos] if args.key?(:nanos) - end - end - - # Message defining the question specifications. - class SurveyQuestion - include Google::Apis::Core::Hashable - - # The randomization option for multiple choice and multi-select questions. If - # not specified, this option defaults to randomize. - # Corresponds to the JSON property `answerOrder` - # @return [String] - attr_accessor :answer_order - - # Required list of answer options for a question. - # Corresponds to the JSON property `answers` - # @return [Array] - attr_accessor :answers - - # Option to allow open-ended text box for Single Answer and Multiple Answer - # question types. This can be used with SINGLE_ANSWER, SINGLE_ANSWER_WITH_IMAGE, - # MULTIPLE_ANSWERS, and MULTIPLE_ANSWERS_WITH_IMAGE question types. - # Corresponds to the JSON property `hasOther` - # @return [Boolean] - attr_accessor :has_other - alias_method :has_other?, :has_other - - # For rating questions, the text for the higher end of the scale, such as 'Best'. - # For numeric questions, a string representing a floating-point that is the - # maximum allowed number for a response. - # Corresponds to the JSON property `highValueLabel` - # @return [String] - attr_accessor :high_value_label - - # - # Corresponds to the JSON property `images` - # @return [Array] - attr_accessor :images - - # Currently only support pinning an answer option to the last position. - # Corresponds to the JSON property `lastAnswerPositionPinned` - # @return [Boolean] - attr_accessor :last_answer_position_pinned - alias_method :last_answer_position_pinned?, :last_answer_position_pinned - - # For rating questions, the text for the lower end of the scale, such as 'Worst'. - # For numeric questions, a string representing a floating-point that is the - # minimum allowed number for a response. - # Corresponds to the JSON property `lowValueLabel` - # @return [String] - attr_accessor :low_value_label - - # Option to force the user to pick one of the open text suggestions. This - # requires that suggestions are provided for this question. - # Corresponds to the JSON property `mustPickSuggestion` - # @return [Boolean] - attr_accessor :must_pick_suggestion - alias_method :must_pick_suggestion?, :must_pick_suggestion - - # Number of stars to use for ratings questions. - # Corresponds to the JSON property `numStars` - # @return [String] - attr_accessor :num_stars - - # Placeholder text for an open text question. - # Corresponds to the JSON property `openTextPlaceholder` - # @return [String] - attr_accessor :open_text_placeholder - - # A list of suggested answers for open text question auto-complete. This is only - # valid if single_line_response is true. - # Corresponds to the JSON property `openTextSuggestions` - # @return [Array] - attr_accessor :open_text_suggestions - - # Required question text shown to the respondent. - # Corresponds to the JSON property `question` - # @return [String] - attr_accessor :question - - # Used by the Rating Scale with Text question type. This text goes along with - # the question field that is presented to the respondent, and is the actual text - # that the respondent is asked to rate. - # Corresponds to the JSON property `sentimentText` - # @return [String] - attr_accessor :sentiment_text - - # Option to allow multiple line open text responses instead of a single line - # response. Note that we don't show auto-complete suggestions with multiple line - # responses. - # Corresponds to the JSON property `singleLineResponse` - # @return [Boolean] - attr_accessor :single_line_response - alias_method :single_line_response?, :single_line_response - - # The threshold/screener answer options, which will screen a user into the rest - # of the survey. These will be a subset of the answer option strings. - # Corresponds to the JSON property `thresholdAnswers` - # @return [Array] - attr_accessor :threshold_answers - - # Required field defining the question type. For details about configuring - # different type of questions, consult the question configuration guide. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Optional unit of measurement for display (for example: hours, people, miles). - # Corresponds to the JSON property `unitOfMeasurementLabel` - # @return [String] - attr_accessor :unit_of_measurement_label - - # The YouTube video ID to be show in video questions. - # Corresponds to the JSON property `videoId` - # @return [String] - attr_accessor :video_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @answer_order = args[:answer_order] if args.key?(:answer_order) - @answers = args[:answers] if args.key?(:answers) - @has_other = args[:has_other] if args.key?(:has_other) - @high_value_label = args[:high_value_label] if args.key?(:high_value_label) - @images = args[:images] if args.key?(:images) - @last_answer_position_pinned = args[:last_answer_position_pinned] if args.key?(:last_answer_position_pinned) - @low_value_label = args[:low_value_label] if args.key?(:low_value_label) - @must_pick_suggestion = args[:must_pick_suggestion] if args.key?(:must_pick_suggestion) - @num_stars = args[:num_stars] if args.key?(:num_stars) - @open_text_placeholder = args[:open_text_placeholder] if args.key?(:open_text_placeholder) - @open_text_suggestions = args[:open_text_suggestions] if args.key?(:open_text_suggestions) - @question = args[:question] if args.key?(:question) - @sentiment_text = args[:sentiment_text] if args.key?(:sentiment_text) - @single_line_response = args[:single_line_response] if args.key?(:single_line_response) - @threshold_answers = args[:threshold_answers] if args.key?(:threshold_answers) - @type = args[:type] if args.key?(:type) - @unit_of_measurement_label = args[:unit_of_measurement_label] if args.key?(:unit_of_measurement_label) - @video_id = args[:video_id] if args.key?(:video_id) - end - end - - # Container object for image data and alt_text. - class SurveyQuestionImage - include Google::Apis::Core::Hashable - - # The alt text property used in image tags is required for all images. - # Corresponds to the JSON property `altText` - # @return [String] - attr_accessor :alt_text - - # Inline jpeg, gif, tiff, bmp, or png image raw bytes for an image question - # types. - # Corresponds to the JSON property `data` - # NOTE: Values are automatically base64 encoded/decoded in the client library. - # @return [String] - attr_accessor :data - - # The read-only URL for the hosted images. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @alt_text = args[:alt_text] if args.key?(:alt_text) - @data = args[:data] if args.key?(:data) - @url = args[:url] if args.key?(:url) - end - end - - # Message representing why the survey was rejected from review, if it was. - class SurveyRejection - include Google::Apis::Core::Hashable - - # A human-readable explanation of what was wrong with the survey. - # Corresponds to the JSON property `explanation` - # @return [String] - attr_accessor :explanation - - # Which category of rejection this was. See the Google Surveys Help Center for - # additional details on each category. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @explanation = args[:explanation] if args.key?(:explanation) - @type = args[:type] if args.key?(:type) - end - end - - # Reference to the current results for a given survey. - class SurveyResults - include Google::Apis::Core::Hashable - - # Human readable string describing the status of the request. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # External survey ID as viewable by survey owners in the editor view. - # Corresponds to the JSON property `surveyUrlId` - # @return [String] - attr_accessor :survey_url_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @status = args[:status] if args.key?(:status) - @survey_url_id = args[:survey_url_id] if args.key?(:survey_url_id) - end - end - - # - class SurveysDeleteResponse - include Google::Apis::Core::Hashable - - # Unique request ID used for logging and debugging. Please include in any error - # reporting or troubleshooting requests. - # Corresponds to the JSON property `requestId` - # @return [String] - attr_accessor :request_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @request_id = args[:request_id] if args.key?(:request_id) - end - end - - # - class SurveysListResponse - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `pageInfo` - # @return [Google::Apis::SurveysV2::PageInfo] - attr_accessor :page_info - - # Unique request ID used for logging and debugging. Please include in any error - # reporting or troubleshooting requests. - # Corresponds to the JSON property `requestId` - # @return [String] - attr_accessor :request_id - - # An individual survey resource. - # Corresponds to the JSON property `resources` - # @return [Array] - attr_accessor :resources - - # - # Corresponds to the JSON property `tokenPagination` - # @return [Google::Apis::SurveysV2::TokenPagination] - attr_accessor :token_pagination - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @page_info = args[:page_info] if args.key?(:page_info) - @request_id = args[:request_id] if args.key?(:request_id) - @resources = args[:resources] if args.key?(:resources) - @token_pagination = args[:token_pagination] if args.key?(:token_pagination) - end - end - - # - class SurveysStartRequest - include Google::Apis::Core::Hashable - - # *Deprecated* Threshold to start a survey automatically if the quoted prices is - # less than or equal to this value. See Survey.Cost for more details. This will - # no longer be available after June 2018. - # Corresponds to the JSON property `maxCostPerResponseNanos` - # @return [Fixnum] - attr_accessor :max_cost_per_response_nanos - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @max_cost_per_response_nanos = args[:max_cost_per_response_nanos] if args.key?(:max_cost_per_response_nanos) - end - end - - # - class SurveysStartResponse - include Google::Apis::Core::Hashable - - # Unique request ID used for logging and debugging. Please include in any error - # reporting or troubleshooting requests. - # Corresponds to the JSON property `requestId` - # @return [String] - attr_accessor :request_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @request_id = args[:request_id] if args.key?(:request_id) - end - end - - # - class SurveysStopResponse - include Google::Apis::Core::Hashable - - # Unique request ID used for logging and debugging. Please include in any error - # reporting or troubleshooting requests. - # Corresponds to the JSON property `requestId` - # @return [String] - attr_accessor :request_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @request_id = args[:request_id] if args.key?(:request_id) - end - end - - # - class TokenPagination - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # - # Corresponds to the JSON property `previousPageToken` - # @return [String] - attr_accessor :previous_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @previous_page_token = args[:previous_page_token] if args.key?(:previous_page_token) - end - end - end - end -end diff --git a/generated/google/apis/surveys_v2/representations.rb b/generated/google/apis/surveys_v2/representations.rb deleted file mode 100644 index 0bb56c936..000000000 --- a/generated/google/apis/surveys_v2/representations.rb +++ /dev/null @@ -1,305 +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 SurveysV2 - - class FieldMask - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class PageInfo - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ResultsGetRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ResultsMask - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Survey - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SurveyAudience - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SurveyCost - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SurveyQuestion - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SurveyQuestionImage - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SurveyRejection - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SurveyResults - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SurveysDeleteResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SurveysListResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SurveysStartRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SurveysStartResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SurveysStopResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class TokenPagination - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class FieldMask - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :fields, as: 'fields', class: Google::Apis::SurveysV2::FieldMask, decorator: Google::Apis::SurveysV2::FieldMask::Representation - - property :id, as: 'id' - end - end - - class PageInfo - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :result_per_page, as: 'resultPerPage' - property :start_index, as: 'startIndex' - property :total_results, as: 'totalResults' - end - end - - class ResultsGetRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :result_mask, as: 'resultMask', class: Google::Apis::SurveysV2::ResultsMask, decorator: Google::Apis::SurveysV2::ResultsMask::Representation - - end - end - - class ResultsMask - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :fields, as: 'fields', class: Google::Apis::SurveysV2::FieldMask, decorator: Google::Apis::SurveysV2::FieldMask::Representation - - property :projection, as: 'projection' - end - end - - class Survey - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :audience, as: 'audience', class: Google::Apis::SurveysV2::SurveyAudience, decorator: Google::Apis::SurveysV2::SurveyAudience::Representation - - property :cost, as: 'cost', class: Google::Apis::SurveysV2::SurveyCost, decorator: Google::Apis::SurveysV2::SurveyCost::Representation - - property :customer_data, :base64 => true, as: 'customerData' - property :description, as: 'description' - collection :owners, as: 'owners' - collection :questions, as: 'questions', class: Google::Apis::SurveysV2::SurveyQuestion, decorator: Google::Apis::SurveysV2::SurveyQuestion::Representation - - property :rejection_reason, as: 'rejectionReason', class: Google::Apis::SurveysV2::SurveyRejection, decorator: Google::Apis::SurveysV2::SurveyRejection::Representation - - property :state, as: 'state' - property :survey_url_id, as: 'surveyUrlId' - property :title, as: 'title' - property :wanted_response_count, as: 'wantedResponseCount' - end - end - - class SurveyAudience - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :ages, as: 'ages' - property :country, as: 'country' - property :country_subdivision, as: 'countrySubdivision' - property :gender, as: 'gender' - collection :languages, as: 'languages' - property :population_source, as: 'populationSource' - end - end - - class SurveyCost - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :cost_per_response_nanos, :numeric_string => true, as: 'costPerResponseNanos' - property :currency_code, as: 'currencyCode' - property :max_cost_per_response_nanos, :numeric_string => true, as: 'maxCostPerResponseNanos' - property :nanos, :numeric_string => true, as: 'nanos' - end - end - - class SurveyQuestion - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :answer_order, as: 'answerOrder' - collection :answers, as: 'answers' - property :has_other, as: 'hasOther' - property :high_value_label, as: 'highValueLabel' - collection :images, as: 'images', class: Google::Apis::SurveysV2::SurveyQuestionImage, decorator: Google::Apis::SurveysV2::SurveyQuestionImage::Representation - - property :last_answer_position_pinned, as: 'lastAnswerPositionPinned' - property :low_value_label, as: 'lowValueLabel' - property :must_pick_suggestion, as: 'mustPickSuggestion' - property :num_stars, as: 'numStars' - property :open_text_placeholder, as: 'openTextPlaceholder' - collection :open_text_suggestions, as: 'openTextSuggestions' - property :question, as: 'question' - property :sentiment_text, as: 'sentimentText' - property :single_line_response, as: 'singleLineResponse' - collection :threshold_answers, as: 'thresholdAnswers' - property :type, as: 'type' - property :unit_of_measurement_label, as: 'unitOfMeasurementLabel' - property :video_id, as: 'videoId' - end - end - - class SurveyQuestionImage - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :alt_text, as: 'altText' - property :data, :base64 => true, as: 'data' - property :url, as: 'url' - end - end - - class SurveyRejection - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :explanation, as: 'explanation' - property :type, as: 'type' - end - end - - class SurveyResults - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :status, as: 'status' - property :survey_url_id, as: 'surveyUrlId' - end - end - - class SurveysDeleteResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :request_id, as: 'requestId' - end - end - - class SurveysListResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :page_info, as: 'pageInfo', class: Google::Apis::SurveysV2::PageInfo, decorator: Google::Apis::SurveysV2::PageInfo::Representation - - property :request_id, as: 'requestId' - collection :resources, as: 'resources', class: Google::Apis::SurveysV2::Survey, decorator: Google::Apis::SurveysV2::Survey::Representation - - property :token_pagination, as: 'tokenPagination', class: Google::Apis::SurveysV2::TokenPagination, decorator: Google::Apis::SurveysV2::TokenPagination::Representation - - end - end - - class SurveysStartRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :max_cost_per_response_nanos, :numeric_string => true, as: 'maxCostPerResponseNanos' - end - end - - class SurveysStartResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :request_id, as: 'requestId' - end - end - - class SurveysStopResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :request_id, as: 'requestId' - end - end - - class TokenPagination - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - property :previous_page_token, as: 'previousPageToken' - end - end - end - end -end diff --git a/generated/google/apis/surveys_v2/service.rb b/generated/google/apis/surveys_v2/service.rb deleted file mode 100644 index 3e9ce143c..000000000 --- a/generated/google/apis/surveys_v2/service.rb +++ /dev/null @@ -1,348 +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 SurveysV2 - # Surveys API - # - # Creates and conducts surveys, lists the surveys that an authenticated user - # owns, and retrieves survey results and information about specified surveys. - # - # @example - # require 'google/apis/surveys_v2' - # - # Surveys = Google::Apis::SurveysV2 # Alias the module - # service = Surveys::SurveysService.new - # - class SurveysService < Google::Apis::Core::BaseService - # @return [String] - # API key. Your API key identifies your project and provides you with API access, - # quota, and reports. Required unless you provide an OAuth 2.0 token. - attr_accessor :key - - # @return [String] - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - attr_accessor :quota_user - - # @return [String] - # Deprecated. Please use quotaUser instead. - attr_accessor :user_ip - - def initialize - super('https://www.googleapis.com/', 'surveys/v2/') - @batch_path = 'batch/surveys/v2' - end - - # Retrieves any survey results that have been produced so far. Results are - # formatted as an Excel file. You must add "?alt=media" to the URL as an - # argument to get results. - # @param [String] survey_url_id - # External URL ID for the survey. - # @param [Google::Apis::SurveysV2::ResultsGetRequest] results_get_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [IO, String] download_dest - # IO stream or filename to receive content download - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SurveysV2::SurveyResults] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SurveysV2::SurveyResults] - # - # @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_result(survey_url_id, results_get_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block) - if download_dest.nil? - command = make_simple_command(:get, 'surveys/{surveyUrlId}/results', options) - else - command = make_download_command(:get, 'surveys/{surveyUrlId}/results', options) - command.download_dest = download_dest - end - command.request_representation = Google::Apis::SurveysV2::ResultsGetRequest::Representation - command.request_object = results_get_request_object - command.response_representation = Google::Apis::SurveysV2::SurveyResults::Representation - command.response_class = Google::Apis::SurveysV2::SurveyResults - command.params['surveyUrlId'] = survey_url_id unless survey_url_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Removes a survey from view in all user GET requests. - # @param [String] survey_url_id - # External URL ID for the survey. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SurveysV2::SurveysDeleteResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SurveysV2::SurveysDeleteResponse] - # - # @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_survey(survey_url_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:delete, 'surveys/{surveyUrlId}', options) - command.response_representation = Google::Apis::SurveysV2::SurveysDeleteResponse::Representation - command.response_class = Google::Apis::SurveysV2::SurveysDeleteResponse - command.params['surveyUrlId'] = survey_url_id unless survey_url_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves information about the specified survey. - # @param [String] survey_url_id - # External URL ID for the survey. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SurveysV2::Survey] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SurveysV2::Survey] - # - # @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_survey(survey_url_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:get, 'surveys/{surveyUrlId}', options) - command.response_representation = Google::Apis::SurveysV2::Survey::Representation - command.response_class = Google::Apis::SurveysV2::Survey - command.params['surveyUrlId'] = survey_url_id unless survey_url_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Creates a survey. - # @param [Google::Apis::SurveysV2::Survey] survey_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SurveysV2::Survey] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SurveysV2::Survey] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def insert_survey(survey_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:post, 'surveys', options) - command.request_representation = Google::Apis::SurveysV2::Survey::Representation - command.request_object = survey_object - command.response_representation = Google::Apis::SurveysV2::Survey::Representation - command.response_class = Google::Apis::SurveysV2::Survey - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Lists the surveys owned by the authenticated user. - # @param [Fixnum] max_results - # @param [Fixnum] start_index - # @param [String] token - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SurveysV2::SurveysListResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SurveysV2::SurveysListResponse] - # - # @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_surveys(max_results: nil, start_index: nil, token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:get, 'surveys', options) - command.response_representation = Google::Apis::SurveysV2::SurveysListResponse::Representation - command.response_class = Google::Apis::SurveysV2::SurveysListResponse - command.query['maxResults'] = max_results unless max_results.nil? - command.query['startIndex'] = start_index unless start_index.nil? - command.query['token'] = token unless token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Begins running a survey. - # @param [String] resource_id - # @param [Google::Apis::SurveysV2::SurveysStartRequest] surveys_start_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SurveysV2::SurveysStartResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SurveysV2::SurveysStartResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def start_survey(resource_id, surveys_start_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:post, 'surveys/{resourceId}/start', options) - command.request_representation = Google::Apis::SurveysV2::SurveysStartRequest::Representation - command.request_object = surveys_start_request_object - command.response_representation = Google::Apis::SurveysV2::SurveysStartResponse::Representation - command.response_class = Google::Apis::SurveysV2::SurveysStartResponse - command.params['resourceId'] = resource_id unless resource_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Stops a running survey. - # @param [String] resource_id - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SurveysV2::SurveysStopResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SurveysV2::SurveysStopResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def stop_survey(resource_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:post, 'surveys/{resourceId}/stop', options) - command.response_representation = Google::Apis::SurveysV2::SurveysStopResponse::Representation - command.response_class = Google::Apis::SurveysV2::SurveysStopResponse - command.params['resourceId'] = resource_id unless resource_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - # Updates a survey. Currently the only property that can be updated is the - # owners property. - # @param [String] survey_url_id - # External URL ID for the survey. - # @param [Google::Apis::SurveysV2::Survey] survey_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # An opaque string that represents a user for quota purposes. Must not exceed 40 - # characters. - # @param [String] user_ip - # Deprecated. Please use quotaUser instead. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SurveysV2::Survey] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SurveysV2::Survey] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_survey(survey_url_id, survey_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:put, 'surveys/{surveyUrlId}', options) - command.request_representation = Google::Apis::SurveysV2::Survey::Representation - command.request_object = survey_object - command.response_representation = Google::Apis::SurveysV2::Survey::Representation - command.response_class = Google::Apis::SurveysV2::Survey - command.params['surveyUrlId'] = survey_url_id unless survey_url_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - execute_or_queue_command(command, &block) - end - - protected - - def apply_command_defaults(command) - command.query['key'] = key unless key.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - end - end - end - end -end diff --git a/generated/google/apis/toolresults_v1.rb b/generated/google/apis/toolresults_v1.rb new file mode 100644 index 000000000..028259842 --- /dev/null +++ b/generated/google/apis/toolresults_v1.rb @@ -0,0 +1,31 @@ +# 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/toolresults_v1/service.rb' +require 'google/apis/toolresults_v1/classes.rb' +require 'google/apis/toolresults_v1/representations.rb' + +module Google + module Apis + # Cloud Tool Results API + # + # API to publish and access results from developer tools. + # + # @see https://firebase.google.com/docs/test-lab/ + module ToolresultsV1 + VERSION = 'V1' + REVISION = '20191218' + end + end +end diff --git a/generated/google/apis/toolresults_v1/classes.rb b/generated/google/apis/toolresults_v1/classes.rb new file mode 100644 index 000000000..1c4b45e9f --- /dev/null +++ b/generated/google/apis/toolresults_v1/classes.rb @@ -0,0 +1,696 @@ +# 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 ToolresultsV1 + + # Additional details for an ANR crash. + class Anr + include Google::Apis::Core::Hashable + + # A stacktrace. + # Corresponds to the JSON property `stackTrace` + # @return [Google::Apis::ToolresultsV1::StackTrace] + attr_accessor :stack_trace + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @stack_trace = args[:stack_trace] if args.key?(:stack_trace) + end + end + + # A suggestion to use deep links for a Robo run. + class AvailableDeepLinks + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # A warning that Robo encountered a screen that was mostly blank; this may + # indicate a problem with the app. + class BlankScreen + include Google::Apis::Core::Hashable + + # The screen id of the element + # Corresponds to the JSON property `screenId` + # @return [String] + attr_accessor :screen_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @screen_id = args[:screen_id] if args.key?(:screen_id) + end + end + + # Crash dialog was detected during the test execution + class CrashDialogError + include Google::Apis::Core::Hashable + + # The name of the package that caused the dialog. + # Corresponds to the JSON property `crashPackage` + # @return [String] + attr_accessor :crash_package + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @crash_package = args[:crash_package] if args.key?(:crash_package) + end + end + + # Additional details about encountered login screens. + class EncounteredLoginScreen + include Google::Apis::Core::Hashable + + # Number of encountered distinct login screens. + # Corresponds to the JSON property `distinctScreens` + # @return [Fixnum] + attr_accessor :distinct_screens + + # Subset of login screens. + # Corresponds to the JSON property `screenIds` + # @return [Array] + attr_accessor :screen_ids + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @distinct_screens = args[:distinct_screens] if args.key?(:distinct_screens) + @screen_ids = args[:screen_ids] if args.key?(:screen_ids) + end + end + + # Additional details about encountered screens with elements that are not + # Android UI widgets. + class EncounteredNonAndroidUiWidgetScreen + include Google::Apis::Core::Hashable + + # Number of encountered distinct screens with non Android UI widgets. + # Corresponds to the JSON property `distinctScreens` + # @return [Fixnum] + attr_accessor :distinct_screens + + # Subset of screens which contain non Android UI widgets. + # Corresponds to the JSON property `screenIds` + # @return [Array] + attr_accessor :screen_ids + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @distinct_screens = args[:distinct_screens] if args.key?(:distinct_screens) + @screen_ids = args[:screen_ids] if args.key?(:screen_ids) + end + end + + # Failed to install the APK. + class FailedToInstall + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Additional details for a fatal exception. + class FatalException + include Google::Apis::Core::Hashable + + # A stacktrace. + # Corresponds to the JSON property `stackTrace` + # @return [Google::Apis::ToolresultsV1::StackTrace] + attr_accessor :stack_trace + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @stack_trace = args[:stack_trace] if args.key?(:stack_trace) + end + end + + # Additional details of in-app purchases encountered during the crawl. + class InAppPurchasesFound + include Google::Apis::Core::Hashable + + # The total number of in-app purchases flows explored: how many times the + # robo tries to buy a SKU. + # Corresponds to the JSON property `inAppPurchasesFlowsExplored` + # @return [Fixnum] + attr_accessor :in_app_purchases_flows_explored + + # The total number of in-app purchases flows started. + # Corresponds to the JSON property `inAppPurchasesFlowsStarted` + # @return [Fixnum] + attr_accessor :in_app_purchases_flows_started + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @in_app_purchases_flows_explored = args[:in_app_purchases_flows_explored] if args.key?(:in_app_purchases_flows_explored) + @in_app_purchases_flows_started = args[:in_app_purchases_flows_started] if args.key?(:in_app_purchases_flows_started) + end + end + + # A warning that Robo did not crawl potentially important parts of the app. + class InsufficientCoverage + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Additional details for an iOS app crash. + class IosAppCrashed + include Google::Apis::Core::Hashable + + # A stacktrace. + # Corresponds to the JSON property `stackTrace` + # @return [Google::Apis::ToolresultsV1::StackTrace] + attr_accessor :stack_trace + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @stack_trace = args[:stack_trace] if args.key?(:stack_trace) + end + end + + # Failed to find the launcher activity of an app. + class LauncherActivityNotFound + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Additional details for a native crash. + class NativeCrash + include Google::Apis::Core::Hashable + + # A stacktrace. + # Corresponds to the JSON property `stackTrace` + # @return [Google::Apis::ToolresultsV1::StackTrace] + attr_accessor :stack_trace + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @stack_trace = args[:stack_trace] if args.key?(:stack_trace) + end + end + + # A non-sdk API and examples of it being called along with other metadata + # See + # https://developer.android.com/distribute/best-practices/develop/restrictions- + # non-sdk-interfaces + class NonSdkApi + include Google::Apis::Core::Hashable + + # The signature of the Non-SDK API + # Corresponds to the JSON property `apiSignature` + # @return [String] + attr_accessor :api_signature + + # Example stack traces of this API being called. + # Corresponds to the JSON property `exampleStackTraces` + # @return [Array] + attr_accessor :example_stack_traces + + # Optional debugging insights for non-SDK API violations. + # Corresponds to the JSON property `insights` + # @return [Array] + attr_accessor :insights + + # The total number of times this API was observed to have been called. + # Corresponds to the JSON property `invocationCount` + # @return [Fixnum] + attr_accessor :invocation_count + + # Which list this API appears on + # Corresponds to the JSON property `list` + # @return [String] + attr_accessor :list + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @api_signature = args[:api_signature] if args.key?(:api_signature) + @example_stack_traces = args[:example_stack_traces] if args.key?(:example_stack_traces) + @insights = args[:insights] if args.key?(:insights) + @invocation_count = args[:invocation_count] if args.key?(:invocation_count) + @list = args[:list] if args.key?(:list) + end + end + + # Non-SDK API insights (to address debugging solutions). + class NonSdkApiInsight + include Google::Apis::Core::Hashable + + # Optional sample stack traces, for which this insight applies (there + # should be at least one). + # Corresponds to the JSON property `exampleTraceMessages` + # @return [Array] + attr_accessor :example_trace_messages + + # A unique ID, to be used for determining the effectiveness of this + # particular insight in the context of a matcher. (required) + # Corresponds to the JSON property `matcherId` + # @return [String] + attr_accessor :matcher_id + + # This insight indicates that the hidden API usage originates from a + # Google-provided library. Users need not take any action. + # Corresponds to the JSON property `pendingGoogleUpdateInsight` + # @return [Google::Apis::ToolresultsV1::PendingGoogleUpdateInsight] + attr_accessor :pending_google_update_insight + + # This insight is a recommendation to upgrade a given library to the specified + # version, in order to avoid dependencies on non-SDK APIs. + # Corresponds to the JSON property `upgradeInsight` + # @return [Google::Apis::ToolresultsV1::UpgradeInsight] + attr_accessor :upgrade_insight + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @example_trace_messages = args[:example_trace_messages] if args.key?(:example_trace_messages) + @matcher_id = args[:matcher_id] if args.key?(:matcher_id) + @pending_google_update_insight = args[:pending_google_update_insight] if args.key?(:pending_google_update_insight) + @upgrade_insight = args[:upgrade_insight] if args.key?(:upgrade_insight) + end + end + + # Additional details for a non-sdk API usage violation. + class NonSdkApiUsageViolation + include Google::Apis::Core::Hashable + + # Signatures of a subset of those hidden API's. + # Corresponds to the JSON property `apiSignatures` + # @return [Array] + attr_accessor :api_signatures + + # Total number of unique hidden API's accessed. + # Corresponds to the JSON property `uniqueApis` + # @return [Fixnum] + attr_accessor :unique_apis + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @api_signatures = args[:api_signatures] if args.key?(:api_signatures) + @unique_apis = args[:unique_apis] if args.key?(:unique_apis) + end + end + + # Contains a summary and examples of non-sdk API usage violations. + class NonSdkApiUsageViolationReport + include Google::Apis::Core::Hashable + + # Examples of the detected API usages. + # Corresponds to the JSON property `exampleApis` + # @return [Array] + attr_accessor :example_apis + + # Minimum API level required for the application to run. + # Corresponds to the JSON property `minSdkVersion` + # @return [Fixnum] + attr_accessor :min_sdk_version + + # Specifies the API Level on which the application is designed to run. + # Corresponds to the JSON property `targetSdkVersion` + # @return [Fixnum] + attr_accessor :target_sdk_version + + # Total number of unique Non-SDK API's accessed. + # Corresponds to the JSON property `uniqueApis` + # @return [Fixnum] + attr_accessor :unique_apis + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @example_apis = args[:example_apis] if args.key?(:example_apis) + @min_sdk_version = args[:min_sdk_version] if args.key?(:min_sdk_version) + @target_sdk_version = args[:target_sdk_version] if args.key?(:target_sdk_version) + @unique_apis = args[:unique_apis] if args.key?(:unique_apis) + end + end + + # A warning that Robo encountered a screen that has overlapping clickable + # elements; this may indicate a potential UI issue. + class OverlappingUiElements + include Google::Apis::Core::Hashable + + # Resource names of the overlapping screen elements + # Corresponds to the JSON property `resourceName` + # @return [Array] + attr_accessor :resource_name + + # The screen id of the elements + # Corresponds to the JSON property `screenId` + # @return [String] + attr_accessor :screen_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @resource_name = args[:resource_name] if args.key?(:resource_name) + @screen_id = args[:screen_id] if args.key?(:screen_id) + end + end + + # This insight indicates that the hidden API usage originates from a + # Google-provided library. Users need not take any action. + class PendingGoogleUpdateInsight + include Google::Apis::Core::Hashable + + # The name of the Google-provided library with the non-SDK API dependency. + # Corresponds to the JSON property `nameOfGoogleLibrary` + # @return [String] + attr_accessor :name_of_google_library + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @name_of_google_library = args[:name_of_google_library] if args.key?(:name_of_google_library) + end + end + + # A notification that Robo signed in with Google. + class PerformedGoogleLogin + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # A notification that Robo performed some monkey actions. + class PerformedMonkeyActions + include Google::Apis::Core::Hashable + + # The total number of monkey actions performed during the crawl. + # Corresponds to the JSON property `totalActions` + # @return [Fixnum] + attr_accessor :total_actions + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @total_actions = args[:total_actions] if args.key?(:total_actions) + end + end + + # Execution stats for a user-provided Robo script. + class RoboScriptExecution + include Google::Apis::Core::Hashable + + # The number of Robo script actions executed successfully. + # Corresponds to the JSON property `successfulActions` + # @return [Fixnum] + attr_accessor :successful_actions + + # The total number of actions in the Robo script. + # Corresponds to the JSON property `totalActions` + # @return [Fixnum] + attr_accessor :total_actions + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @successful_actions = args[:successful_actions] if args.key?(:successful_actions) + @total_actions = args[:total_actions] if args.key?(:total_actions) + end + end + + # A stacktrace. + class StackTrace + include Google::Apis::Core::Hashable + + # The stack trace message. + # Required + # Corresponds to the JSON property `exception` + # @return [String] + attr_accessor :exception + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @exception = args[:exception] if args.key?(:exception) + end + end + + # User provided intent failed to resolve to an activity. + class StartActivityNotFound + include Google::Apis::Core::Hashable + + # + # Corresponds to the JSON property `action` + # @return [String] + attr_accessor :action + + # + # Corresponds to the JSON property `uri` + # @return [String] + attr_accessor :uri + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @action = args[:action] if args.key?(:action) + @uri = args[:uri] if args.key?(:uri) + end + end + + # A warning that the screen hierarchy is deeper than the recommended threshold. + class UiElementTooDeep + include Google::Apis::Core::Hashable + + # The depth of the screen element + # Corresponds to the JSON property `depth` + # @return [Fixnum] + attr_accessor :depth + + # The screen id of the element + # Corresponds to the JSON property `screenId` + # @return [String] + attr_accessor :screen_id + + # The screen state id of the element + # Corresponds to the JSON property `screenStateId` + # @return [String] + attr_accessor :screen_state_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @depth = args[:depth] if args.key?(:depth) + @screen_id = args[:screen_id] if args.key?(:screen_id) + @screen_state_id = args[:screen_state_id] if args.key?(:screen_state_id) + end + end + + # Default unspecified warning. + class UnspecifiedWarning + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Additional details of an unused robodirective. + class UnusedRoboDirective + include Google::Apis::Core::Hashable + + # The name of the resource that was unused. + # Corresponds to the JSON property `resourceName` + # @return [String] + attr_accessor :resource_name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @resource_name = args[:resource_name] if args.key?(:resource_name) + end + end + + # This insight is a recommendation to upgrade a given library to the specified + # version, in order to avoid dependencies on non-SDK APIs. + class UpgradeInsight + include Google::Apis::Core::Hashable + + # The name of the package to be upgraded. + # Corresponds to the JSON property `packageName` + # @return [String] + attr_accessor :package_name + + # The suggested version to upgrade to. + # Optional: In case we are not sure which version solves this problem + # Corresponds to the JSON property `upgradeToVersion` + # @return [String] + attr_accessor :upgrade_to_version + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @package_name = args[:package_name] if args.key?(:package_name) + @upgrade_to_version = args[:upgrade_to_version] if args.key?(:upgrade_to_version) + end + end + + # Additional details of a used Robo directive. + class UsedRoboDirective + include Google::Apis::Core::Hashable + + # The name of the resource that was used. + # Corresponds to the JSON property `resourceName` + # @return [String] + attr_accessor :resource_name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @resource_name = args[:resource_name] if args.key?(:resource_name) + end + end + + # Additional details of a used Robo directive with an ignore action. + # Note: This is a different scenario than unused directive. + class UsedRoboIgnoreDirective + include Google::Apis::Core::Hashable + + # The name of the resource that was ignored. + # Corresponds to the JSON property `resourceName` + # @return [String] + attr_accessor :resource_name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @resource_name = args[:resource_name] if args.key?(:resource_name) + end + end + end + end +end diff --git a/generated/google/apis/toolresults_v1/representations.rb b/generated/google/apis/toolresults_v1/representations.rb new file mode 100644 index 000000000..593d8a2b2 --- /dev/null +++ b/generated/google/apis/toolresults_v1/representations.rb @@ -0,0 +1,438 @@ +# 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 ToolresultsV1 + + class Anr + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AvailableDeepLinks + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BlankScreen + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CrashDialogError + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class EncounteredLoginScreen + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class EncounteredNonAndroidUiWidgetScreen + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class FailedToInstall + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class FatalException + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class InAppPurchasesFound + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class InsufficientCoverage + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class IosAppCrashed + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class LauncherActivityNotFound + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class NativeCrash + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class NonSdkApi + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class NonSdkApiInsight + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class NonSdkApiUsageViolation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class NonSdkApiUsageViolationReport + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class OverlappingUiElements + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class PendingGoogleUpdateInsight + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class PerformedGoogleLogin + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class PerformedMonkeyActions + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class RoboScriptExecution + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class StackTrace + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class StartActivityNotFound + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UiElementTooDeep + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UnspecifiedWarning + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UnusedRoboDirective + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UpgradeInsight + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UsedRoboDirective + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UsedRoboIgnoreDirective + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Anr + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :stack_trace, as: 'stackTrace', class: Google::Apis::ToolresultsV1::StackTrace, decorator: Google::Apis::ToolresultsV1::StackTrace::Representation + + end + end + + class AvailableDeepLinks + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class BlankScreen + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :screen_id, as: 'screenId' + end + end + + class CrashDialogError + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :crash_package, as: 'crashPackage' + end + end + + class EncounteredLoginScreen + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :distinct_screens, as: 'distinctScreens' + collection :screen_ids, as: 'screenIds' + end + end + + class EncounteredNonAndroidUiWidgetScreen + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :distinct_screens, as: 'distinctScreens' + collection :screen_ids, as: 'screenIds' + end + end + + class FailedToInstall + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class FatalException + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :stack_trace, as: 'stackTrace', class: Google::Apis::ToolresultsV1::StackTrace, decorator: Google::Apis::ToolresultsV1::StackTrace::Representation + + end + end + + class InAppPurchasesFound + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :in_app_purchases_flows_explored, as: 'inAppPurchasesFlowsExplored' + property :in_app_purchases_flows_started, as: 'inAppPurchasesFlowsStarted' + end + end + + class InsufficientCoverage + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class IosAppCrashed + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :stack_trace, as: 'stackTrace', class: Google::Apis::ToolresultsV1::StackTrace, decorator: Google::Apis::ToolresultsV1::StackTrace::Representation + + end + end + + class LauncherActivityNotFound + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class NativeCrash + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :stack_trace, as: 'stackTrace', class: Google::Apis::ToolresultsV1::StackTrace, decorator: Google::Apis::ToolresultsV1::StackTrace::Representation + + end + end + + class NonSdkApi + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :api_signature, as: 'apiSignature' + collection :example_stack_traces, as: 'exampleStackTraces' + collection :insights, as: 'insights', class: Google::Apis::ToolresultsV1::NonSdkApiInsight, decorator: Google::Apis::ToolresultsV1::NonSdkApiInsight::Representation + + property :invocation_count, as: 'invocationCount' + property :list, as: 'list' + end + end + + class NonSdkApiInsight + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :example_trace_messages, as: 'exampleTraceMessages' + property :matcher_id, as: 'matcherId' + property :pending_google_update_insight, as: 'pendingGoogleUpdateInsight', class: Google::Apis::ToolresultsV1::PendingGoogleUpdateInsight, decorator: Google::Apis::ToolresultsV1::PendingGoogleUpdateInsight::Representation + + property :upgrade_insight, as: 'upgradeInsight', class: Google::Apis::ToolresultsV1::UpgradeInsight, decorator: Google::Apis::ToolresultsV1::UpgradeInsight::Representation + + end + end + + class NonSdkApiUsageViolation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :api_signatures, as: 'apiSignatures' + property :unique_apis, as: 'uniqueApis' + end + end + + class NonSdkApiUsageViolationReport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :example_apis, as: 'exampleApis', class: Google::Apis::ToolresultsV1::NonSdkApi, decorator: Google::Apis::ToolresultsV1::NonSdkApi::Representation + + property :min_sdk_version, as: 'minSdkVersion' + property :target_sdk_version, as: 'targetSdkVersion' + property :unique_apis, as: 'uniqueApis' + end + end + + class OverlappingUiElements + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :resource_name, as: 'resourceName' + property :screen_id, as: 'screenId' + end + end + + class PendingGoogleUpdateInsight + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :name_of_google_library, as: 'nameOfGoogleLibrary' + end + end + + class PerformedGoogleLogin + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class PerformedMonkeyActions + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :total_actions, as: 'totalActions' + end + end + + class RoboScriptExecution + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :successful_actions, as: 'successfulActions' + property :total_actions, as: 'totalActions' + end + end + + class StackTrace + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :exception, as: 'exception' + end + end + + class StartActivityNotFound + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :action, as: 'action' + property :uri, as: 'uri' + end + end + + class UiElementTooDeep + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :depth, as: 'depth' + property :screen_id, as: 'screenId' + property :screen_state_id, as: 'screenStateId' + end + end + + class UnspecifiedWarning + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class UnusedRoboDirective + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :resource_name, as: 'resourceName' + end + end + + class UpgradeInsight + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :package_name, as: 'packageName' + property :upgrade_to_version, as: 'upgradeToVersion' + end + end + + class UsedRoboDirective + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :resource_name, as: 'resourceName' + end + end + + class UsedRoboIgnoreDirective + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :resource_name, as: 'resourceName' + end + end + end + end +end diff --git a/generated/google/apis/toolresults_v1/service.rb b/generated/google/apis/toolresults_v1/service.rb new file mode 100644 index 000000000..2f26f369d --- /dev/null +++ b/generated/google/apis/toolresults_v1/service.rb @@ -0,0 +1,59 @@ +# 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 ToolresultsV1 + # Cloud Tool Results API + # + # API to publish and access results from developer tools. + # + # @example + # require 'google/apis/toolresults_v1' + # + # Toolresults = Google::Apis::ToolresultsV1 # Alias the module + # service = Toolresults::ToolResultsService.new + # + # @see https://firebase.google.com/docs/test-lab/ + class ToolResultsService < 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://toolresults.googleapis.com/', '') + @batch_path = 'batch' + 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