Skip to content

Commit

Permalink
Re-generated google-cloud-kms (no significant changes)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation authored and dazuma committed Jan 7, 2019
1 parent 821516d commit 5d1caa2
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 188 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,48 +16,6 @@
module Google
module Iam
module V1
# Request message for `SetIamPolicy` method.
# @!attribute [rw] resource
# @return [String]
# REQUIRED: The resource for which the policy is being specified.
# `resource` is usually specified as a path. For example, a Project
# resource is specified as `projects/{project}`.
# @!attribute [rw] policy
# @return [Google::Iam::V1::Policy]
# REQUIRED: The complete policy to be applied to the `resource`. The size of
# the policy is limited to a few 10s of KB. An empty policy is a
# valid policy but certain Cloud Platform services (such as Projects)
# might reject them.
class SetIamPolicyRequest; end

# Request message for `GetIamPolicy` method.
# @!attribute [rw] resource
# @return [String]
# REQUIRED: The resource for which the policy is being requested.
# `resource` is usually specified as a path. For example, a Project
# resource is specified as `projects/{project}`.
class GetIamPolicyRequest; end

# Request message for `TestIamPermissions` method.
# @!attribute [rw] resource
# @return [String]
# REQUIRED: The resource for which the policy detail is being requested.
# `resource` is usually specified as a path. For example, a Project
# resource is specified as `projects/{project}`.
# @!attribute [rw] permissions
# @return [Array<String>]
# The set of permissions to check for the `resource`. Permissions with
# wildcards (such as '*' or 'storage.*') are not allowed. For more
# information see
# [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
class TestIamPermissionsRequest; end

# Response message for `TestIamPermissions` method.
# @!attribute [rw] permissions
# @return [Array<String>]
# A subset of `TestPermissionsRequest.permissions` that the caller is
# allowed.
class TestIamPermissionsResponse; end
end
end
end
107 changes: 0 additions & 107 deletions google-cloud-kms/lib/google/cloud/kms/v1/doc/google/iam/v1/policy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,113 +16,6 @@
module Google
module Iam
module V1
# Defines an Identity and Access Management (IAM) policy. It is used to
# specify access control policies for Cloud Platform resources.
#
#
# A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
# `members` to a `role`, where the members can be user accounts, Google groups,
# Google domains, and service accounts. A `role` is a named list of permissions
# defined by IAM.
#
# **Example**
#
# {
# "bindings": [
# {
# "role": "roles/owner",
# "members": [
# "user:mike@example.com",
# "group:admins@example.com",
# "domain:google.com",
# "serviceAccount:my-other-app@appspot.gserviceaccount.com",
# ]
# },
# {
# "role": "roles/viewer",
# "members": ["user:sean@example.com"]
# }
# ]
# }
#
# For a description of IAM and its features, see the
# [IAM developer's guide](https://cloud.google.com/iam).
# @!attribute [rw] version
# @return [Integer]
# Version of the `Policy`. The default version is 0.
# @!attribute [rw] bindings
# @return [Array<Google::Iam::V1::Binding>]
# Associates a list of `members` to a `role`.
# Multiple `bindings` must not be specified for the same `role`.
# `bindings` with no members will result in an error.
# @!attribute [rw] etag
# @return [String]
# `etag` is used for optimistic concurrency control as a way to help
# prevent simultaneous updates of a policy from overwriting each other.
# It is strongly suggested that systems make use of the `etag` in the
# read-modify-write cycle to perform policy updates in order to avoid race
# conditions: An `etag` is returned in the response to `getIamPolicy`, and
# systems are expected to put that etag in the request to `setIamPolicy` to
# ensure that their change will be applied to the same version of the policy.
#
# If no `etag` is provided in the call to `setIamPolicy`, then the existing
# policy is overwritten blindly.
class Policy; end

# Associates `members` with a `role`.
# @!attribute [rw] role
# @return [String]
# Role that is assigned to `members`.
# For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
# Required
# @!attribute [rw] members
# @return [Array<String>]
# Specifies the identities requesting access for a Cloud Platform resource.
# `members` can have the following values:
#
# * `allUsers`: A special identifier that represents anyone who is
# on the internet; with or without a Google account.
#
# * `allAuthenticatedUsers`: A special identifier that represents anyone
# who is authenticated with a Google account or a service account.
#
# * `user:{emailid}`: An email address that represents a specific Google
# account. For example, `alice@gmail.com` or `joe@example.com`.
#
#
# * `serviceAccount:{emailid}`: An email address that represents a service
# account. For example, `my-other-app@appspot.gserviceaccount.com`.
#
# * `group:{emailid}`: An email address that represents a Google group.
# For example, `admins@example.com`.
#
# * `domain:{domain}`: A Google Apps domain name that represents all the
# users of that domain. For example, `google.com` or `example.com`.
class Binding; end

# The difference delta between two policies.
# @!attribute [rw] binding_deltas
# @return [Array<Google::Iam::V1::BindingDelta>]
# The delta for Bindings between two policies.
class PolicyDelta; end

# One delta entry for Binding. Each individual change (only one member in each
# entry) to a binding will be a separate entry.
# @!attribute [rw] action
# @return [Google::Iam::V1::BindingDelta::Action]
# The action that was performed on a Binding.
# Required
# @!attribute [rw] role
# @return [String]
# Role that is assigned to `members`.
# For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
# Required
# @!attribute [rw] member
# @return [String]
# A single identity requesting access for a Cloud Platform resource.
# Follows the same format of Binding.members.
# Required
class BindingDelta; end
end
end
end
22 changes: 11 additions & 11 deletions google-cloud-kms/lib/google/cloud/kms/v1/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,6 @@ module Cloud
module Kms
module V1
class KeyManagementServiceClient
# Alias for Google::Cloud::Kms::V1::KeyManagementServiceClient.crypto_key_version_path.
# @param project [String]
# @param location [String]
# @param key_ring [String]
# @param crypto_key [String]
# @param crypto_key_version [String]
# @return [String]
def crypto_key_version_path project, location, key_ring, crypto_key, crypto_key_version
self.class.crypto_key_version_path project, location, key_ring, crypto_key, crypto_key_version
end

# Alias for Google::Cloud::Kms::V1::KeyManagementServiceClient.key_ring_path.
# @param project [String]
# @param location [String]
Expand Down Expand Up @@ -63,6 +52,17 @@ def crypto_key_path project, location, key_ring, crypto_key
def location_path project, location
self.class.location_path project, location
end

# Alias for Google::Cloud::Kms::V1::KeyManagementServiceClient.crypto_key_version_path.
# @param project [String]
# @param location [String]
# @param key_ring [String]
# @param crypto_key [String]
# @param crypto_key_version [String]
# @return [String]
def crypto_key_version_path project, location, key_ring, crypto_key, crypto_key_version
self.class.crypto_key_version_path project, location, key_ring, crypto_key, crypto_key_version
end
end
end
end
Expand Down
33 changes: 19 additions & 14 deletions google-cloud-kms/synth.metadata
Original file line number Diff line number Diff line change
@@ -1,26 +1,31 @@
{
"updateTime": "2019-01-05T00:43:41.416028Z",
"sources": [
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "36f292faa9a7bffae6abef4885a2ec7936dc47a6",
"internalRef": "222122496"
"generator": {
"name": "artman",
"version": "0.16.4",
"dockerImage": "googleapis/artman@sha256:8b45fae963557c3299921037ecbb86f0689f41b1b4aea73408ebc50562cb2857"
}
},
{
"git": {
"name": "googleapis-private",
"remote": "https://github.com/googleapis/googleapis-private.git",
"sha": "05e2ff6ef669808daed3c3b2f97eec514bd18d76",
"internalRef": "222154680"
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "a111a53c0c6722afcd793b64724ceef7862db5b9",
"internalRef": "227896184"
}
},
}
],
"destinations": [
{
"generator": {
"name": "artman",
"version": "0.16.0",
"dockerImage": "googleapis/artman@sha256:90f9d15e9bad675aeecd586725bce48f5667ffe7d5fc4d1e96d51ff34304815b"
"client": {
"source": "googleapis",
"apiName": "kms",
"apiVersion": "v1",
"language": "ruby",
"generator": "gapic",
"config": "google/cloud/kms/artman_cloudkms.yaml"
}
}
]
Expand Down
28 changes: 14 additions & 14 deletions google-cloud-kms/test/google/cloud/kms/v1/helpers_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,6 @@ def updater_proc
describe Google::Cloud::Kms::V1::KeyManagementServiceClient do
let(:mock_credentials) { HelperMockKmsCredentials_v1.new }

describe "the crypto_key_version_path instance method" do
it "correctly calls Google::Cloud::Kms::V1::KeyManagementServiceClient.crypto_key_version_path" do
Google::Cloud::Kms::V1::Credentials.stub(:default, mock_credentials) do
num_args = Google::Cloud::Kms::V1::KeyManagementServiceClient.method("crypto_key_version_path").arity
client = Google::Cloud::Kms.new version: :v1
args = (0...num_args).map { "argument" }
assert_equal(
client.crypto_key_version_path(*args),
Google::Cloud::Kms::V1::KeyManagementServiceClient.crypto_key_version_path(*args)
)
end
end
end

describe "the key_ring_path instance method" do
it "correctly calls Google::Cloud::Kms::V1::KeyManagementServiceClient.key_ring_path" do
Google::Cloud::Kms::V1::Credentials.stub(:default, mock_credentials) do
Expand Down Expand Up @@ -106,4 +92,18 @@ def updater_proc
end
end
end

describe "the crypto_key_version_path instance method" do
it "correctly calls Google::Cloud::Kms::V1::KeyManagementServiceClient.crypto_key_version_path" do
Google::Cloud::Kms::V1::Credentials.stub(:default, mock_credentials) do
num_args = Google::Cloud::Kms::V1::KeyManagementServiceClient.method("crypto_key_version_path").arity
client = Google::Cloud::Kms.new version: :v1
args = (0...num_args).map { "argument" }
assert_equal(
client.crypto_key_version_path(*args),
Google::Cloud::Kms::V1::KeyManagementServiceClient.crypto_key_version_path(*args)
)
end
end
end
end

0 comments on commit 5d1caa2

Please sign in to comment.