Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Automated regeneration of iam v1 client #1567

Merged
merged 1 commit into from Nov 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 18 additions & 0 deletions api_names_out.yaml
Expand Up @@ -111588,6 +111588,14 @@
"/iam:v1/ListServiceAccountsResponse/accounts": accounts
"/iam:v1/ListServiceAccountsResponse/accounts/account": account
"/iam:v1/ListServiceAccountsResponse/nextPageToken": next_page_token
"/iam:v1/Operation": operation
"/iam:v1/Operation/done": done
"/iam:v1/Operation/error": error
"/iam:v1/Operation/metadata": metadata
"/iam:v1/Operation/metadata/metadatum": metadatum
"/iam:v1/Operation/name": name
"/iam:v1/Operation/response": response
"/iam:v1/Operation/response/response": response
"/iam:v1/PatchServiceAccountRequest": patch_service_account_request
"/iam:v1/PatchServiceAccountRequest/serviceAccount": service_account
"/iam:v1/PatchServiceAccountRequest/updateMask": update_mask
Expand Down Expand Up @@ -111679,6 +111687,12 @@
"/iam:v1/SignJwtResponse": sign_jwt_response
"/iam:v1/SignJwtResponse/keyId": key_id
"/iam:v1/SignJwtResponse/signedJwt": signed_jwt
"/iam:v1/Status": status
"/iam:v1/Status/code": code
"/iam:v1/Status/details": details
"/iam:v1/Status/details/detail": detail
"/iam:v1/Status/details/detail/detail": detail
"/iam:v1/Status/message": message
"/iam:v1/TestIamPermissionsRequest": test_iam_permissions_request
"/iam:v1/TestIamPermissionsRequest/permissions": permissions
"/iam:v1/TestIamPermissionsRequest/permissions/permission": permission
Expand Down Expand Up @@ -111714,6 +111728,10 @@
"/iam:v1/iam.organizations.roles.undelete": undelete_organization_role
"/iam:v1/iam.organizations.roles.undelete/name": name
"/iam:v1/iam.permissions.queryTestablePermissions": query_testable_permissions
"/iam:v1/iam.projects.locations.workloadIdentityPools.operations.get": get_project_location_workload_identity_pool_operation
"/iam:v1/iam.projects.locations.workloadIdentityPools.operations.get/name": name
"/iam:v1/iam.projects.locations.workloadIdentityPools.providers.operations.get": get_project_location_workload_identity_pool_provider_operation
"/iam:v1/iam.projects.locations.workloadIdentityPools.providers.operations.get/name": name
"/iam:v1/iam.projects.roles.create": create_project_role
"/iam:v1/iam.projects.roles.create/parent": parent
"/iam:v1/iam.projects.roles.delete": delete_project_role
Expand Down
2 changes: 1 addition & 1 deletion generated/google/apis/iam_v1.rb
Expand Up @@ -27,7 +27,7 @@ module Apis
# @see https://cloud.google.com/iam/
module IamV1
VERSION = 'V1'
REVISION = '20201029'
REVISION = '20201112'

# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
Expand Down
101 changes: 101 additions & 0 deletions generated/google/apis/iam_v1/classes.rb
Expand Up @@ -656,6 +656,68 @@ def update!(**args)
end
end

# This resource represents a long-running operation that is the result of a
# network API call.
class Operation
include Google::Apis::Core::Hashable

# If the value is `false`, it means the operation is still in progress. If `true`
# , the operation is completed, and either `error` or `response` is available.
# Corresponds to the JSON property `done`
# @return [Boolean]
attr_accessor :done
alias_method :done?, :done

# The `Status` type defines a logical error model that is suitable for different
# programming environments, including REST APIs and RPC APIs. It is used by [
# gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
# data: error code, error message, and error details. You can find out more
# about this error model and how to work with it in the [API Design Guide](https:
# //cloud.google.com/apis/design/errors).
# Corresponds to the JSON property `error`
# @return [Google::Apis::IamV1::Status]
attr_accessor :error

# Service-specific metadata associated with the operation. It typically contains
# progress information and common metadata such as create time. Some services
# might not provide such metadata. Any method that returns a long-running
# operation should document the metadata type, if any.
# Corresponds to the JSON property `metadata`
# @return [Hash<String,Object>]
attr_accessor :metadata

# The server-assigned name, which is only unique within the same service that
# originally returns it. If you use the default HTTP mapping, the `name` should
# be a resource name ending with `operations/`unique_id``.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name

# The normal response of the operation in case of success. If the original
# method returns no data on success, such as `Delete`, the response is `google.
# protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`,
# the response should be the resource. For other methods, the response should
# have the type `XxxResponse`, where `Xxx` is the original method name. For
# example, if the original method name is `TakeSnapshot()`, the inferred
# response type is `TakeSnapshotResponse`.
# Corresponds to the JSON property `response`
# @return [Hash<String,Object>]
attr_accessor :response

def initialize(**args)
update!(**args)
end

# Update properties of this object
def update!(**args)
@done = args[:done] if args.key?(:done)
@error = args[:error] if args.key?(:error)
@metadata = args[:metadata] if args.key?(:metadata)
@name = args[:name] if args.key?(:name)
@response = args[:response] if args.key?(:response)
end
end

# The request for PatchServiceAccount. You can patch only the `display_name` and
# `description` fields. You must use the `update_mask` field to specify which of
# these fields you want to patch. Only the fields specified in the request are
Expand Down Expand Up @@ -1468,6 +1530,45 @@ def update!(**args)
end
end

# The `Status` type defines a logical error model that is suitable for different
# programming environments, including REST APIs and RPC APIs. It is used by [
# gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
# data: error code, error message, and error details. You can find out more
# about this error model and how to work with it in the [API Design Guide](https:
# //cloud.google.com/apis/design/errors).
class Status
include Google::Apis::Core::Hashable

# The status code, which should be an enum value of google.rpc.Code.
# Corresponds to the JSON property `code`
# @return [Fixnum]
attr_accessor :code

# A list of messages that carry the error details. There is a common set of
# message types for APIs to use.
# Corresponds to the JSON property `details`
# @return [Array<Hash<String,Object>>]
attr_accessor :details

# A developer-facing error message, which should be in English. Any user-facing
# error message should be localized and sent in the google.rpc.Status.details
# field, or localized by the client.
# Corresponds to the JSON property `message`
# @return [String]
attr_accessor :message

def initialize(**args)
update!(**args)
end

# Update properties of this object
def update!(**args)
@code = args[:code] if args.key?(:code)
@details = args[:details] if args.key?(:details)
@message = args[:message] if args.key?(:message)
end
end

# Request message for `TestIamPermissions` method.
class TestIamPermissionsRequest
include Google::Apis::Core::Hashable
Expand Down
33 changes: 33 additions & 0 deletions generated/google/apis/iam_v1/representations.rb
Expand Up @@ -142,6 +142,12 @@ class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end

class Operation
class Representation < Google::Apis::Core::JsonRepresentation; end

include Google::Apis::Core::JsonObjectSupport
end

class PatchServiceAccountRequest
class Representation < Google::Apis::Core::JsonRepresentation; end

Expand Down Expand Up @@ -256,6 +262,12 @@ class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end

class Status
class Representation < Google::Apis::Core::JsonRepresentation; end

include Google::Apis::Core::JsonObjectSupport
end

class TestIamPermissionsRequest
class Representation < Google::Apis::Core::JsonRepresentation; end

Expand Down Expand Up @@ -462,6 +474,18 @@ class Representation < Google::Apis::Core::JsonRepresentation
end
end

class Operation
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :done, as: 'done'
property :error, as: 'error', class: Google::Apis::IamV1::Status, decorator: Google::Apis::IamV1::Status::Representation

hash :metadata, as: 'metadata'
property :name, as: 'name'
hash :response, as: 'response'
end
end

class PatchServiceAccountRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
Expand Down Expand Up @@ -647,6 +671,15 @@ class Representation < Google::Apis::Core::JsonRepresentation
end
end

class Status
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :code, as: 'code'
collection :details, as: 'details'
property :message, as: 'message'
end
end

class TestIamPermissionsRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
Expand Down
62 changes: 62 additions & 0 deletions generated/google/apis/iam_v1/service.rb
Expand Up @@ -452,6 +452,68 @@ def query_testable_permissions(query_testable_permissions_request_object = nil,
execute_or_queue_command(command, &block)
end

# Gets the latest state of a long-running operation. Clients can use this method
# to poll the operation result at intervals as recommended by the API service.
# @param [String] name
# The name of the operation resource.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::IamV1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::IamV1::Operation]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_project_location_workload_identity_pool_operation(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+name}', options)
command.response_representation = Google::Apis::IamV1::Operation::Representation
command.response_class = Google::Apis::IamV1::Operation
command.params['name'] = name unless name.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end

# Gets the latest state of a long-running operation. Clients can use this method
# to poll the operation result at intervals as recommended by the API service.
# @param [String] name
# The name of the operation resource.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::IamV1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::IamV1::Operation]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_project_location_workload_identity_pool_provider_operation(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+name}', options)
command.response_representation = Google::Apis::IamV1::Operation::Representation
command.response_class = Google::Apis::IamV1::Operation
command.params['name'] = name unless name.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end

# Creates a new custom Role.
# @param [String] parent
# The `parent` parameter's value depends on the target resource for the request,
Expand Down
2 changes: 1 addition & 1 deletion generated/google/apis/iam_v1/synth.metadata
Expand Up @@ -4,7 +4,7 @@
"git": {
"name": ".",
"remote": "https://github.com/googleapis/google-api-ruby-client.git",
"sha": "64251b516a71bd1bdcc1a7d3ac934182b38a11a7"
"sha": "9130303612a389b31944a2781cd7378460b09d84"
}
}
]
Expand Down