diff --git a/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/client.rb b/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/client.rb index 8e9d093da037..b78ee00656f9 100644 --- a/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/client.rb +++ b/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/client.rb @@ -199,8 +199,8 @@ def initialize # @param workload [::Google::Cloud::AssuredWorkloads::V1beta1::Workload, ::Hash] # Required. Assured Workload to create # @param external_id [::String] - # Optional. A identifier associated with the workload and underlying projects which - # allows for the break down of billing costs for a workload. The value + # Optional. A identifier associated with the workload and underlying projects + # which allows for the break down of billing costs for a workload. The value # provided for the identifier will add a label to the workload and contained # projects with the identifier as the value. # @@ -480,8 +480,8 @@ def delete_workload request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] - # Required. The resource name of the Workload to fetch. This is the workloads's - # relative path in the API, formatted as + # Required. The resource name of the Workload to fetch. This is the + # workloads's relative path in the API, formatted as # "organizations/\\{organization_id}/locations/\\{location_id}/workloads/\\{workload_id}". # For example, # "organizations/123/locations/us-east1/workloads/assured-workload-1". diff --git a/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_v1beta1_pb.rb b/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_v1beta1_pb.rb index e7a7747f41c6..3b3704707c97 100644 --- a/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_v1beta1_pb.rb +++ b/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_v1beta1_pb.rb @@ -52,6 +52,9 @@ optional :provisioned_resources_parent, :string, 13 optional :kms_settings, :message, 14, "google.cloud.assuredworkloads.v1beta1.Workload.KMSSettings" repeated :resource_settings, :message, 15, "google.cloud.assuredworkloads.v1beta1.Workload.ResourceSettings" + optional :kaj_enrollment_state, :enum, 17, "google.cloud.assuredworkloads.v1beta1.Workload.KajEnrollmentState" + optional :enable_sovereign_controls, :bool, 18 + optional :saa_enrollment_response, :message, 20, "google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse" oneof :compliance_regime_settings do optional :il4_settings, :message, 7, "google.cloud.assuredworkloads.v1beta1.Workload.IL4Settings" optional :cjis_settings, :message, 8, "google.cloud.assuredworkloads.v1beta1.Workload.CJISSettings" @@ -91,6 +94,22 @@ optional :resource_type, :enum, 2, "google.cloud.assuredworkloads.v1beta1.Workload.ResourceInfo.ResourceType" optional :display_name, :string, 3 end + add_message "google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse" do + proto3_optional :setup_status, :enum, 1, "google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse.SetupState" + repeated :setup_errors, :enum, 2, "google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse.SetupError" + end + add_enum "google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse.SetupState" do + value :SETUP_STATE_UNSPECIFIED, 0 + value :STATUS_PENDING, 1 + value :STATUS_COMPLETE, 2 + end + add_enum "google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse.SetupError" do + value :SETUP_ERROR_UNSPECIFIED, 0 + value :ERROR_INVALID_BASE_SETUP, 1 + value :ERROR_MISSING_EXTERNAL_SIGNING_KEY, 2 + value :ERROR_NOT_ALL_SERVICES_ENROLLED, 3 + value :ERROR_SETUP_CHECK_FAILED, 4 + end add_enum "google.cloud.assuredworkloads.v1beta1.Workload.ComplianceRegime" do value :COMPLIANCE_REGIME_UNSPECIFIED, 0 value :IL4, 1 @@ -103,6 +122,11 @@ value :EU_REGIONS_AND_SUPPORT, 8 value :CA_REGIONS_AND_SUPPORT, 9 end + add_enum "google.cloud.assuredworkloads.v1beta1.Workload.KajEnrollmentState" do + value :KAJ_ENROLLMENT_STATE_UNSPECIFIED, 0 + value :KAJ_ENROLLMENT_STATE_PENDING, 1 + value :KAJ_ENROLLMENT_STATE_COMPLETE, 2 + end add_message "google.cloud.assuredworkloads.v1beta1.CreateWorkloadOperationMetadata" do optional :create_time, :message, 1, "google.protobuf.Timestamp" optional :display_name, :string, 2 @@ -132,7 +156,11 @@ module V1beta1 Workload::FedrampHighSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.FedrampHighSettings").msgclass Workload::FedrampModerateSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.FedrampModerateSettings").msgclass Workload::ResourceSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.ResourceSettings").msgclass + Workload::SaaEnrollmentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse").msgclass + Workload::SaaEnrollmentResponse::SetupState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse.SetupState").enummodule + Workload::SaaEnrollmentResponse::SetupError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse.SetupError").enummodule Workload::ComplianceRegime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.ComplianceRegime").enummodule + Workload::KajEnrollmentState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.KajEnrollmentState").enummodule CreateWorkloadOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.CreateWorkloadOperationMetadata").msgclass end end diff --git a/google-cloud-assured_workloads-v1beta1/proto_docs/google/cloud/assuredworkloads/v1beta1/assuredworkloads_v1beta1.rb b/google-cloud-assured_workloads-v1beta1/proto_docs/google/cloud/assuredworkloads/v1beta1/assuredworkloads_v1beta1.rb index 3d405c87a780..2491e25de84e 100644 --- a/google-cloud-assured_workloads-v1beta1/proto_docs/google/cloud/assuredworkloads/v1beta1/assuredworkloads_v1beta1.rb +++ b/google-cloud-assured_workloads-v1beta1/proto_docs/google/cloud/assuredworkloads/v1beta1/assuredworkloads_v1beta1.rb @@ -31,8 +31,8 @@ module V1beta1 # Required. Assured Workload to create # @!attribute [rw] external_id # @return [::String] - # Optional. A identifier associated with the workload and underlying projects which - # allows for the break down of billing costs for a workload. The value + # Optional. A identifier associated with the workload and underlying projects + # which allows for the break down of billing costs for a workload. The value # provided for the identifier will add a label to the workload and contained # projects with the identifier as the value. class CreateWorkloadRequest @@ -73,8 +73,8 @@ class DeleteWorkloadRequest # Request for fetching a workload. # @!attribute [rw] name # @return [::String] - # Required. The resource name of the Workload to fetch. This is the workloads's - # relative path in the API, formatted as + # Required. The resource name of the Workload to fetch. This is the + # workloads's relative path in the API, formatted as # "organizations/\\{organization_id}/locations/\\{location_id}/workloads/\\{workload_id}". # For example, # "organizations/123/locations/us-east1/workloads/assured-workload-1". @@ -158,16 +158,20 @@ class ListWorkloadsResponse # `billingAccounts/012345-567890-ABCDEF`. # @!attribute [rw] il4_settings # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::IL4Settings] - # Required. Input only. Immutable. Settings specific to resources needed for IL4. + # Required. Input only. Immutable. Settings specific to resources needed + # for IL4. # @!attribute [rw] cjis_settings # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::CJISSettings] - # Required. Input only. Immutable. Settings specific to resources needed for CJIS. + # Required. Input only. Immutable. Settings specific to resources needed + # for CJIS. # @!attribute [rw] fedramp_high_settings # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::FedrampHighSettings] - # Required. Input only. Immutable. Settings specific to resources needed for FedRAMP High. + # Required. Input only. Immutable. Settings specific to resources needed + # for FedRAMP High. # @!attribute [rw] fedramp_moderate_settings # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::FedrampModerateSettings] - # Required. Input only. Immutable. Settings specific to resources needed for FedRAMP Moderate. + # Required. Input only. Immutable. Settings specific to resources needed + # for FedRAMP Moderate. # @!attribute [rw] etag # @return [::String] # Optional. ETag of the workload, it is calculated on the basis @@ -177,22 +181,34 @@ class ListWorkloadsResponse # Optional. Labels applied to the workload. # @!attribute [rw] provisioned_resources_parent # @return [::String] - # Input only. The parent resource for the resources managed by this Assured Workload. May - # be either empty or a folder resource which is a child of the + # Input only. The parent resource for the resources managed by this Assured + # Workload. May be either empty or a folder resource which is a child of the # Workload parent. If not specified all resources are created under the # parent organization. # Format: # folders/\\{folder_id} # @!attribute [rw] kms_settings # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::KMSSettings] - # Input only. Settings used to create a CMEK crypto key. When set a project with a KMS - # CMEK key is provisioned. This field is mandatory for a subset of Compliance - # Regimes. + # Input only. Settings used to create a CMEK crypto key. When set a project + # with a KMS CMEK key is provisioned. This field is mandatory for a subset of + # Compliance Regimes. # @!attribute [rw] resource_settings # @return [::Array<::Google::Cloud::AssuredWorkloads::V1beta1::Workload::ResourceSettings>] - # Input only. Resource properties that are used to customize workload resources. - # These properties (such as custom project id) will be used to create - # workload resources if possible. This field is optional. + # Input only. Resource properties that are used to customize workload + # resources. These properties (such as custom project id) will be used to + # create workload resources if possible. This field is optional. + # @!attribute [r] kaj_enrollment_state + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::KajEnrollmentState] + # Output only. Represents the KAJ enrollment state of the given workload. + # @!attribute [rw] enable_sovereign_controls + # @return [::Boolean] + # Optional. Indicates the sovereignty status of the given workload. + # Currently meant to be used by Europe/Canada customers. + # @!attribute [r] saa_enrollment_response + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::SaaEnrollmentResponse] + # Output only. Represents the SAA enrollment response of the given workload. + # SAA enrollment response is queried during GetWorkload call. + # In failure cases, user friendly error message is shown in SAA details page. class Workload include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -232,13 +248,14 @@ module ResourceType # Settings specific to the Key Management Service. # @!attribute [rw] next_rotation_time # @return [::Google::Protobuf::Timestamp] - # Required. Input only. Immutable. The time at which the Key Management Service will automatically create a - # new version of the crypto key and mark it as the primary. + # Required. Input only. Immutable. The time at which the Key Management + # Service will automatically create a new version of the crypto key and + # mark it as the primary. # @!attribute [rw] rotation_period # @return [::Google::Protobuf::Duration] - # Required. Input only. Immutable. [next_rotation_time] will be advanced by this period when the Key - # Management Service automatically rotates a key. Must be at least 24 hours - # and at most 876,000 hours. + # Required. Input only. Immutable. [next_rotation_time] will be advanced by + # this period when the Key Management Service automatically rotates a key. + # Must be at least 24 hours and at most 876,000 hours. class KMSSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -247,7 +264,8 @@ class KMSSettings # Settings specific to resources needed for IL4. # @!attribute [rw] kms_settings # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::KMSSettings] - # Required. Input only. Immutable. Settings used to create a CMEK crypto key. + # Required. Input only. Immutable. Settings used to create a CMEK crypto + # key. class IL4Settings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -256,7 +274,8 @@ class IL4Settings # Settings specific to resources needed for CJIS. # @!attribute [rw] kms_settings # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::KMSSettings] - # Required. Input only. Immutable. Settings used to create a CMEK crypto key. + # Required. Input only. Immutable. Settings used to create a CMEK crypto + # key. class CJISSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -265,7 +284,8 @@ class CJISSettings # Settings specific to resources needed for FedRAMP High. # @!attribute [rw] kms_settings # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::KMSSettings] - # Required. Input only. Immutable. Settings used to create a CMEK crypto key. + # Required. Input only. Immutable. Settings used to create a CMEK crypto + # key. class FedrampHighSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -274,7 +294,8 @@ class FedrampHighSettings # Settings specific to resources needed for FedRAMP Moderate. # @!attribute [rw] kms_settings # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::KMSSettings] - # Required. Input only. Immutable. Settings used to create a CMEK crypto key. + # Required. Input only. Immutable. Settings used to create a CMEK crypto + # key. class FedrampModerateSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -301,6 +322,51 @@ class ResourceSettings extend ::Google::Protobuf::MessageExts::ClassMethods end + # Signed Access Approvals (SAA) enrollment response. + # @!attribute [rw] setup_status + # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::SaaEnrollmentResponse::SetupState] + # Indicates SAA enrollment status of a given workload. + # @!attribute [rw] setup_errors + # @return [::Array<::Google::Cloud::AssuredWorkloads::V1beta1::Workload::SaaEnrollmentResponse::SetupError>] + # Indicates SAA enrollment setup error if any. + class SaaEnrollmentResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Setup state of SAA enrollment. + module SetupState + # Unspecified. + SETUP_STATE_UNSPECIFIED = 0 + + # SAA enrollment pending. + STATUS_PENDING = 1 + + # SAA enrollment comopleted. + STATUS_COMPLETE = 2 + end + + # Setup error of SAA enrollment. + module SetupError + # Unspecified. + SETUP_ERROR_UNSPECIFIED = 0 + + # Invalid states for all customers, to be redirected to AA UI for + # additional details. + ERROR_INVALID_BASE_SETUP = 1 + + # Returned when there is not an EKM key configured. + ERROR_MISSING_EXTERNAL_SIGNING_KEY = 2 + + # Returned when there are no enrolled services or the customer is + # enrolled in CAA only for a subset of services. + ERROR_NOT_ALL_SERVICES_ENROLLED = 3 + + # Returned when exception was encountered during evaluation of other + # criteria. + ERROR_SETUP_CHECK_FAILED = 4 + end + end + # @!attribute [rw] key # @return [::String] # @!attribute [rw] value @@ -342,6 +408,18 @@ module ComplianceRegime # Assured Workloads For Canada Regions and Support controls CA_REGIONS_AND_SUPPORT = 9 end + + # Key Access Justifications(KAJ) Enrollment State. + module KajEnrollmentState + # Default State for KAJ Enrollment. + KAJ_ENROLLMENT_STATE_UNSPECIFIED = 0 + + # Pending State for KAJ Enrollment. + KAJ_ENROLLMENT_STATE_PENDING = 1 + + # Complete State for KAJ Enrollment. + KAJ_ENROLLMENT_STATE_COMPLETE = 2 + end end # Operation metadata to give request details of CreateWorkload. @@ -356,12 +434,12 @@ module ComplianceRegime # Optional. The parent of the workload. # @!attribute [rw] compliance_regime # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::ComplianceRegime] - # Optional. Compliance controls that should be applied to the resources managed by - # the workload. + # Optional. Compliance controls that should be applied to the resources + # managed by the workload. # @!attribute [rw] resource_settings # @return [::Array<::Google::Cloud::AssuredWorkloads::V1beta1::Workload::ResourceSettings>] - # Optional. Resource properties in the input that are used for creating/customizing - # workload resources. + # Optional. Resource properties in the input that are used for + # creating/customizing workload resources. class CreateWorkloadOperationMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.gitignore b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.repo-metadata.json b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.repo-metadata.json deleted file mode 100644 index 345723edf3cb..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.repo-metadata.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "api_id": "assuredworkloads.googleapis.com", - "client_documentation": "https://googleapis.dev/ruby/google-cloud-assured_workloads-v1beta1/latest", - "distribution_name": "google-cloud-assured_workloads-v1beta1", - "language": "ruby", - "name": "assuredworkloads", - "name_pretty": "Assured Workloads for Government V1beta1 API", - "product_documentation": "https://cloud.google.com/assured-workloads/", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Assured Workloads for Government secures government workloads and accelerates the path to running compliant workloads on Google Cloud. Note that google-cloud-assured_workloads-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-assured_workloads instead. See the readme for more details.", - "ruby-cloud-env-prefix": "ASSURED_WORKLOADS", - "ruby-cloud-product-url": "https://cloud.google.com/assured-workloads/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.rubocop.yml b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.rubocop.yml deleted file mode 100644 index cb2600795b47..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.rubocop.yml +++ /dev/null @@ -1,30 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-assured_workloads-v1beta1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/FileName: - Exclude: - - "lib/google-cloud-assured_workloads-v1beta1.rb" diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.yardopts b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.yardopts deleted file mode 100644 index 068f91f1b9af..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title=Assured Workloads for Government V1beta1 API ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.yardopts-cloudrad b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.yardopts-cloudrad deleted file mode 100644 index aa11137b7b39..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/.yardopts-cloudrad +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title=Assured Workloads for Government V1beta1 API ---exclude _pb\.rb$ ---format yaml ---template-path ../template - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/AUTHENTICATION.md deleted file mode 100644 index 7997b1a2f144..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/AUTHENTICATION.md +++ /dev/null @@ -1,169 +0,0 @@ -# Authentication - -In general, the google-cloud-assured_workloads-v1beta1 library uses -[Service Account](https://cloud.google.com/iam/docs/creating-managing-service-accounts) -credentials to connect to Google Cloud services. When running within -[Google Cloud Platform environments](#google-cloud-platform-environments) the -credentials will be discovered automatically. When running on other -environments, the Service Account credentials can be specified by providing the -path to the -[JSON keyfile](https://cloud.google.com/iam/docs/managing-service-account-keys) -for the account (or the JSON itself) in -[environment variables](#environment-variables). Additionally, Cloud SDK -credentials can also be discovered automatically, but this is only recommended -during development. - -## Quickstart - -1. [Create a service account and credentials](#creating-a-service-account). -2. Set the [environment variable](#environment-variables). - -```sh -export ASSURED_WORKLOADS_CREDENTIALS=path/to/keyfile.json -``` - -3. Initialize the client. - -```ruby -require "google/cloud/assured_workloads/v1beta1" - -client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new -``` - -## Credential Lookup - -The google-cloud-assured_workloads-v1beta1 library aims to make authentication -as simple as possible, and provides several mechanisms to configure your system -without requiring **Service Account Credentials** directly in code. - -**Credentials** are discovered in the following order: - -1. Specify credentials in method arguments -2. Specify credentials in configuration -3. Discover credentials path in environment variables -4. Discover credentials JSON in environment variables -5. Discover credentials file in the Cloud SDK's path -6. Discover GCP credentials - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, **Credentials** are discovered automatically. -Code should be written as if already authenticated. - -### Environment Variables - -The **Credentials JSON** can be placed in environment variables instead of -declaring them directly in code. Each service has its own environment variable, -allowing for different service accounts to be used for different services. (See -the READMEs for the individual service gems for details.) The path to the -**Credentials JSON** file can be stored in the environment variable, or the -**Credentials JSON** itself can be stored for environments such as Docker -containers where writing files is difficult or not encouraged. - -The environment variables that google-cloud-assured_workloads-v1beta1 -checks for credentials are configured on the service Credentials class (such as -{::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Credentials}): - -* `ASSURED_WORKLOADS_CREDENTIALS` - Path to JSON file, or JSON contents -* `ASSURED_WORKLOADS_KEYFILE` - Path to JSON file, or JSON contents -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/assured_workloads/v1beta1" - -ENV["ASSURED_WORKLOADS_CREDENTIALS"] = "path/to/keyfile.json" - -client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new -``` - -### Configuration - -The path to the **Credentials JSON** file can be configured instead of storing -it in an environment variable. Either on an individual client initialization: - -```ruby -require "google/cloud/assured_workloads/v1beta1" - -client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| - config.credentials = "path/to/keyfile.json" -end -``` - -Or globally for all clients: - -```ruby -require "google/cloud/assured_workloads/v1beta1" - -::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.configure do |config| - config.credentials = "path/to/keyfile.json" -end - -client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new -``` - -### Cloud SDK - -This option allows for an easy way to authenticate during development. If -credentials are not provided in code or in environment variables, then Cloud SDK -credentials are discovered. - -To configure your system for this, simply: - -1. [Download and install the Cloud SDK](https://cloud.google.com/sdk) -2. Authenticate using OAuth 2.0 `$ gcloud auth login` -3. Write code as if already authenticated. - -**NOTE:** This is _not_ recommended for running in production. The Cloud SDK -*should* only be used during development. - -[gce-how-to]: https://cloud.google.com/compute/docs/authentication#using -[dev-console]: https://console.cloud.google.com/project - -[enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png - -[create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png -[create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png -[reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png - -## Creating a Service Account - -Google Cloud requires **Service Account Credentials** to -connect to the APIs. You will use the **JSON key file** to -connect to most services with google-cloud-assured_workloads-v1beta1. - -If you are not running this client within -[Google Cloud Platform environments](#google-cloud-platform-environments), you -need a Google Developers service account. - -1. Visit the [Google Developers Console][dev-console]. -2. Create a new project or click on an existing project. -3. Activate the slide-out navigation tray and select **API Manager**. From - here, you will enable the APIs that your application requires. - - ![Enable the APIs that your application requires][enable-apis] - - *Note: You may need to enable billing in order to use these services.* - -4. Select **Credentials** from the side navigation. - - You should see a screen like one of the following. - - ![Create a new service account][create-new-service-account] - - ![Create a new service account With Existing Keys][create-new-service-account-existing-keys] - - Find the "Add credentials" drop down and select "Service account" to be - guided through downloading a new JSON key file. - - If you want to re-use an existing service account, you can easily generate a - new key file. Just select the account you wish to re-use, and click "Generate - new JSON key": - - ![Re-use an existing service account][reuse-service-account] - - The key file you download will be used by this library to authenticate API - requests and should be stored in a secure location. diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/CHANGELOG.md b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/Gemfile b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/Gemfile deleted file mode 100644 index b4e2a20bb606..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/Gemfile +++ /dev/null @@ -1,3 +0,0 @@ -source "https://rubygems.org" - -gemspec diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/LICENSE.md b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - 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. diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/README.md b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/README.md deleted file mode 100644 index 52d65277b3fa..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/README.md +++ /dev/null @@ -1,139 +0,0 @@ -# Ruby Client for the Assured Workloads for Government V1beta1 API - -API Client library for the Assured Workloads for Government V1beta1 API - -Assured Workloads for Government secures government workloads and accelerates the path to running compliant workloads on Google Cloud. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Assured Workloads for Government V1beta1 API. Most users should consider using -the main client gem, -[google-cloud-assured_workloads](https://rubygems.org/gems/google-cloud-assured_workloads). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-assured_workloads-v1beta1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/assuredworkloads.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/assured_workloads/v1beta1" - -client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new -request = ::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest.new # (request fields as keyword arguments...) -response = client.create_workload request -``` - -View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-assured_workloads-v1beta1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/assured-workloads/) -for general usage information. - -## Enabling Logging - -To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library. -The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below, -or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest) -that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb) -and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information. - -Configuring a Ruby stdlib logger: - -```ruby -require "logger" - -module MyLogger - LOGGER = Logger.new $stderr, level: Logger::WARN - def logger - LOGGER - end -end - -# Define a gRPC module-level logger method before grpc/logconfig.rb loads. -module GRPC - extend MyLogger -end -``` - -## Supported Ruby Versions - -This library is supported on Ruby 2.5+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Currently, this means Ruby 2.5 -and later. Older versions of Ruby _may_ still work, but are unsupported and not -recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details -about the Ruby support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-assured_workloads`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-assured_workloads-v1beta1`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-assured_workloads`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-cloud-assured_workloads-v1beta1`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/Rakefile b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/Rakefile deleted file mode 100644 index 96dbb391b34e..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/Rakefile +++ /dev/null @@ -1,206 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2021 Google LLC -# -# 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -namespace :test do - desc "Runs tests with coverage." - task :coverage do - require "simplecov" - SimpleCov.start do - command_name "google-cloud-assured_workloads-v1beta1" - track_files "lib/**/*.rb" - add_filter "test/" - end - - Rake::Task[:test].invoke - end -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -namespace :smoke_test do - desc "Runs smoke tests with coverage." - task :coverage do - require "simplecov" - SimpleCov.start do - command_name "google-cloud-assured_workloads-v1beta1" - track_files "lib/**/*.rb" - add_filter "test/" - end - - Rake::Task[:smoke_test].invoke - end -end - -# Acceptance tests -desc "Run the google-cloud-assured_workloads-v1beta1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["ASSURED_WORKLOADS_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["ASSURED_WORKLOADS_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["ASSURED_WORKLOADS_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or ASSURED_WORKLOADS_TEST_PROJECT=test123 ASSURED_WORKLOADS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/credentials" - ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["ASSURED_WORKLOADS_PROJECT"] = project - ENV["ASSURED_WORKLOADS_TEST_PROJECT"] = project - ENV["ASSURED_WORKLOADS_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-cloud-assured_workloads-v1beta1 gem has no acceptance tests." - end - end - - desc "Run acceptance tests with coverage." - task :coverage do - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-assured_workloads-v1beta1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-assured_workloads-v1beta1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-assured_workloads-v1beta1 gem does not have doctest tests." -end - -task :cloudrad do - ENV["CLOUDRAD_GEM_NAME"] = "google-cloud-assured_workloads-v1beta1" - sh "bundle exec yard doc --fail-on-warning --yardopts .yardopts-cloudrad" -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-assured_workloads-v1beta1" - header "google-cloud-assured_workloads-v1beta1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-assured_workloads-v1beta1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-assured_workloads-v1beta1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-assured_workloads-v1beta1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-assured_workloads-v1beta1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/gapic_metadata.json deleted file mode 100644 index 9a7cb56753b6..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/gapic_metadata.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.assuredworkloads.v1beta1", - "libraryPackage": "::Google::Cloud::AssuredWorkloads::V1beta1", - "services": { - "AssuredWorkloadsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client", - "rpcs": { - "CreateWorkload": { - "methods": [ - "create_workload" - ] - }, - "UpdateWorkload": { - "methods": [ - "update_workload" - ] - }, - "DeleteWorkload": { - "methods": [ - "delete_workload" - ] - }, - "GetWorkload": { - "methods": [ - "get_workload" - ] - }, - "ListWorkloads": { - "methods": [ - "list_workloads" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/google-cloud-assured_workloads-v1beta1.gemspec b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/google-cloud-assured_workloads-v1beta1.gemspec deleted file mode 100644 index 48a5f639966a..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/google-cloud-assured_workloads-v1beta1.gemspec +++ /dev/null @@ -1,37 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/assured_workloads/v1beta1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-assured_workloads-v1beta1" - gem.version = Google::Cloud::AssuredWorkloads::V1beta1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Assured Workloads for Government secures government workloads and accelerates the path to running compliant workloads on Google Cloud. Note that google-cloud-assured_workloads-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-assured_workloads instead. See the readme for more details." - gem.summary = "API Client library for the Assured Workloads for Government V1beta1 API" - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 2.5" - - gem.add_dependency "gapic-common", ">= 0.7", "< 2.a" - gem.add_dependency "google-cloud-errors", "~> 1.0" - - gem.add_development_dependency "google-style", "~> 1.25.1" - gem.add_development_dependency "minitest", "~> 5.14" - gem.add_development_dependency "minitest-focus", "~> 1.1" - gem.add_development_dependency "minitest-rg", "~> 5.2" - gem.add_development_dependency "rake", ">= 12.0" - gem.add_development_dependency "redcarpet", "~> 3.0" - gem.add_development_dependency "simplecov", "~> 0.18" - gem.add_development_dependency "yard", "~> 0.9" -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google-cloud-assured_workloads-v1beta1.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google-cloud-assured_workloads-v1beta1.rb deleted file mode 100644 index 996d8d4f4b93..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google-cloud-assured_workloads-v1beta1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2021 Google LLC -# -# 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/assured_workloads/v1beta1" diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1.rb deleted file mode 100644 index 63762f9c8650..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2021 Google LLC -# -# 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/assured_workloads/v1beta1/assured_workloads_service" -require "google/cloud/assured_workloads/v1beta1/version" - -module Google - module Cloud - module AssuredWorkloads - ## - # To load this package, including all its services, and instantiate a client: - # - # require "google/cloud/assured_workloads/v1beta1" - # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new - # - module V1beta1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta1", "_helpers.rb" -require "google/cloud/assured_workloads/v1beta1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service.rb deleted file mode 100644 index 3073c15e3e92..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2021 Google LLC -# -# 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/assured_workloads/v1beta1/version" - -require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/credentials" -require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/paths" -require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/operations" -require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/client" - -module Google - module Cloud - module AssuredWorkloads - module V1beta1 - ## - # Service to manage AssuredWorkloads. - # - # To load this service and instantiate a client: - # - # require "google/cloud/assured_workloads/v1beta1/assured_workloads_service" - # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new - # - module AssuredWorkloadsService - end - end - end - end -end - -helper_path = ::File.join __dir__, "assured_workloads_service", "helpers.rb" -require "google/cloud/assured_workloads/v1beta1/assured_workloads_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/client.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/client.rb deleted file mode 100644 index d724044f991c..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/client.rb +++ /dev/null @@ -1,838 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2021 Google LLC -# -# 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/assuredworkloads/v1beta1/assuredworkloads_v1beta1_pb" - -module Google - module Cloud - module AssuredWorkloads - module V1beta1 - module AssuredWorkloadsService - ## - # Client for the AssuredWorkloadsService service. - # - # Service to manage AssuredWorkloads. - # - class Client - include Paths - - # @private - attr_reader :assured_workloads_service_stub - - ## - # Configure the AssuredWorkloadsService Client class. - # - # See {::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AssuredWorkloadsService clients - # ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "AssuredWorkloads", "V1beta1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_workload.timeout = 60.0 - - default_config.rpcs.update_workload.timeout = 60.0 - - default_config.rpcs.delete_workload.timeout = 60.0 - default_config.rpcs.delete_workload.retry_policy = { - initial_delay: 0.2, max_delay: 30.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_workload.timeout = 60.0 - default_config.rpcs.get_workload.retry_policy = { - initial_delay: 0.2, max_delay: 30.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_workloads.timeout = 60.0 - default_config.rpcs.list_workloads.retry_policy = { - initial_delay: 0.2, max_delay: 30.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AssuredWorkloadsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # Create a new AssuredWorkloadsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AssuredWorkloadsService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/assuredworkloads/v1beta1/assuredworkloads_v1beta1_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint && - !@config.endpoint.split(".").first.include?("-") - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.endpoint = @config.endpoint - end - - @assured_workloads_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - channel_args: @config.channel_args, - interceptors: @config.interceptors - ) - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Operations] - # - attr_reader :operations_client - - # Service calls - - ## - # Creates Assured Workload. - # - # @overload create_workload(request, options = nil) - # Pass arguments to `create_workload` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_workload(parent: nil, workload: nil, external_id: nil) - # Pass arguments to `create_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the new Workload's parent. - # Must be of the form `organizations/{org_id}/locations/{location_id}`. - # @param workload [::Google::Cloud::AssuredWorkloads::V1beta1::Workload, ::Hash] - # Required. Assured Workload to create - # @param external_id [::String] - # Optional. A identifier associated with the workload and underlying projects - # which allows for the break down of billing costs for a workload. The value - # provided for the identifier will add a label to the workload and contained - # projects with the identifier as the value. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest.new - # - # # Call the create_workload method. - # result = client.create_workload request - # - # # The returned object is of type Gapic::Operation. You can use this - # # object to check the status of an operation, cancel it, or wait - # # for results. Here is how to block until completion: - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "Error!" - # end - # - def create_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_workload.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_workload.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.call_rpc :create_workload, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing workload. - # Currently allows updating of workload display_name and labels. - # For force updates don't set etag field in the Workload. - # Only one update operation per workload can be in progress. - # - # @overload update_workload(request, options = nil) - # Pass arguments to `update_workload` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1beta1::UpdateWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1beta1::UpdateWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_workload(workload: nil, update_mask: nil) - # Pass arguments to `update_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param workload [::Google::Cloud::AssuredWorkloads::V1beta1::Workload, ::Hash] - # Required. The workload to update. - # The workload’s `name` field is used to identify the workload to be updated. - # Format: - # organizations/\\{org_id}/locations/\\{location_id}/workloads/\\{workload_id} - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AssuredWorkloads::V1beta1::Workload] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1beta1::UpdateWorkloadRequest.new - # - # # Call the update_workload method. - # result = client.update_workload request - # - # # The returned object is of type Google::Cloud::AssuredWorkloads::V1beta1::Workload. - # p result - # - def update_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1beta1::UpdateWorkloadRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_workload.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.workload&.name - header_params["workload.name"] = request.workload.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_workload.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.call_rpc :update_workload, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the workload. Make sure that workload's direct children are already - # in a deleted state, otherwise the request will fail with a - # FAILED_PRECONDITION error. - # - # @overload delete_workload(request, options = nil) - # Pass arguments to `delete_workload` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_workload(name: nil, etag: nil) - # Pass arguments to `delete_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The `name` field is used to identify the workload. - # Format: - # organizations/\\{org_id}/locations/\\{location_id}/workloads/\\{workload_id} - # @param etag [::String] - # Optional. The etag of the workload. - # If this is provided, it must match the server's etag. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest.new - # - # # Call the delete_workload method. - # result = client.delete_workload request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_workload.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_workload.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.call_rpc :delete_workload, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets Assured Workload associated with a CRM Node - # - # @overload get_workload(request, options = nil) - # Pass arguments to `get_workload` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1beta1::GetWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1beta1::GetWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_workload(name: nil) - # Pass arguments to `get_workload` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Workload to fetch. This is the - # workloads's relative path in the API, formatted as - # "organizations/\\{organization_id}/locations/\\{location_id}/workloads/\\{workload_id}". - # For example, - # "organizations/123/locations/us-east1/workloads/assured-workload-1". - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AssuredWorkloads::V1beta1::Workload] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1beta1::GetWorkloadRequest.new - # - # # Call the get_workload method. - # result = client.get_workload request - # - # # The returned object is of type Google::Cloud::AssuredWorkloads::V1beta1::Workload. - # p result - # - def get_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1beta1::GetWorkloadRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_workload.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_workload.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.call_rpc :get_workload, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Assured Workloads under a CRM Node. - # - # @overload list_workloads(request, options = nil) - # Pass arguments to `list_workloads` via a request object, either of type - # {::Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_workloads(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_workloads` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent Resource to list workloads from. - # Must be of the form `organizations/{org_id}/locations/{location}`. - # @param page_size [::Integer] - # Page size. - # @param page_token [::String] - # Page token returned from previous request. Page token contains context from - # previous request. Page token needs to be passed in the second and following - # requests. - # @param filter [::String] - # A custom filter for filtering by properties of a workload. At this time, - # only filtering by labels is supported. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AssuredWorkloads::V1beta1::Workload>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AssuredWorkloads::V1beta1::Workload>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/assured_workloads/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsRequest.new - # - # # Call the list_workloads method. - # result = client.list_workloads request - # - # # The returned object is of type Gapic::PagedEnumerable. You can - # # iterate over all elements by calling #each, and the enumerable - # # will lazily make API calls to fetch subsequent pages. Other - # # methods are also available for managing paging directly. - # result.each do |response| - # # Each element is of type ::Google::Cloud::AssuredWorkloads::V1beta1::Workload. - # p response - # end - # - def list_workloads request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_workloads.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_workloads.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_workloads.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @assured_workloads_service_stub.call_rpc :list_workloads, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @assured_workloads_service_stub, :list_workloads, request, response, operation, options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the AssuredWorkloadsService API. - # - # This class represents the configuration for AssuredWorkloadsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_workload to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_workload.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_workload.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # The hostname or hostname:port of the service endpoint. - # Defaults to `"assuredworkloads.googleapis.com"`. - # @return [::String] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # - class Configuration - extend ::Gapic::Config - - config_attr :endpoint, "assuredworkloads.googleapis.com", ::String - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the AssuredWorkloadsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :create_workload - ## - # RPC-specific configuration for `update_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :update_workload - ## - # RPC-specific configuration for `delete_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_workload - ## - # RPC-specific configuration for `get_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :get_workload - ## - # RPC-specific configuration for `list_workloads` - # @return [::Gapic::Config::Method] - # - attr_reader :list_workloads - - # @private - def initialize parent_rpcs = nil - create_workload_config = parent_rpcs.create_workload if parent_rpcs.respond_to? :create_workload - @create_workload = ::Gapic::Config::Method.new create_workload_config - update_workload_config = parent_rpcs.update_workload if parent_rpcs.respond_to? :update_workload - @update_workload = ::Gapic::Config::Method.new update_workload_config - delete_workload_config = parent_rpcs.delete_workload if parent_rpcs.respond_to? :delete_workload - @delete_workload = ::Gapic::Config::Method.new delete_workload_config - get_workload_config = parent_rpcs.get_workload if parent_rpcs.respond_to? :get_workload - @get_workload = ::Gapic::Config::Method.new get_workload_config - list_workloads_config = parent_rpcs.list_workloads if parent_rpcs.respond_to? :list_workloads - @list_workloads = ::Gapic::Config::Method.new list_workloads_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/credentials.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/credentials.rb deleted file mode 100644 index 51d66a49cecd..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/credentials.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2021 Google LLC -# -# 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module AssuredWorkloads - module V1beta1 - module AssuredWorkloadsService - # Credentials for the AssuredWorkloadsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "ASSURED_WORKLOADS_CREDENTIALS", - "ASSURED_WORKLOADS_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "ASSURED_WORKLOADS_CREDENTIALS_JSON", - "ASSURED_WORKLOADS_KEYFILE_JSON", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/operations.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/operations.rb deleted file mode 100644 index c78082db7c44..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/operations.rb +++ /dev/null @@ -1,767 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2021 Google LLC -# -# 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module AssuredWorkloads - module V1beta1 - module AssuredWorkloadsService - # Service that implements Longrunning Operations API. - class Operations - # @private - attr_reader :operations_stub - - ## - # Configuration for the AssuredWorkloadsService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the AssuredWorkloadsService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - channel_args: @config.channel_args, - interceptors: @config.interceptors - ) - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # NOTE: the `name` binding allows API services to override the binding - # to use different resource name schemes, such as `users/*/operations`. To - # override the binding, API services can add a binding such as - # `"/v1/{name=users/*}/operations"` to their service configuration. - # For backwards compatibility, the default name includes the operations - # collection id, however overriding users must ensure the name binding - # is the parent resource, without the operations collection id. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can - # # iterate over all elements by calling #each, and the enumerable - # # will lazily make API calls to fetch subsequent pages. Other - # # methods are also available for managing paging directly. - # result.each do |response| - # # Each element is of type ::Google::Longrunning::Operation. - # p response - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use this - # # object to check the status of an operation, cancel it, or wait - # # for results. Here is how to block until completion: - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "Error!" - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, - # corresponding to `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use this - # # object to check the status of an operation, cancel it, or wait - # # for results. Here is how to block until completion: - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "Error!" - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client and x-goog-user-project headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - return response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # The hostname or hostname:port of the service endpoint. - # Defaults to `"assuredworkloads.googleapis.com"`. - # @return [::String] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # - class Configuration - extend ::Gapic::Config - - config_attr :endpoint, "assuredworkloads.googleapis.com", ::String - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/paths.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/paths.rb deleted file mode 100644 index aaa544d8cba0..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/paths.rb +++ /dev/null @@ -1,69 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2021 Google LLC -# -# 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AssuredWorkloads - module V1beta1 - module AssuredWorkloadsService - # Path helper methods for the AssuredWorkloadsService API. - module Paths - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}` - # - # @param organization [String] - # @param location [String] - # - # @return [::String] - def location_path organization:, location: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}" - end - - ## - # Create a fully-qualified Workload resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/workloads/{workload}` - # - # @param organization [String] - # @param location [String] - # @param workload [String] - # - # @return [::String] - def workload_path organization:, location:, workload: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/workloads/#{workload}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/version.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/version.rb deleted file mode 100644 index 3e5e0cf92f4a..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assured_workloads/v1beta1/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2021 Google LLC -# -# 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AssuredWorkloads - module V1beta1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_v1beta1_pb.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_v1beta1_pb.rb deleted file mode 100644 index 3b3704707c97..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_v1beta1_pb.rb +++ /dev/null @@ -1,168 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/assuredworkloads/v1beta1/assuredworkloads_v1beta1.proto - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' -require 'google/protobuf' - -Google::Protobuf::DescriptorPool.generated_pool.build do - add_file("google/cloud/assuredworkloads/v1beta1/assuredworkloads_v1beta1.proto", :syntax => :proto3) do - add_message "google.cloud.assuredworkloads.v1beta1.CreateWorkloadRequest" do - optional :parent, :string, 1 - optional :workload, :message, 2, "google.cloud.assuredworkloads.v1beta1.Workload" - optional :external_id, :string, 3 - end - add_message "google.cloud.assuredworkloads.v1beta1.UpdateWorkloadRequest" do - optional :workload, :message, 1, "google.cloud.assuredworkloads.v1beta1.Workload" - optional :update_mask, :message, 2, "google.protobuf.FieldMask" - end - add_message "google.cloud.assuredworkloads.v1beta1.DeleteWorkloadRequest" do - optional :name, :string, 1 - optional :etag, :string, 2 - end - add_message "google.cloud.assuredworkloads.v1beta1.GetWorkloadRequest" do - optional :name, :string, 1 - end - add_message "google.cloud.assuredworkloads.v1beta1.ListWorkloadsRequest" do - optional :parent, :string, 1 - optional :page_size, :int32, 2 - optional :page_token, :string, 3 - optional :filter, :string, 4 - end - add_message "google.cloud.assuredworkloads.v1beta1.ListWorkloadsResponse" do - repeated :workloads, :message, 1, "google.cloud.assuredworkloads.v1beta1.Workload" - optional :next_page_token, :string, 2 - end - add_message "google.cloud.assuredworkloads.v1beta1.Workload" do - optional :name, :string, 1 - optional :display_name, :string, 2 - repeated :resources, :message, 3, "google.cloud.assuredworkloads.v1beta1.Workload.ResourceInfo" - optional :compliance_regime, :enum, 4, "google.cloud.assuredworkloads.v1beta1.Workload.ComplianceRegime" - optional :create_time, :message, 5, "google.protobuf.Timestamp" - optional :billing_account, :string, 6 - optional :etag, :string, 9 - map :labels, :string, :string, 10 - optional :provisioned_resources_parent, :string, 13 - optional :kms_settings, :message, 14, "google.cloud.assuredworkloads.v1beta1.Workload.KMSSettings" - repeated :resource_settings, :message, 15, "google.cloud.assuredworkloads.v1beta1.Workload.ResourceSettings" - optional :kaj_enrollment_state, :enum, 17, "google.cloud.assuredworkloads.v1beta1.Workload.KajEnrollmentState" - optional :enable_sovereign_controls, :bool, 18 - optional :saa_enrollment_response, :message, 20, "google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse" - oneof :compliance_regime_settings do - optional :il4_settings, :message, 7, "google.cloud.assuredworkloads.v1beta1.Workload.IL4Settings" - optional :cjis_settings, :message, 8, "google.cloud.assuredworkloads.v1beta1.Workload.CJISSettings" - optional :fedramp_high_settings, :message, 11, "google.cloud.assuredworkloads.v1beta1.Workload.FedrampHighSettings" - optional :fedramp_moderate_settings, :message, 12, "google.cloud.assuredworkloads.v1beta1.Workload.FedrampModerateSettings" - end - end - add_message "google.cloud.assuredworkloads.v1beta1.Workload.ResourceInfo" do - optional :resource_id, :int64, 1 - optional :resource_type, :enum, 2, "google.cloud.assuredworkloads.v1beta1.Workload.ResourceInfo.ResourceType" - end - add_enum "google.cloud.assuredworkloads.v1beta1.Workload.ResourceInfo.ResourceType" do - value :RESOURCE_TYPE_UNSPECIFIED, 0 - value :CONSUMER_PROJECT, 1 - value :CONSUMER_FOLDER, 4 - value :ENCRYPTION_KEYS_PROJECT, 2 - value :KEYRING, 3 - end - add_message "google.cloud.assuredworkloads.v1beta1.Workload.KMSSettings" do - optional :next_rotation_time, :message, 1, "google.protobuf.Timestamp" - optional :rotation_period, :message, 2, "google.protobuf.Duration" - end - add_message "google.cloud.assuredworkloads.v1beta1.Workload.IL4Settings" do - optional :kms_settings, :message, 1, "google.cloud.assuredworkloads.v1beta1.Workload.KMSSettings" - end - add_message "google.cloud.assuredworkloads.v1beta1.Workload.CJISSettings" do - optional :kms_settings, :message, 1, "google.cloud.assuredworkloads.v1beta1.Workload.KMSSettings" - end - add_message "google.cloud.assuredworkloads.v1beta1.Workload.FedrampHighSettings" do - optional :kms_settings, :message, 1, "google.cloud.assuredworkloads.v1beta1.Workload.KMSSettings" - end - add_message "google.cloud.assuredworkloads.v1beta1.Workload.FedrampModerateSettings" do - optional :kms_settings, :message, 1, "google.cloud.assuredworkloads.v1beta1.Workload.KMSSettings" - end - add_message "google.cloud.assuredworkloads.v1beta1.Workload.ResourceSettings" do - optional :resource_id, :string, 1 - optional :resource_type, :enum, 2, "google.cloud.assuredworkloads.v1beta1.Workload.ResourceInfo.ResourceType" - optional :display_name, :string, 3 - end - add_message "google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse" do - proto3_optional :setup_status, :enum, 1, "google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse.SetupState" - repeated :setup_errors, :enum, 2, "google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse.SetupError" - end - add_enum "google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse.SetupState" do - value :SETUP_STATE_UNSPECIFIED, 0 - value :STATUS_PENDING, 1 - value :STATUS_COMPLETE, 2 - end - add_enum "google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse.SetupError" do - value :SETUP_ERROR_UNSPECIFIED, 0 - value :ERROR_INVALID_BASE_SETUP, 1 - value :ERROR_MISSING_EXTERNAL_SIGNING_KEY, 2 - value :ERROR_NOT_ALL_SERVICES_ENROLLED, 3 - value :ERROR_SETUP_CHECK_FAILED, 4 - end - add_enum "google.cloud.assuredworkloads.v1beta1.Workload.ComplianceRegime" do - value :COMPLIANCE_REGIME_UNSPECIFIED, 0 - value :IL4, 1 - value :CJIS, 2 - value :FEDRAMP_HIGH, 3 - value :FEDRAMP_MODERATE, 4 - value :US_REGIONAL_ACCESS, 5 - value :HIPAA, 6 - value :HITRUST, 7 - value :EU_REGIONS_AND_SUPPORT, 8 - value :CA_REGIONS_AND_SUPPORT, 9 - end - add_enum "google.cloud.assuredworkloads.v1beta1.Workload.KajEnrollmentState" do - value :KAJ_ENROLLMENT_STATE_UNSPECIFIED, 0 - value :KAJ_ENROLLMENT_STATE_PENDING, 1 - value :KAJ_ENROLLMENT_STATE_COMPLETE, 2 - end - add_message "google.cloud.assuredworkloads.v1beta1.CreateWorkloadOperationMetadata" do - optional :create_time, :message, 1, "google.protobuf.Timestamp" - optional :display_name, :string, 2 - optional :parent, :string, 3 - optional :compliance_regime, :enum, 4, "google.cloud.assuredworkloads.v1beta1.Workload.ComplianceRegime" - repeated :resource_settings, :message, 5, "google.cloud.assuredworkloads.v1beta1.Workload.ResourceSettings" - end - end -end - -module Google - module Cloud - module AssuredWorkloads - module V1beta1 - CreateWorkloadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.CreateWorkloadRequest").msgclass - UpdateWorkloadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.UpdateWorkloadRequest").msgclass - DeleteWorkloadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.DeleteWorkloadRequest").msgclass - GetWorkloadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.GetWorkloadRequest").msgclass - ListWorkloadsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.ListWorkloadsRequest").msgclass - ListWorkloadsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.ListWorkloadsResponse").msgclass - Workload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload").msgclass - Workload::ResourceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.ResourceInfo").msgclass - Workload::ResourceInfo::ResourceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.ResourceInfo.ResourceType").enummodule - Workload::KMSSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.KMSSettings").msgclass - Workload::IL4Settings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.IL4Settings").msgclass - Workload::CJISSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.CJISSettings").msgclass - Workload::FedrampHighSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.FedrampHighSettings").msgclass - Workload::FedrampModerateSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.FedrampModerateSettings").msgclass - Workload::ResourceSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.ResourceSettings").msgclass - Workload::SaaEnrollmentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse").msgclass - Workload::SaaEnrollmentResponse::SetupState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse.SetupState").enummodule - Workload::SaaEnrollmentResponse::SetupError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse.SetupError").enummodule - Workload::ComplianceRegime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.ComplianceRegime").enummodule - Workload::KajEnrollmentState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.Workload.KajEnrollmentState").enummodule - CreateWorkloadOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1beta1.CreateWorkloadOperationMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_v1beta1_services_pb.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_v1beta1_services_pb.rb deleted file mode 100644 index 7ab630e6c821..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_v1beta1_services_pb.rb +++ /dev/null @@ -1,58 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/assuredworkloads/v1beta1/assuredworkloads_v1beta1.proto for package 'Google.Cloud.AssuredWorkloads.V1beta1' -# Original file comments: -# Copyright 2021 Google LLC -# -# 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 'grpc' -require 'google/cloud/assuredworkloads/v1beta1/assuredworkloads_v1beta1_pb' - -module Google - module Cloud - module AssuredWorkloads - module V1beta1 - module AssuredWorkloadsService - # Service to manage AssuredWorkloads. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService' - - # Creates Assured Workload. - rpc :CreateWorkload, ::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest, ::Google::Longrunning::Operation - # Updates an existing workload. - # Currently allows updating of workload display_name and labels. - # For force updates don't set etag field in the Workload. - # Only one update operation per workload can be in progress. - rpc :UpdateWorkload, ::Google::Cloud::AssuredWorkloads::V1beta1::UpdateWorkloadRequest, ::Google::Cloud::AssuredWorkloads::V1beta1::Workload - # Deletes the workload. Make sure that workload's direct children are already - # in a deleted state, otherwise the request will fail with a - # FAILED_PRECONDITION error. - rpc :DeleteWorkload, ::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest, ::Google::Protobuf::Empty - # Gets Assured Workload associated with a CRM Node - rpc :GetWorkload, ::Google::Cloud::AssuredWorkloads::V1beta1::GetWorkloadRequest, ::Google::Cloud::AssuredWorkloads::V1beta1::Workload - # Lists Assured Workloads under a CRM Node. - rpc :ListWorkloads, ::Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsRequest, ::Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/README.md b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/README.md deleted file mode 100644 index f9172a238836..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Assured Workloads for Government V1beta1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 9ddb009f0a51..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2021 Google LLC -# -# 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/resource.rb deleted file mode 100644 index 0713a1d7e161..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,283 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2021 Google LLC -# -# 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # name_descriptor: { - # pattern: "projects/{project}/topics/{topic}" - # parent_type: "cloudresourcemanager.googleapis.com/Project" - # parent_name_extractor: "projects/{project}" - # } - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # name_descriptor: - # - pattern: "projects/{project}/topics/{topic}" - # parent_type: "cloudresourcemanager.googleapis.com/Project" - # parent_name_extractor: "projects/{project}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # name_descriptor: { - # pattern: "projects/{project}/logs/{log}" - # parent_type: "cloudresourcemanager.googleapis.com/Project" - # parent_name_extractor: "projects/{project}" - # } - # name_descriptor: { - # pattern: "folders/{folder}/logs/{log}" - # parent_type: "cloudresourcemanager.googleapis.com/Folder" - # parent_name_extractor: "folders/{folder}" - # } - # name_descriptor: { - # pattern: "organizations/{organization}/logs/{log}" - # parent_type: "cloudresourcemanager.googleapis.com/Organization" - # parent_name_extractor: "organizations/{organization}" - # } - # name_descriptor: { - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # parent_type: "billing.googleapis.com/BillingAccount" - # parent_name_extractor: "billingAccounts/{billing_account}" - # } - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # name_descriptor: - # - pattern: "projects/{project}/logs/{log}" - # parent_type: "cloudresourcemanager.googleapis.com/Project" - # parent_name_extractor: "projects/{project}" - # - pattern: "folders/{folder}/logs/{log}" - # parent_type: "cloudresourcemanager.googleapis.com/Folder" - # parent_name_extractor: "folders/{folder}" - # - pattern: "organizations/{organization}/logs/{log}" - # parent_type: "cloudresourcemanager.googleapis.com/Organization" - # parent_name_extractor: "organizations/{organization}" - # - pattern: "billingAccounts/{billing_account}/logs/{log}" - # parent_type: "billing.googleapis.com/BillingAccount" - # parent_name_extractor: "billingAccounts/{billing_account}" - # - # For flexible resources, the resource name doesn't contain parent names, but - # the resource itself has parents for policy evaluation. - # - # Example: - # - # message Shelf { - # option (google.api.resource) = { - # type: "library.googleapis.com/Shelf" - # name_descriptor: { - # pattern: "shelves/{shelf}" - # parent_type: "cloudresourcemanager.googleapis.com/Project" - # } - # name_descriptor: { - # pattern: "shelves/{shelf}" - # parent_type: "cloudresourcemanager.googleapis.com/Folder" - # } - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'library.googleapis.com/Shelf' - # name_descriptor: - # - pattern: "shelves/{shelf}" - # parent_type: "cloudresourcemanager.googleapis.com/Project" - # - pattern: "shelves/{shelf}" - # parent_type: "cloudresourcemanager.googleapis.com/Folder" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same - # concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/cloud/assuredworkloads/v1beta1/assuredworkloads_v1beta1.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/cloud/assuredworkloads/v1beta1/assuredworkloads_v1beta1.rb deleted file mode 100644 index 793cb0598202..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/cloud/assuredworkloads/v1beta1/assuredworkloads_v1beta1.rb +++ /dev/null @@ -1,450 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2021 Google LLC -# -# 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AssuredWorkloads - module V1beta1 - # Request for creating a workload. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the new Workload's parent. - # Must be of the form `organizations/{org_id}/locations/{location_id}`. - # @!attribute [rw] workload - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload] - # Required. Assured Workload to create - # @!attribute [rw] external_id - # @return [::String] - # Optional. A identifier associated with the workload and underlying projects - # which allows for the break down of billing costs for a workload. The value - # provided for the identifier will add a label to the workload and contained - # projects with the identifier as the value. - class CreateWorkloadRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for Updating a workload. - # @!attribute [rw] workload - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload] - # Required. The workload to update. - # The workload’s `name` field is used to identify the workload to be updated. - # Format: - # organizations/\\{org_id}/locations/\\{location_id}/workloads/\\{workload_id} - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The list of fields to be updated. - class UpdateWorkloadRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for deleting a Workload. - # @!attribute [rw] name - # @return [::String] - # Required. The `name` field is used to identify the workload. - # Format: - # organizations/\\{org_id}/locations/\\{location_id}/workloads/\\{workload_id} - # @!attribute [rw] etag - # @return [::String] - # Optional. The etag of the workload. - # If this is provided, it must match the server's etag. - class DeleteWorkloadRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for fetching a workload. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the Workload to fetch. This is the - # workloads's relative path in the API, formatted as - # "organizations/\\{organization_id}/locations/\\{location_id}/workloads/\\{workload_id}". - # For example, - # "organizations/123/locations/us-east1/workloads/assured-workload-1". - class GetWorkloadRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for fetching workloads in an organization. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent Resource to list workloads from. - # Must be of the form `organizations/{org_id}/locations/{location}`. - # @!attribute [rw] page_size - # @return [::Integer] - # Page size. - # @!attribute [rw] page_token - # @return [::String] - # Page token returned from previous request. Page token contains context from - # previous request. Page token needs to be passed in the second and following - # requests. - # @!attribute [rw] filter - # @return [::String] - # A custom filter for filtering by properties of a workload. At this time, - # only filtering by labels is supported. - class ListWorkloadsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response of ListWorkloads endpoint. - # @!attribute [rw] workloads - # @return [::Array<::Google::Cloud::AssuredWorkloads::V1beta1::Workload>] - # List of Workloads under a given parent. - # @!attribute [rw] next_page_token - # @return [::String] - # The next page token. Return empty if reached the last page. - class ListWorkloadsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An Workload object for managing highly regulated workloads of cloud - # customers. - # @!attribute [rw] name - # @return [::String] - # Optional. The resource name of the workload. - # Format: - # organizations/\\{organization}/locations/\\{location}/workloads/\\{workload} - # - # Read-only. - # @!attribute [rw] display_name - # @return [::String] - # Required. The user-assigned display name of the Workload. - # When present it must be between 4 to 30 characters. - # Allowed characters are: lowercase and uppercase letters, numbers, - # hyphen, and spaces. - # - # Example: My Workload - # @!attribute [r] resources - # @return [::Array<::Google::Cloud::AssuredWorkloads::V1beta1::Workload::ResourceInfo>] - # Output only. The resources associated with this workload. - # These resources will be created when creating the workload. - # If any of the projects already exist, the workload creation will fail. - # Always read only. - # @!attribute [rw] compliance_regime - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::ComplianceRegime] - # Required. Immutable. Compliance Regime associated with this workload. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Immutable. The Workload creation timestamp. - # @!attribute [rw] billing_account - # @return [::String] - # Input only. The billing account used for the resources which are - # direct children of workload. This billing account is initially associated - # with the resources created as part of Workload creation. - # After the initial creation of these resources, the customer can change - # the assigned billing account. - # The resource name has the form - # `billingAccounts/{billing_account_id}`. For example, - # `billingAccounts/012345-567890-ABCDEF`. - # @!attribute [rw] il4_settings - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::IL4Settings] - # Required. Input only. Immutable. Settings specific to resources needed - # for IL4. - # @!attribute [rw] cjis_settings - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::CJISSettings] - # Required. Input only. Immutable. Settings specific to resources needed - # for CJIS. - # @!attribute [rw] fedramp_high_settings - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::FedrampHighSettings] - # Required. Input only. Immutable. Settings specific to resources needed - # for FedRAMP High. - # @!attribute [rw] fedramp_moderate_settings - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::FedrampModerateSettings] - # Required. Input only. Immutable. Settings specific to resources needed - # for FedRAMP Moderate. - # @!attribute [rw] etag - # @return [::String] - # Optional. ETag of the workload, it is calculated on the basis - # of the Workload contents. It will be used in Update & Delete operations. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Labels applied to the workload. - # @!attribute [rw] provisioned_resources_parent - # @return [::String] - # Input only. The parent resource for the resources managed by this Assured - # Workload. May be either empty or a folder resource which is a child of the - # Workload parent. If not specified all resources are created under the - # parent organization. - # Format: - # folders/\\{folder_id} - # @!attribute [rw] kms_settings - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::KMSSettings] - # Input only. Settings used to create a CMEK crypto key. When set a project - # with a KMS CMEK key is provisioned. This field is mandatory for a subset of - # Compliance Regimes. - # @!attribute [rw] resource_settings - # @return [::Array<::Google::Cloud::AssuredWorkloads::V1beta1::Workload::ResourceSettings>] - # Input only. Resource properties that are used to customize workload - # resources. These properties (such as custom project id) will be used to - # create workload resources if possible. This field is optional. - # @!attribute [r] kaj_enrollment_state - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::KajEnrollmentState] - # Output only. Represents the KAJ enrollment state of the given workload. - # @!attribute [rw] enable_sovereign_controls - # @return [::Boolean] - # Optional. Indicates the sovereignty status of the given workload. - # Currently meant to be used by Europe/Canada customers. - # @!attribute [r] saa_enrollment_response - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::SaaEnrollmentResponse] - # Output only. Represents the SAA enrollment response of the given workload. - # SAA enrollment response is queried during GetWorkload call. - # In failure cases, user friendly error message is shown in SAA details page. - class Workload - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represent the resources that are children of this Workload. - # @!attribute [rw] resource_id - # @return [::Integer] - # Resource identifier. - # For a project this represents project_number. - # @!attribute [rw] resource_type - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::ResourceInfo::ResourceType] - # Indicates the type of resource. - class ResourceInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of resource. - module ResourceType - # Unknown resource type. - RESOURCE_TYPE_UNSPECIFIED = 0 - - # Deprecated. Existing workloads will continue to support this, but new - # CreateWorkloadRequests should not specify this as an input value. - CONSUMER_PROJECT = 1 - - # Consumer Folder. - CONSUMER_FOLDER = 4 - - # Consumer project containing encryption keys. - ENCRYPTION_KEYS_PROJECT = 2 - - # Keyring resource that hosts encryption keys. - KEYRING = 3 - end - end - - # Settings specific to the Key Management Service. - # @!attribute [rw] next_rotation_time - # @return [::Google::Protobuf::Timestamp] - # Required. Input only. Immutable. The time at which the Key Management - # Service will automatically create a new version of the crypto key and - # mark it as the primary. - # @!attribute [rw] rotation_period - # @return [::Google::Protobuf::Duration] - # Required. Input only. Immutable. [next_rotation_time] will be advanced by - # this period when the Key Management Service automatically rotates a key. - # Must be at least 24 hours and at most 876,000 hours. - class KMSSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings specific to resources needed for IL4. - # @!attribute [rw] kms_settings - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::KMSSettings] - # Required. Input only. Immutable. Settings used to create a CMEK crypto - # key. - class IL4Settings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings specific to resources needed for CJIS. - # @!attribute [rw] kms_settings - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::KMSSettings] - # Required. Input only. Immutable. Settings used to create a CMEK crypto - # key. - class CJISSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings specific to resources needed for FedRAMP High. - # @!attribute [rw] kms_settings - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::KMSSettings] - # Required. Input only. Immutable. Settings used to create a CMEK crypto - # key. - class FedrampHighSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings specific to resources needed for FedRAMP Moderate. - # @!attribute [rw] kms_settings - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::KMSSettings] - # Required. Input only. Immutable. Settings used to create a CMEK crypto - # key. - class FedrampModerateSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represent the custom settings for the resources to be created. - # @!attribute [rw] resource_id - # @return [::String] - # Resource identifier. - # For a project this represents project_id. If the project is already - # taken, the workload creation will fail. - # @!attribute [rw] resource_type - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::ResourceInfo::ResourceType] - # Indicates the type of resource. This field should be specified to - # correspond the id to the right project type (CONSUMER_PROJECT or - # ENCRYPTION_KEYS_PROJECT) - # @!attribute [rw] display_name - # @return [::String] - # User-assigned resource display name. - # If not empty it will be used to create a resource with the specified - # name. - class ResourceSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Signed Access Approvals (SAA) enrollment response. - # @!attribute [rw] setup_status - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::SaaEnrollmentResponse::SetupState] - # Indicates SAA enrollment status of a given workload. - # @!attribute [rw] setup_errors - # @return [::Array<::Google::Cloud::AssuredWorkloads::V1beta1::Workload::SaaEnrollmentResponse::SetupError>] - # Indicates SAA enrollment setup error if any. - class SaaEnrollmentResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Setup state of SAA enrollment. - module SetupState - # Unspecified. - SETUP_STATE_UNSPECIFIED = 0 - - # SAA enrollment pending. - STATUS_PENDING = 1 - - # SAA enrollment comopleted. - STATUS_COMPLETE = 2 - end - - # Setup error of SAA enrollment. - module SetupError - # Unspecified. - SETUP_ERROR_UNSPECIFIED = 0 - - # Invalid states for all customers, to be redirected to AA UI for - # additional details. - ERROR_INVALID_BASE_SETUP = 1 - - # Returned when there is not an EKM key configured. - ERROR_MISSING_EXTERNAL_SIGNING_KEY = 2 - - # Returned when there are no enrolled services or the customer is - # enrolled in CAA only for a subset of services. - ERROR_NOT_ALL_SERVICES_ENROLLED = 3 - - # Returned when exception was encountered during evaluation of other - # criteria. - ERROR_SETUP_CHECK_FAILED = 4 - end - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Supported Compliance Regimes. - module ComplianceRegime - # Unknown compliance regime. - COMPLIANCE_REGIME_UNSPECIFIED = 0 - - # Information protection as per DoD IL4 requirements. - IL4 = 1 - - # Criminal Justice Information Services (CJIS) Security policies. - CJIS = 2 - - # FedRAMP High data protection controls - FEDRAMP_HIGH = 3 - - # FedRAMP Moderate data protection controls - FEDRAMP_MODERATE = 4 - - # Assured Workloads For US Regions data protection controls - US_REGIONAL_ACCESS = 5 - - # Health Insurance Portability and Accountability Act controls - HIPAA = 6 - - # Health Information Trust Alliance controls - HITRUST = 7 - - # Assured Workloads For EU Regions and Support controls - EU_REGIONS_AND_SUPPORT = 8 - - # Assured Workloads For Canada Regions and Support controls - CA_REGIONS_AND_SUPPORT = 9 - end - - # Key Access Justifications(KAJ) Enrollment State. - module KajEnrollmentState - # Default State for KAJ Enrollment. - KAJ_ENROLLMENT_STATE_UNSPECIFIED = 0 - - # Pending State for KAJ Enrollment. - KAJ_ENROLLMENT_STATE_PENDING = 1 - - # Complete State for KAJ Enrollment. - KAJ_ENROLLMENT_STATE_COMPLETE = 2 - end - end - - # Operation metadata to give request details of CreateWorkload. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Optional. Time when the operation was created. - # @!attribute [rw] display_name - # @return [::String] - # Optional. The display name of the workload. - # @!attribute [rw] parent - # @return [::String] - # Optional. The parent of the workload. - # @!attribute [rw] compliance_regime - # @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::ComplianceRegime] - # Optional. Compliance controls that should be applied to the resources - # managed by the workload. - # @!attribute [rw] resource_settings - # @return [::Array<::Google::Cloud::AssuredWorkloads::V1beta1::Workload::ResourceSettings>] - # Optional. Resource properties in the input that are used for - # creating/customizing workload resources. - class CreateWorkloadOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index c65b21dd747b..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,164 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2021 Google LLC -# -# 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # 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}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # 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. - # @!attribute [rw] done - # @return [::Boolean] - # 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. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # 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`. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc LongRunningRecognize(LongRunningRecognizeRequest) - # returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "LongRunningRecognizeResponse" - # metadata_type: "LongRunningRecognizeMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index a5f7a19a2355..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,141 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2021 Google LLC -# -# 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index dcc4a8a3c05b..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2021 Google LLC -# -# 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 27b56213efda..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2021 Google LLC -# -# 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # 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::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 3db2d8f80bab..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2021 Google LLC -# -# 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index fb9d03c73c8d..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,129 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2021 Google LLC -# -# 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/rpc/status.rb deleted file mode 100644 index 5959350b78a1..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2021 Google LLC -# -# 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # 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). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # 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 google.rpc.Status.details} field, or localized by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/Gemfile b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/Gemfile deleted file mode 100644 index 20123d152fe5..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2021 Google LLC -# -# 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-assured_workloads-v1beta1", path: "../" -else - gem "google-cloud-assured_workloads-v1beta1" -end - -group :test do - gem "google-style", "~> 1.25.1" - gem "minitest", "~> 5.14" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/create_workload.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/create_workload.rb deleted file mode 100644 index 87a9ae850a9e..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/create_workload.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2021 Google LLC -# -# 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START assuredworkloads_v1beta1_generated_AssuredWorkloadsService_CreateWorkload_sync] -require "google/cloud/assured_workloads/v1beta1" - -# Create a client object. The client can be reused for multiple calls. -client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new - -# Create a request. To set request fields, pass in keyword arguments. -request = Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest.new - -# Call the create_workload method. -result = client.create_workload request - -# The returned object is of type Gapic::Operation. You can use this -# object to check the status of an operation, cancel it, or wait -# for results. Here is how to block until completion: -result.wait_until_done! timeout: 60 -if result.response? - p result.response -else - puts "Error!" -end -# [END assuredworkloads_v1beta1_generated_AssuredWorkloadsService_CreateWorkload_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/delete_workload.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/delete_workload.rb deleted file mode 100644 index 580dd9ac7004..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/delete_workload.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2021 Google LLC -# -# 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START assuredworkloads_v1beta1_generated_AssuredWorkloadsService_DeleteWorkload_sync] -require "google/cloud/assured_workloads/v1beta1" - -# Create a client object. The client can be reused for multiple calls. -client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new - -# Create a request. To set request fields, pass in keyword arguments. -request = Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest.new - -# Call the delete_workload method. -result = client.delete_workload request - -# The returned object is of type Google::Protobuf::Empty. -p result -# [END assuredworkloads_v1beta1_generated_AssuredWorkloadsService_DeleteWorkload_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/get_workload.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/get_workload.rb deleted file mode 100644 index 462e4fdde8e9..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/get_workload.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2021 Google LLC -# -# 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START assuredworkloads_v1beta1_generated_AssuredWorkloadsService_GetWorkload_sync] -require "google/cloud/assured_workloads/v1beta1" - -# Create a client object. The client can be reused for multiple calls. -client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new - -# Create a request. To set request fields, pass in keyword arguments. -request = Google::Cloud::AssuredWorkloads::V1beta1::GetWorkloadRequest.new - -# Call the get_workload method. -result = client.get_workload request - -# The returned object is of type Google::Cloud::AssuredWorkloads::V1beta1::Workload. -p result -# [END assuredworkloads_v1beta1_generated_AssuredWorkloadsService_GetWorkload_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/list_workloads.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/list_workloads.rb deleted file mode 100644 index 61f4d97b9991..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/list_workloads.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2021 Google LLC -# -# 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START assuredworkloads_v1beta1_generated_AssuredWorkloadsService_ListWorkloads_sync] -require "google/cloud/assured_workloads/v1beta1" - -# Create a client object. The client can be reused for multiple calls. -client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new - -# Create a request. To set request fields, pass in keyword arguments. -request = Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsRequest.new - -# Call the list_workloads method. -result = client.list_workloads request - -# The returned object is of type Gapic::PagedEnumerable. You can -# iterate over all elements by calling #each, and the enumerable -# will lazily make API calls to fetch subsequent pages. Other -# methods are also available for managing paging directly. -result.each do |response| - # Each element is of type ::Google::Cloud::AssuredWorkloads::V1beta1::Workload. - p response -end -# [END assuredworkloads_v1beta1_generated_AssuredWorkloadsService_ListWorkloads_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/update_workload.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/update_workload.rb deleted file mode 100644 index c26dcdf53846..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/snippets/assured_workloads_service/update_workload.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2021 Google LLC -# -# 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START assuredworkloads_v1beta1_generated_AssuredWorkloadsService_UpdateWorkload_sync] -require "google/cloud/assured_workloads/v1beta1" - -# Create a client object. The client can be reused for multiple calls. -client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new - -# Create a request. To set request fields, pass in keyword arguments. -request = Google::Cloud::AssuredWorkloads::V1beta1::UpdateWorkloadRequest.new - -# Call the update_workload method. -result = client.update_workload request - -# The returned object is of type Google::Cloud::AssuredWorkloads::V1beta1::Workload. -p result -# [END assuredworkloads_v1beta1_generated_AssuredWorkloadsService_UpdateWorkload_sync] diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_operations_test.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_operations_test.rb deleted file mode 100644 index 882bee4ce098..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_operations_test.rb +++ /dev/null @@ -1,380 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2021 Google LLC -# -# 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/assuredworkloads/v1beta1/assuredworkloads_v1beta1_pb" -require "google/cloud/assuredworkloads/v1beta1/assuredworkloads_v1beta1_services_pb" -require "google/cloud/assured_workloads/v1beta1/assured_workloads_service" - -class ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - yield @response, @operation if block_given? - - @response - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - Gapic::ServiceStub.stub :new, nil do - client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_paths_test.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_paths_test.rb deleted file mode 100644 index 293b0d01a7fb..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_paths_test.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2021 Google LLC -# -# 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/assured_workloads/v1beta1/assured_workloads_service" - -class ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::ClientPathsTest < Minitest::Test - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, nil do - client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path organization: "value0", location: "value1" - assert_equal "organizations/value0/locations/value1", path - end - end - - def test_workload_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, nil do - client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.workload_path organization: "value0", location: "value1", workload: "value2" - assert_equal "organizations/value0/locations/value1/workloads/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_test.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_test.rb deleted file mode 100644 index ce7ab33cb5dc..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/google/cloud/assured_workloads/v1beta1/assured_workloads_service_test.rb +++ /dev/null @@ -1,394 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2021 Google LLC -# -# 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/assuredworkloads/v1beta1/assuredworkloads_v1beta1_pb" -require "google/cloud/assuredworkloads/v1beta1/assuredworkloads_v1beta1_services_pb" -require "google/cloud/assured_workloads/v1beta1/assured_workloads_service" - -class ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - yield @response, @operation if block_given? - - @response - end - end - - def test_create_workload - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - workload = {} - external_id = "hello world" - - create_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_workload, name - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AssuredWorkloads::V1beta1::Workload), request["workload"] - assert_equal "hello world", request["external_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_workload_client_stub do - # Create client - client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_workload({ parent: parent, workload: workload, external_id: external_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_workload parent: parent, workload: workload, external_id: external_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_workload ::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest.new(parent: parent, workload: workload, external_id: external_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_workload({ parent: parent, workload: workload, external_id: external_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_workload(::Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest.new(parent: parent, workload: workload, external_id: external_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_workload_client_stub.call_rpc_count - end - end - - def test_update_workload - # Create GRPC objects. - grpc_response = ::Google::Cloud::AssuredWorkloads::V1beta1::Workload.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - workload = {} - update_mask = {} - - update_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_workload, name - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::UpdateWorkloadRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AssuredWorkloads::V1beta1::Workload), request["workload"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_workload_client_stub do - # Create client - client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_workload({ workload: workload, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_workload workload: workload, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_workload ::Google::Cloud::AssuredWorkloads::V1beta1::UpdateWorkloadRequest.new(workload: workload, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_workload({ workload: workload, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_workload(::Google::Cloud::AssuredWorkloads::V1beta1::UpdateWorkloadRequest.new(workload: workload, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_workload_client_stub.call_rpc_count - end - end - - def test_delete_workload - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_workload, name - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_workload_client_stub do - # Create client - client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_workload({ name: name, etag: etag }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_workload name: name, etag: etag do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_workload ::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest.new(name: name, etag: etag) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_workload({ name: name, etag: etag }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_workload(::Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest.new(name: name, etag: etag), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_workload_client_stub.call_rpc_count - end - end - - def test_get_workload - # Create GRPC objects. - grpc_response = ::Google::Cloud::AssuredWorkloads::V1beta1::Workload.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_workload, name - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::GetWorkloadRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_workload_client_stub do - # Create client - client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_workload({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_workload name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_workload ::Google::Cloud::AssuredWorkloads::V1beta1::GetWorkloadRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_workload({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_workload(::Google::Cloud::AssuredWorkloads::V1beta1::GetWorkloadRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_workload_client_stub.call_rpc_count - end - end - - def test_list_workloads - # Create GRPC objects. - grpc_response = ::Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_workloads_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_workloads, name - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_workloads_client_stub do - # Create client - client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_workloads({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_workloads parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_workloads ::Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_workloads({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_workloads(::Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_workloads_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - Gapic::ServiceStub.stub :new, nil do - client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client::Configuration, config - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - Gapic::ServiceStub.stub :new, nil do - client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/helper.rb b/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/helper.rb deleted file mode 100644 index 531732166829..000000000000 --- a/owl-bot-staging/google-cloud-assured_workloads-v1beta1/test/helper.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2021 Google LLC -# -# 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "simplecov" - -require "minitest/autorun" -require "minitest/focus" -require "minitest/rg"