google-api-ruby-client/generated/google/apis/clouduseraccounts_alpha/classes.rb

1189 lines
45 KiB
Ruby

# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module ClouduseraccountsAlpha
# Enables "data access" audit logging for a service and specifies a list of
# members that are log-exempted.
class AuditConfig
include Google::Apis::Core::Hashable
# Specifies the identities that are exempted from "data access" audit logging
# for the `service` specified above. Follows the same format of Binding.members.
# Corresponds to the JSON property `exemptedMembers`
# @return [Array<String>]
attr_accessor :exempted_members
# Specifies a service that will be enabled for "data access" audit logging. For
# example, `resourcemanager`, `storage`, `compute`. `allServices` is a special
# value that covers all services.
# Corresponds to the JSON property `service`
# @return [String]
attr_accessor :service
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@exempted_members = args[:exempted_members] if args.key?(:exempted_members)
@service = args[:service] if args.key?(:service)
end
end
# A list of authorized public keys for a user account.
class AuthorizedKeysView
include Google::Apis::Core::Hashable
# [Output Only] The list of authorized public keys in SSH format.
# Corresponds to the JSON property `keys`
# @return [Array<String>]
attr_accessor :keys
# [Output Only] Whether the user has the ability to elevate on the instance that
# requested the authorized keys.
# Corresponds to the JSON property `sudoer`
# @return [Boolean]
attr_accessor :sudoer
alias_method :sudoer?, :sudoer
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@keys = args[:keys] if args.key?(:keys)
@sudoer = args[:sudoer] if args.key?(:sudoer)
end
end
# Associates `members` with a `role`.
class Binding
include Google::Apis::Core::Hashable
# 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`.
# Corresponds to the JSON property `members`
# @return [Array<String>]
attr_accessor :members
# Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`
# , or `roles/owner`.
# Corresponds to the JSON property `role`
# @return [String]
attr_accessor :role
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@members = args[:members] if args.key?(:members)
@role = args[:role] if args.key?(:role)
end
end
# 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
# An operator to apply the subject with.
# Corresponds to the JSON property `op`
# @return [String]
attr_accessor :op
# Trusted attributes discharged by the service.
# Corresponds to the JSON property `svc`
# @return [String]
attr_accessor :svc
# 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
# 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] if args.key?(:iam)
@op = args[:op] if args.key?(:op)
@svc = args[:svc] if args.key?(:svc)
@sys = args[:sys] if args.key?(:sys)
@value = args[:value] if args.key?(:value)
@values = args[:values] if args.key?(:values)
end
end
# A Group resource.
class Group
include Google::Apis::Core::Hashable
# [Output Only] Creation timestamp in RFC3339 text format.
# Corresponds to the JSON property `creationTimestamp`
# @return [String]
attr_accessor :creation_timestamp
# An optional textual description of the resource; provided by the client when
# the resource is created.
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
# [Output Only] Unique identifier for the resource; defined by the server.
# Corresponds to the JSON property `id`
# @return [Fixnum]
attr_accessor :id
# [Output Only] Type of the resource. Always clouduseraccounts#group for groups.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# [Output Only] A list of URLs to User resources who belong to the group. Users
# may only be members of groups in the same project.
# Corresponds to the JSON property `members`
# @return [Array<String>]
attr_accessor :members
# Name of the resource; provided by the client when the resource is created.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# [Output Only] Server defined URL for the resource.
# Corresponds to the JSON property `selfLink`
# @return [String]
attr_accessor :self_link
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@creation_timestamp = args[:creation_timestamp] if args.key?(:creation_timestamp)
@description = args[:description] if args.key?(:description)
@id = args[:id] if args.key?(:id)
@kind = args[:kind] if args.key?(:kind)
@members = args[:members] if args.key?(:members)
@name = args[:name] if args.key?(:name)
@self_link = args[:self_link] if args.key?(:self_link)
end
end
#
class GroupList
include Google::Apis::Core::Hashable
# [Output Only] Unique identifier for the resource; defined by the server.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# [Output Only] A list of Group resources.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::ClouduseraccountsAlpha::Group>]
attr_accessor :items
# [Output Only] Type of resource. Always clouduseraccounts#groupList for lists
# of groups.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# [Output Only] A token used to continue a truncated list request.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
# [Output Only] Server defined URL for this resource.
# Corresponds to the JSON property `selfLink`
# @return [String]
attr_accessor :self_link
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@id = args[:id] if args.key?(:id)
@items = args[:items] if args.key?(:items)
@kind = args[:kind] if args.key?(:kind)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
@self_link = args[:self_link] if args.key?(:self_link)
end
end
#
class GroupsAddMemberRequest
include Google::Apis::Core::Hashable
# Fully-qualified URLs of the User resources to add.
# Corresponds to the JSON property `users`
# @return [Array<String>]
attr_accessor :users
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@users = args[:users] if args.key?(:users)
end
end
#
class GroupsRemoveMemberRequest
include Google::Apis::Core::Hashable
# Fully-qualified URLs of the User resources to remove.
# Corresponds to the JSON property `users`
# @return [Array<String>]
attr_accessor :users
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@users = args[:users] if args.key?(:users)
end
end
# A list of all Linux accounts for this project. This API is only used by
# Compute Engine virtual machines to get information about user accounts for a
# project or instance. Linux resources are read-only views into users and groups
# managed by the Compute Engine Accounts API.
class LinuxAccountViews
include Google::Apis::Core::Hashable
# [Output Only] A list of all groups within a project.
# Corresponds to the JSON property `groupViews`
# @return [Array<Google::Apis::ClouduseraccountsAlpha::LinuxGroupView>]
attr_accessor :group_views
# [Output Only] Type of the resource. Always clouduseraccounts#linuxAccountViews
# for Linux resources.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# [Output Only] A list of all users within a project.
# Corresponds to the JSON property `userViews`
# @return [Array<Google::Apis::ClouduseraccountsAlpha::LinuxUserView>]
attr_accessor :user_views
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@group_views = args[:group_views] if args.key?(:group_views)
@kind = args[:kind] if args.key?(:kind)
@user_views = args[:user_views] if args.key?(:user_views)
end
end
#
class LinuxGetAuthorizedKeysViewResponse
include Google::Apis::Core::Hashable
# A list of authorized public keys for a user account.
# Corresponds to the JSON property `resource`
# @return [Google::Apis::ClouduseraccountsAlpha::AuthorizedKeysView]
attr_accessor :resource
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@resource = args[:resource] if args.key?(:resource)
end
end
#
class LinuxGetLinuxAccountViewsResponse
include Google::Apis::Core::Hashable
# A list of all Linux accounts for this project. This API is only used by
# Compute Engine virtual machines to get information about user accounts for a
# project or instance. Linux resources are read-only views into users and groups
# managed by the Compute Engine Accounts API.
# Corresponds to the JSON property `resource`
# @return [Google::Apis::ClouduseraccountsAlpha::LinuxAccountViews]
attr_accessor :resource
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@resource = args[:resource] if args.key?(:resource)
end
end
# A detailed view of a Linux group.
class LinuxGroupView
include Google::Apis::Core::Hashable
# [Output Only] The Group ID.
# Corresponds to the JSON property `gid`
# @return [Fixnum]
attr_accessor :gid
# [Output Only] Group name.
# Corresponds to the JSON property `groupName`
# @return [String]
attr_accessor :group_name
# [Output Only] List of user accounts that belong to the group.
# 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)
@gid = args[:gid] if args.key?(:gid)
@group_name = args[:group_name] if args.key?(:group_name)
@members = args[:members] if args.key?(:members)
end
end
# A detailed view of a Linux user account.
class LinuxUserView
include Google::Apis::Core::Hashable
# [Output Only] The GECOS (user information) entry for this account.
# Corresponds to the JSON property `gecos`
# @return [String]
attr_accessor :gecos
# [Output Only] User's default group ID.
# Corresponds to the JSON property `gid`
# @return [Fixnum]
attr_accessor :gid
# [Output Only] The path to the home directory for this account.
# Corresponds to the JSON property `homeDirectory`
# @return [String]
attr_accessor :home_directory
# [Output Only] The path to the login shell for this account.
# Corresponds to the JSON property `shell`
# @return [String]
attr_accessor :shell
# [Output Only] User ID.
# Corresponds to the JSON property `uid`
# @return [Fixnum]
attr_accessor :uid
# [Output Only] The username of the account.
# Corresponds to the JSON property `username`
# @return [String]
attr_accessor :username
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@gecos = args[:gecos] if args.key?(:gecos)
@gid = args[:gid] if args.key?(:gid)
@home_directory = args[:home_directory] if args.key?(:home_directory)
@shell = args[:shell] if args.key?(:shell)
@uid = args[:uid] if args.key?(:uid)
@username = args[:username] if args.key?(:username)
end
end
# Specifies what kind of log the caller must write
class LogConfig
include Google::Apis::Core::Hashable
# Options for counters
# Corresponds to the JSON property `counter`
# @return [Google::Apis::ClouduseraccountsAlpha::LogConfigCounterOptions]
attr_accessor :counter
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@counter = args[:counter] if args.key?(:counter)
end
end
# Options for counters
class LogConfigCounterOptions
include Google::Apis::Core::Hashable
# The field value to attribute.
# Corresponds to the JSON property `field`
# @return [String]
attr_accessor :field
# The metric to update.
# Corresponds to the JSON property `metric`
# @return [String]
attr_accessor :metric
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@field = args[:field] if args.key?(:field)
@metric = args[:metric] if args.key?(:metric)
end
end
# An Operation resource, used to manage asynchronous API requests.
class Operation
include Google::Apis::Core::Hashable
# [Output Only] Reserved for future use.
# Corresponds to the JSON property `clientOperationId`
# @return [String]
attr_accessor :client_operation_id
# [Output Only] Creation timestamp in RFC3339 text format.
# Corresponds to the JSON property `creationTimestamp`
# @return [String]
attr_accessor :creation_timestamp
# [Output Only] A textual description of the operation, which is set when the
# operation is created.
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
# [Output Only] The time that this operation was completed. This value is in
# RFC3339 text format.
# Corresponds to the JSON property `endTime`
# @return [String]
attr_accessor :end_time
# [Output Only] If errors are generated during processing of the operation, this
# field will be populated.
# Corresponds to the JSON property `error`
# @return [Google::Apis::ClouduseraccountsAlpha::Operation::Error]
attr_accessor :error
# [Output Only] If the operation fails, this field contains the HTTP error
# message that was returned, such as NOT FOUND.
# Corresponds to the JSON property `httpErrorMessage`
# @return [String]
attr_accessor :http_error_message
# [Output Only] If the operation fails, this field contains the HTTP error
# status code that was returned. For example, a 404 means the resource was not
# found.
# Corresponds to the JSON property `httpErrorStatusCode`
# @return [Fixnum]
attr_accessor :http_error_status_code
# [Output Only] The unique identifier for the resource. This identifier is
# defined by the server.
# Corresponds to the JSON property `id`
# @return [Fixnum]
attr_accessor :id
# [Output Only] The time that this operation was requested. This value is in
# RFC3339 text format.
# Corresponds to the JSON property `insertTime`
# @return [String]
attr_accessor :insert_time
# [Output Only] Type of the resource. Always compute#operation for Operation
# resources.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# [Output Only] Name of the resource.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# [Output Only] The type of operation, such as insert, update, or delete, and so
# on.
# Corresponds to the JSON property `operationType`
# @return [String]
attr_accessor :operation_type
# [Output Only] An optional progress indicator that ranges from 0 to 100. There
# is no requirement that this be linear or support any granularity of operations.
# This should not be used to guess when the operation will be complete. This
# number should monotonically increase as the operation progresses.
# Corresponds to the JSON property `progress`
# @return [Fixnum]
attr_accessor :progress
# [Output Only] The URL of the region where the operation resides. Only
# available when performing regional operations.
# Corresponds to the JSON property `region`
# @return [String]
attr_accessor :region
# [Output Only] Server-defined URL for the resource.
# Corresponds to the JSON property `selfLink`
# @return [String]
attr_accessor :self_link
# [Output Only] The time that this operation was started by the server. This
# value is in RFC3339 text format.
# Corresponds to the JSON property `startTime`
# @return [String]
attr_accessor :start_time
# [Output Only] The status of the operation, which can be one of the following:
# PENDING, RUNNING, or DONE.
# Corresponds to the JSON property `status`
# @return [String]
attr_accessor :status
# [Output Only] An optional textual description of the current status of the
# operation.
# Corresponds to the JSON property `statusMessage`
# @return [String]
attr_accessor :status_message
# [Output Only] The unique target ID, which identifies a specific incarnation of
# the target resource.
# Corresponds to the JSON property `targetId`
# @return [Fixnum]
attr_accessor :target_id
# [Output Only] The URL of the resource that the operation modifies.
# Corresponds to the JSON property `targetLink`
# @return [String]
attr_accessor :target_link
# [Output Only] User who requested the operation, for example: user@example.com.
# Corresponds to the JSON property `user`
# @return [String]
attr_accessor :user
# [Output Only] If warning messages are generated during processing of the
# operation, this field will be populated.
# Corresponds to the JSON property `warnings`
# @return [Array<Google::Apis::ClouduseraccountsAlpha::Operation::Warning>]
attr_accessor :warnings
# [Output Only] The URL of the zone where the operation resides. Only available
# when performing per-zone operations.
# Corresponds to the JSON property `zone`
# @return [String]
attr_accessor :zone
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@client_operation_id = args[:client_operation_id] if args.key?(:client_operation_id)
@creation_timestamp = args[:creation_timestamp] if args.key?(:creation_timestamp)
@description = args[:description] if args.key?(:description)
@end_time = args[:end_time] if args.key?(:end_time)
@error = args[:error] if args.key?(:error)
@http_error_message = args[:http_error_message] if args.key?(:http_error_message)
@http_error_status_code = args[:http_error_status_code] if args.key?(:http_error_status_code)
@id = args[:id] if args.key?(:id)
@insert_time = args[:insert_time] if args.key?(:insert_time)
@kind = args[:kind] if args.key?(:kind)
@name = args[:name] if args.key?(:name)
@operation_type = args[:operation_type] if args.key?(:operation_type)
@progress = args[:progress] if args.key?(:progress)
@region = args[:region] if args.key?(:region)
@self_link = args[:self_link] if args.key?(:self_link)
@start_time = args[:start_time] if args.key?(:start_time)
@status = args[:status] if args.key?(:status)
@status_message = args[:status_message] if args.key?(:status_message)
@target_id = args[:target_id] if args.key?(:target_id)
@target_link = args[:target_link] if args.key?(:target_link)
@user = args[:user] if args.key?(:user)
@warnings = args[:warnings] if args.key?(:warnings)
@zone = args[:zone] if args.key?(:zone)
end
# [Output Only] If errors are generated during processing of the operation, this
# field will be populated.
class Error
include Google::Apis::Core::Hashable
# [Output Only] The array of errors encountered while processing this operation.
# Corresponds to the JSON property `errors`
# @return [Array<Google::Apis::ClouduseraccountsAlpha::Operation::Error::Error>]
attr_accessor :errors
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@errors = args[:errors] if args.key?(:errors)
end
#
class Error
include Google::Apis::Core::Hashable
# [Output Only] The error type identifier for this error.
# Corresponds to the JSON property `code`
# @return [String]
attr_accessor :code
# [Output Only] Indicates the field in the request that caused the error. This
# property is optional.
# Corresponds to the JSON property `location`
# @return [String]
attr_accessor :location
# [Output Only] An optional, human-readable error message.
# 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)
@location = args[:location] if args.key?(:location)
@message = args[:message] if args.key?(:message)
end
end
end
#
class Warning
include Google::Apis::Core::Hashable
# [Output Only] A warning code, if applicable. For example, Compute Engine
# returns NO_RESULTS_ON_PAGE if there are no results in the response.
# Corresponds to the JSON property `code`
# @return [String]
attr_accessor :code
# [Output Only] Metadata about this warning in key: value format. For example:
# "data": [ ` "key": "scope", "value": "zones/us-east1-d" `
# Corresponds to the JSON property `data`
# @return [Array<Google::Apis::ClouduseraccountsAlpha::Operation::Warning::Datum>]
attr_accessor :data
# [Output Only] A human-readable description of the warning code.
# 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)
@data = args[:data] if args.key?(:data)
@message = args[:message] if args.key?(:message)
end
#
class Datum
include Google::Apis::Core::Hashable
# [Output Only] A key that provides more detail on the warning being returned.
# For example, for warnings where there are no results in a list request for a
# particular zone, this key might be scope and the key value might be the zone
# name. Other examples might be a key indicating a deprecated resource and a
# suggested replacement, or a warning about invalid network settings (for
# example, if an instance attempts to perform IP forwarding but is not enabled
# for IP forwarding).
# Corresponds to the JSON property `key`
# @return [String]
attr_accessor :key
# [Output Only] A warning data value corresponding to the key.
# Corresponds to the JSON property `value`
# @return [String]
attr_accessor :value
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@key = args[:key] if args.key?(:key)
@value = args[:value] if args.key?(:value)
end
end
end
end
# Contains a list of Operation resources.
class OperationList
include Google::Apis::Core::Hashable
# [Output Only] The unique identifier for the resource. This identifier is
# defined by the server.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# [Output Only] A list of Operation resources.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::ClouduseraccountsAlpha::Operation>]
attr_accessor :items
# [Output Only] Type of resource. Always compute#operations for Operations
# resource.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# [Output Only] This token allows you to get the next page of results for list
# requests. If the number of results is larger than maxResults, use the
# nextPageToken as a value for the query parameter pageToken in the next list
# request. Subsequent list requests will have their own nextPageToken to
# continue paging through the results.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
# [Output Only] Server-defined URL for this resource.
# Corresponds to the JSON property `selfLink`
# @return [String]
attr_accessor :self_link
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@id = args[:id] if args.key?(:id)
@items = args[:items] if args.key?(:items)
@kind = args[:kind] if args.key?(:kind)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
@self_link = args[:self_link] if args.key?(:self_link)
end
end
# 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).
class Policy
include Google::Apis::Core::Hashable
# Specifies audit logging configs for "data access". "data access": generally
# refers to data reads/writes and admin reads. "admin activity": generally
# refers to admin writes.
# Note: `AuditConfig` doesn't apply to "admin activity", which always enables
# audit logging.
# Corresponds to the JSON property `auditConfigs`
# @return [Array<Google::Apis::ClouduseraccountsAlpha::AuditConfig>]
attr_accessor :audit_configs
# 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.
# Corresponds to the JSON property `bindings`
# @return [Array<Google::Apis::ClouduseraccountsAlpha::Binding>]
attr_accessor :bindings
# `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.
# Corresponds to the JSON property `etag`
# NOTE: Values are automatically base64 encoded/decoded in the client library.
# @return [String]
attr_accessor :etag
#
# Corresponds to the JSON property `iamOwned`
# @return [Boolean]
attr_accessor :iam_owned
alias_method :iam_owned?, :iam_owned
# If more than one rule is specified, the rules are applied in the following
# manner: - All matching LOG rules are always applied. - If any DENY/
# DENY_WITH_LOG rule matches, permission is denied. Logging will be applied if
# one or more matching rule requires logging. - Otherwise, if any ALLOW/
# ALLOW_WITH_LOG rule matches, permission is granted. Logging will be applied if
# one or more matching rule requires logging. - Otherwise, if no rule applies,
# permission is denied.
# Corresponds to the JSON property `rules`
# @return [Array<Google::Apis::ClouduseraccountsAlpha::Rule>]
attr_accessor :rules
# Version of the `Policy`. The default version is 0.
# Corresponds to the JSON property `version`
# @return [Fixnum]
attr_accessor :version
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@audit_configs = args[:audit_configs] if args.key?(:audit_configs)
@bindings = args[:bindings] if args.key?(:bindings)
@etag = args[:etag] if args.key?(:etag)
@iam_owned = args[:iam_owned] if args.key?(:iam_owned)
@rules = args[:rules] if args.key?(:rules)
@version = args[:version] if args.key?(:version)
end
end
# A public key for authenticating to guests.
class PublicKey
include Google::Apis::Core::Hashable
# [Output Only] Creation timestamp in RFC3339 text format.
# Corresponds to the JSON property `creationTimestamp`
# @return [String]
attr_accessor :creation_timestamp
# An optional textual description of the resource; provided by the client when
# the resource is created.
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
# Optional expiration timestamp. If provided, the timestamp must be in RFC3339
# text format. If not provided, the public key never expires.
# Corresponds to the JSON property `expirationTimestamp`
# @return [String]
attr_accessor :expiration_timestamp
# [Output Only] The fingerprint of the key is defined by RFC4716 to be the MD5
# digest of the public key.
# Corresponds to the JSON property `fingerprint`
# @return [String]
attr_accessor :fingerprint
# Public key text in SSH format, defined by RFC4253 section 6.6.
# Corresponds to the JSON property `key`
# @return [String]
attr_accessor :key
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@creation_timestamp = args[:creation_timestamp] if args.key?(:creation_timestamp)
@description = args[:description] if args.key?(:description)
@expiration_timestamp = args[:expiration_timestamp] if args.key?(:expiration_timestamp)
@fingerprint = args[:fingerprint] if args.key?(:fingerprint)
@key = args[:key] if args.key?(:key)
end
end
# A rule to be applied in a Policy.
class Rule
include Google::Apis::Core::Hashable
# Required
# Corresponds to the JSON property `action`
# @return [String]
attr_accessor :action
# Additional restrictions that must be met
# Corresponds to the JSON property `conditions`
# @return [Array<Google::Apis::ClouduseraccountsAlpha::Condition>]
attr_accessor :conditions
# Human-readable description of the rule.
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
# The rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in this set of entries.
# Corresponds to the JSON property `ins`
# @return [Array<String>]
attr_accessor :ins
# The config returned to callers of tech.iam.IAM.CheckPolicy for any entries
# that match the LOG action.
# Corresponds to the JSON property `logConfigs`
# @return [Array<Google::Apis::ClouduseraccountsAlpha::LogConfig>]
attr_accessor :log_configs
# The rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is not in this set of
# entries.
# Corresponds to the JSON property `notIns`
# @return [Array<String>]
attr_accessor :not_ins
# 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
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@action = args[:action] if args.key?(:action)
@conditions = args[:conditions] if args.key?(:conditions)
@description = args[:description] if args.key?(:description)
@ins = args[:ins] if args.key?(:ins)
@log_configs = args[:log_configs] if args.key?(:log_configs)
@not_ins = args[:not_ins] if args.key?(:not_ins)
@permissions = args[:permissions] if args.key?(:permissions)
end
end
#
class TestPermissionsRequest
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] if args.key?(:permissions)
end
end
#
class TestPermissionsResponse
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] if args.key?(:permissions)
end
end
# A User resource.
class User
include Google::Apis::Core::Hashable
# [Output Only] Creation timestamp in RFC3339 text format.
# Corresponds to the JSON property `creationTimestamp`
# @return [String]
attr_accessor :creation_timestamp
# An optional textual description of the resource; provided by the client when
# the resource is created.
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
# [Output Only] A list of URLs to Group resources who contain the user. Users
# are only members of groups in the same project.
# Corresponds to the JSON property `groups`
# @return [Array<String>]
attr_accessor :groups
# [Output Only] Unique identifier for the resource; defined by the server.
# Corresponds to the JSON property `id`
# @return [Fixnum]
attr_accessor :id
# [Output Only] Type of the resource. Always clouduseraccounts#user for users.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Name of the resource; provided by the client when the resource is created.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Email address of account's owner. This account will be validated to make sure
# it exists. The email can belong to any domain, but it must be tied to a Google
# account.
# Corresponds to the JSON property `owner`
# @return [String]
attr_accessor :owner
# [Output Only] Public keys that this user may use to login.
# Corresponds to the JSON property `publicKeys`
# @return [Array<Google::Apis::ClouduseraccountsAlpha::PublicKey>]
attr_accessor :public_keys
# [Output Only] Server defined URL for the resource.
# Corresponds to the JSON property `selfLink`
# @return [String]
attr_accessor :self_link
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@creation_timestamp = args[:creation_timestamp] if args.key?(:creation_timestamp)
@description = args[:description] if args.key?(:description)
@groups = args[:groups] if args.key?(:groups)
@id = args[:id] if args.key?(:id)
@kind = args[:kind] if args.key?(:kind)
@name = args[:name] if args.key?(:name)
@owner = args[:owner] if args.key?(:owner)
@public_keys = args[:public_keys] if args.key?(:public_keys)
@self_link = args[:self_link] if args.key?(:self_link)
end
end
#
class UserList
include Google::Apis::Core::Hashable
# [Output Only] Unique identifier for the resource; defined by the server.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# [Output Only] A list of User resources.
# Corresponds to the JSON property `items`
# @return [Array<Google::Apis::ClouduseraccountsAlpha::User>]
attr_accessor :items
# [Output Only] Type of resource. Always clouduseraccounts#userList for lists of
# users.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# [Output Only] A token used to continue a truncated list request.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
# [Output Only] Server defined URL for this resource.
# Corresponds to the JSON property `selfLink`
# @return [String]
attr_accessor :self_link
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@id = args[:id] if args.key?(:id)
@items = args[:items] if args.key?(:items)
@kind = args[:kind] if args.key?(:kind)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
@self_link = args[:self_link] if args.key?(:self_link)
end
end
end
end
end