regenerate APIs

This commit is contained in:
Steven Bazyl committed 2015-07-30 17:05:47 -07:00
1 parent c9da9f38d1
commit b3daed447d
89 files changed
+2245 -1819

No files matched your search

@@ -135,6 +135,378 @@ module Google
def update!(**args)
end
end
# Request message for `GetIamPolicy` method.
class GetIamPolicyRequest
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
# # Overview The `Policy` defines an access control policy language. It is used
# to define policies that are attached to resources like files, folders, VMs,
# etc. # Policy structure A `Policy` consists of a list of bindings. A `Binding`
# binds a set of members to a role, where the members include user accounts,
# user groups, user domains, and service accounts. A 'role' is a named set of
# permissions, defined by IAM. The definition of a role is outside the policy. A
# permission check first determines the roles that include the specified
# permission, and then determines if the principal specified is a member of a
# binding to at least one of these roles. The membership check is recursive when
# a group is bound to a role. Policy examples: ``` ` "bindings": [ ` "role": "
# roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com",
# "domain:google.com", "serviceAccount:frontend@example.iam.gserviceaccounts.
# com"] `, ` "role": "roles/viewer", "members": ["user:sean@example.com"] ` ] ` `
# ``
class Policy
include Google::Apis::Core::Hashable
# The policy language version. The version of the policy is represented by the
# etag. The default version is 0.
# Corresponds to the JSON property `version`
# @return [Fixnum]
attr_accessor :version
# It is an error to specify multiple bindings for the same role. It is an error
# to specify a binding with no members.
# Corresponds to the JSON property `bindings`
# @return [Array<Google::Apis::CloudresourcemanagerV1beta1::Binding>]
attr_accessor :bindings
#
# Corresponds to the JSON property `rules`
# @return [Array<Google::Apis::CloudresourcemanagerV1beta1::Rule>]
attr_accessor :rules
# Can be used to perform a read-modify-write.
# Corresponds to the JSON property `etag`
# @return [String]
attr_accessor :etag
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@version = args[:version] unless args[:version].nil?
@bindings = args[:bindings] unless args[:bindings].nil?
@rules = args[:rules] unless args[:rules].nil?
@etag = args[:etag] unless args[:etag].nil?
end
end
# Associates members with roles. See below for allowed formats of members.
class Binding
include Google::Apis::Core::Hashable
# The name of the role to which the members should be bound. Examples: "roles/
# viewer", "roles/editor", "roles/owner". Required
# Corresponds to the JSON property `role`
# @return [String]
attr_accessor :role
# Format of member entries: 1. allUsers Matches any requesting principal (users,
# service accounts or anonymous). 2. allAuthenticatedUsers Matches any
# requesting authenticated principal (users or service accounts). 3. user:`
# emailid` A google user account using an email address. For example alice@gmail.
# com, joe@example.com 4. serviceAccount:`emailid` An service account email. 5.
# group:`emailid` A google group with an email address. For example auth-ti-
# cloud@google.com 6. domain:`domain` A Google Apps domain name. For example
# google.com, example.com
# Corresponds to the JSON property `members`
# @return [Array<String>]
attr_accessor :members
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@role = args[:role] unless args[:role].nil?
@members = args[:members] unless args[:members].nil?
end
end
# A rule to be applied in a Policy.
class Rule
include Google::Apis::Core::Hashable
# Human-readable description of the rule.
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
# A permission is a string of form '..' (e.g., 'storage.buckets.list'). A value
# of '*' matches all permissions, and a verb part of '*' (e.g., 'storage.buckets.
# *') matches all verbs.
# Corresponds to the JSON property `permissions`
# @return [Array<String>]
attr_accessor :permissions
# Required
# Corresponds to the JSON property `action`
# @return [String]
attr_accessor :action
# The rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in this set of entries.
# Corresponds to the JSON property `in`
# @return [Array<String>]
attr_accessor :in
# The rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is not in this set of
# entries. The formation for in and not_in entries is the same as members in a
# Binding above.
# Corresponds to the JSON property `notIn`
# @return [Array<String>]
attr_accessor :not_in
# Additional restrictions that must be met
# Corresponds to the JSON property `conditions`
# @return [Array<Google::Apis::CloudresourcemanagerV1beta1::Condition>]
attr_accessor :conditions
# The config returned to callers of tech.iam.IAM.CheckPolicy for any entries
# that match the LOG action.
# Corresponds to the JSON property `logConfig`
# @return [Array<Google::Apis::CloudresourcemanagerV1beta1::LogConfig>]
attr_accessor :log_config
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@description = args[:description] unless args[:description].nil?
@permissions = args[:permissions] unless args[:permissions].nil?
@action = args[:action] unless args[:action].nil?
@in = args[:in] unless args[:in].nil?
@not_in = args[:not_in] unless args[:not_in].nil?
@conditions = args[:conditions] unless args[:conditions].nil?
@log_config = args[:log_config] unless args[:log_config].nil?
end
end
# A condition to be met.
class Condition
include Google::Apis::Core::Hashable
# Trusted attributes supplied by the IAM system.
# Corresponds to the JSON property `iam`
# @return [String]
attr_accessor :iam
# Trusted attributes supplied by any service that owns resources and uses the
# IAM system for access control.
# Corresponds to the JSON property `sys`
# @return [String]
attr_accessor :sys
# Trusted attributes discharged by the service.
# Corresponds to the JSON property `svc`
# @return [String]
attr_accessor :svc
# An operator to apply the subject with.
# Corresponds to the JSON property `op`
# @return [String]
attr_accessor :op
# The object of the condition. Exactly one of these must be set.
# Corresponds to the JSON property `value`
# @return [String]
attr_accessor :value
# The objects of the condition. This is mutually exclusive with 'value'.
# Corresponds to the JSON property `values`
# @return [Array<String>]
attr_accessor :values
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@iam = args[:iam] unless args[:iam].nil?
@sys = args[:sys] unless args[:sys].nil?
@svc = args[:svc] unless args[:svc].nil?
@op = args[:op] unless args[:op].nil?
@value = args[:value] unless args[:value].nil?
@values = args[:values] unless args[:values].nil?
end
end
# Specifies what kind of log the caller must write Increment a streamz counter
# with the specified metric and field names. Metric names should start with a '/'
# , generally be lowercase-only, and end in "_count". Field names should not
# contain an initial slash. The actual exported metric names will have "/iam/
# policy" prepended. Field names correspond to IAM request parameters and field
# values are their respective values. At present only "iam_principal",
# corresponding to IAMContext.principal, is supported. Examples: counter `
# metric: "/debug_access_count" field: "iam_principal" ` ==> increment counter /
# iam/policy/backend_debug_access_count `iam_principal=[value of IAMContext.
# principal]` At this time we do not support: * multiple field names (though
# this may be supported in the future) * decrementing the counter * incrementing
# it by anything other than 1
class LogConfig
include Google::Apis::Core::Hashable
# Options for counters
# Corresponds to the JSON property `counter`
# @return [Google::Apis::CloudresourcemanagerV1beta1::CounterOptions]
attr_accessor :counter
# Write a Data Access (Gin) log
# Corresponds to the JSON property `dataAccess`
# @return [Google::Apis::CloudresourcemanagerV1beta1::DataAccessOptions]
attr_accessor :data_access
# Write a Cloud Audit log
# Corresponds to the JSON property `cloudAudit`
# @return [Google::Apis::CloudresourcemanagerV1beta1::CloudAuditOptions]
attr_accessor :cloud_audit
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@counter = args[:counter] unless args[:counter].nil?
@data_access = args[:data_access] unless args[:data_access].nil?
@cloud_audit = args[:cloud_audit] unless args[:cloud_audit].nil?
end
end
# Options for counters
class CounterOptions
include Google::Apis::Core::Hashable
# The metric to update.
# Corresponds to the JSON property `metric`
# @return [String]
attr_accessor :metric
# The field value to attribute.
# Corresponds to the JSON property `field`
# @return [String]
attr_accessor :field
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@metric = args[:metric] unless args[:metric].nil?
@field = args[:field] unless args[:field].nil?
end
end
# Write a Data Access (Gin) log
class DataAccessOptions
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
# Write a Cloud Audit log
class CloudAuditOptions
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
# Request message for `SetIamPolicy` method.
class SetIamPolicyRequest
include Google::Apis::Core::Hashable
# # Overview The `Policy` defines an access control policy language. It is used
# to define policies that are attached to resources like files, folders, VMs,
# etc. # Policy structure A `Policy` consists of a list of bindings. A `Binding`
# binds a set of members to a role, where the members include user accounts,
# user groups, user domains, and service accounts. A 'role' is a named set of
# permissions, defined by IAM. The definition of a role is outside the policy. A
# permission check first determines the roles that include the specified
# permission, and then determines if the principal specified is a member of a
# binding to at least one of these roles. The membership check is recursive when
# a group is bound to a role. Policy examples: ``` ` "bindings": [ ` "role": "
# roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com",
# "domain:google.com", "serviceAccount:frontend@example.iam.gserviceaccounts.
# com"] `, ` "role": "roles/viewer", "members": ["user:sean@example.com"] ` ] ` `
# ``
# Corresponds to the JSON property `policy`
# @return [Google::Apis::CloudresourcemanagerV1beta1::Policy]
attr_accessor :policy
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@policy = args[:policy] unless args[:policy].nil?
end
end
# Request message for `TestIamPermissions` method.
class TestIamPermissionsRequest
include Google::Apis::Core::Hashable
# The set of permissions to check for the 'resource'. Permissions with wildcards
# (such as '*' or 'storage.*') are not allowed.
# Corresponds to the JSON property `permissions`
# @return [Array<String>]
attr_accessor :permissions
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@permissions = args[:permissions] unless args[:permissions].nil?
end
end
# Response message for `TestIamPermissions` method.
class TestIamPermissionsResponse
include Google::Apis::Core::Hashable
# A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
# Corresponds to the JSON property `permissions`
# @return [Array<String>]
attr_accessor :permissions
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@permissions = args[:permissions] unless args[:permissions].nil?
end
end
end
end
end
@@ -34,6 +34,54 @@ module Google
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class GetIamPolicyRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Policy
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Binding
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Rule
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Condition
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class LogConfig
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class CounterOptions
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class DataAccessOptions
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class CloudAuditOptions
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class SetIamPolicyRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class TestIamPermissionsRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class TestIamPermissionsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
end
class Project
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@@ -60,6 +108,113 @@ module Google
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class GetIamPolicyRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class Policy
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :version, as: 'version'
collection :bindings, as: 'bindings', class: Google::Apis::CloudresourcemanagerV1beta1::Binding, decorator: Google::Apis::CloudresourcemanagerV1beta1::Binding::Representation
collection :rules, as: 'rules', class: Google::Apis::CloudresourcemanagerV1beta1::Rule, decorator: Google::Apis::CloudresourcemanagerV1beta1::Rule::Representation
property :etag, :base64 => true, as: 'etag'
end
end
class Binding
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :role, as: 'role'
collection :members, as: 'members'
end
end
class Rule
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :description, as: 'description'
collection :permissions, as: 'permissions'
property :action, as: 'action'
collection :in, as: 'in'
collection :not_in, as: 'notIn'
collection :conditions, as: 'conditions', class: Google::Apis::CloudresourcemanagerV1beta1::Condition, decorator: Google::Apis::CloudresourcemanagerV1beta1::Condition::Representation
collection :log_config, as: 'logConfig', class: Google::Apis::CloudresourcemanagerV1beta1::LogConfig, decorator: Google::Apis::CloudresourcemanagerV1beta1::LogConfig::Representation
end
end
class Condition
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :iam, as: 'iam'
property :sys, as: 'sys'
property :svc, as: 'svc'
property :op, as: 'op'
property :value, as: 'value'
collection :values, as: 'values'
end
end
class LogConfig
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :counter, as: 'counter', class: Google::Apis::CloudresourcemanagerV1beta1::CounterOptions, decorator: Google::Apis::CloudresourcemanagerV1beta1::CounterOptions::Representation
property :data_access, as: 'dataAccess', class: Google::Apis::CloudresourcemanagerV1beta1::DataAccessOptions, decorator: Google::Apis::CloudresourcemanagerV1beta1::DataAccessOptions::Representation
property :cloud_audit, as: 'cloudAudit', class: Google::Apis::CloudresourcemanagerV1beta1::CloudAuditOptions, decorator: Google::Apis::CloudresourcemanagerV1beta1::CloudAuditOptions::Representation
end
end
class CounterOptions
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :metric, as: 'metric'
property :field, as: 'field'
end
end
class DataAccessOptions
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class CloudAuditOptions
# @private
class Representation < Google::Apis::Core::JsonRepresentation
end
end
class SetIamPolicyRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :policy, as: 'policy', class: Google::Apis::CloudresourcemanagerV1beta1::Policy, decorator: Google::Apis::CloudresourcemanagerV1beta1::Policy::Representation
end
end
class TestIamPermissionsRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :permissions, as: 'permissions'
end
end
class TestIamPermissionsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :permissions, as: 'permissions'
end
end
end
end
end
@@ -288,6 +288,115 @@ module Google
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Returns the IAM access control policy for specified project.
# @param [String] resource
# REQUIRED: The resource for which policy is being requested. Resource is
# usually specified as a path, such as, projects/`project`.
# @param [Google::Apis::CloudresourcemanagerV1beta1::GetIamPolicyRequest] get_iam_policy_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Policy] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1beta1::Policy]
#
# @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_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
path = 'v1beta1/projects/{resource}:getIamPolicy'
command = make_simple_command(:post, path, options)
command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::GetIamPolicyRequest::Representation
command.request_object = get_iam_policy_request_object
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Policy::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Policy
command.params['resource'] = resource unless resource.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Sets the IAM access control policy for the specified project. We do not
# currently support 'domain:' prefixed members in a Binding of a Policy. Calling
# this method requires enabling the App Engine Admin API.
# @param [String] resource
# REQUIRED: The resource for which policy is being specified. Resource is
# usually specified as a path, such as, projects/`project`/zones/`zone`/disks/`
# disk`.
# @param [Google::Apis::CloudresourcemanagerV1beta1::SetIamPolicyRequest] set_iam_policy_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Policy] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1beta1::Policy]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def set_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
path = 'v1beta1/projects/{resource}:setIamPolicy'
command = make_simple_command(:post, path, options)
command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::SetIamPolicyRequest::Representation
command.request_object = set_iam_policy_request_object
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Policy::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Policy
command.params['resource'] = resource unless resource.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Tests the specified permissions against the IAM access control policy for the
# specified project.
# @param [String] resource
# REQUIRED: The resource for which policy detail is being requested. Resource is
# usually specified as a path, such as, projects/`project`.
# @param [Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsRequest] test_iam_permissions_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def test_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
path = 'v1beta1/projects/{resource}:testIamPermissions'
command = make_simple_command(:post, path, options)
command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsRequest::Representation
command.request_object = test_iam_permissions_request_object
command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsResponse::Representation
command.response_class = Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsResponse
command.params['resource'] = resource unless resource.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
protected