Autogenerated update (2018-12-19)

Update:
- alertcenter_v1beta1
- pubsub_v1
This commit is contained in:
Google APIs 2018-12-19 00:36:17 +00:00
parent 4a645547d9
commit e32134b9da
11 changed files with 1449 additions and 5 deletions

View File

@ -4392,6 +4392,9 @@
"/alertcenter:v1beta1/BadWhitelist/messages": messages
"/alertcenter:v1beta1/BadWhitelist/messages/message": message
"/alertcenter:v1beta1/BadWhitelist/sourceIp": source_ip
"/alertcenter:v1beta1/CloudPubsubTopic": cloud_pubsub_topic
"/alertcenter:v1beta1/CloudPubsubTopic/payloadFormat": payload_format
"/alertcenter:v1beta1/CloudPubsubTopic/topicName": topic_name
"/alertcenter:v1beta1/Csv": csv
"/alertcenter:v1beta1/Csv/dataRows": data_rows
"/alertcenter:v1beta1/Csv/dataRows/data_row": data_row
@ -4452,12 +4455,17 @@
"/alertcenter:v1beta1/MailPhishing/messages/message": message
"/alertcenter:v1beta1/MaliciousEntity": malicious_entity
"/alertcenter:v1beta1/MaliciousEntity/fromHeader": from_header
"/alertcenter:v1beta1/Notification": notification
"/alertcenter:v1beta1/Notification/cloudPubsubTopic": cloud_pubsub_topic
"/alertcenter:v1beta1/PhishingSpike": phishing_spike
"/alertcenter:v1beta1/PhishingSpike/domainId": domain_id
"/alertcenter:v1beta1/PhishingSpike/isInternal": is_internal
"/alertcenter:v1beta1/PhishingSpike/maliciousEntity": malicious_entity
"/alertcenter:v1beta1/PhishingSpike/messages": messages
"/alertcenter:v1beta1/PhishingSpike/messages/message": message
"/alertcenter:v1beta1/Settings": settings
"/alertcenter:v1beta1/Settings/notifications": notifications
"/alertcenter:v1beta1/Settings/notifications/notification": notification
"/alertcenter:v1beta1/StateSponsoredAttack": state_sponsored_attack
"/alertcenter:v1beta1/StateSponsoredAttack/email": email
"/alertcenter:v1beta1/SuspiciousActivity": suspicious_activity
@ -4497,6 +4505,8 @@
"/alertcenter:v1beta1/alertcenter.alerts.list/pageToken": page_token
"/alertcenter:v1beta1/alertcenter.alerts.undelete": undelete_alert
"/alertcenter:v1beta1/alertcenter.alerts.undelete/alertId": alert_id
"/alertcenter:v1beta1/alertcenter.getSettings/customerId": customer_id
"/alertcenter:v1beta1/alertcenter.updateSettings/customerId": customer_id
"/alertcenter:v1beta1/fields": fields
"/alertcenter:v1beta1/key": key
"/alertcenter:v1beta1/quotaUser": quota_user
@ -15812,6 +15822,90 @@
"/cloudfunctions:v1beta2/fields": fields
"/cloudfunctions:v1beta2/key": key
"/cloudfunctions:v1beta2/quotaUser": quota_user
"/cloudidentity:v1beta1/EntityKey": entity_key
"/cloudidentity:v1beta1/EntityKey/id": id
"/cloudidentity:v1beta1/EntityKey/namespace": namespace
"/cloudidentity:v1beta1/Group": group
"/cloudidentity:v1beta1/Group/additionalGroupKeys": additional_group_keys
"/cloudidentity:v1beta1/Group/additionalGroupKeys/additional_group_key": additional_group_key
"/cloudidentity:v1beta1/Group/createTime": create_time
"/cloudidentity:v1beta1/Group/description": description
"/cloudidentity:v1beta1/Group/displayName": display_name
"/cloudidentity:v1beta1/Group/groupKey": group_key
"/cloudidentity:v1beta1/Group/labels": labels
"/cloudidentity:v1beta1/Group/labels/label": label
"/cloudidentity:v1beta1/Group/name": name
"/cloudidentity:v1beta1/Group/parent": parent
"/cloudidentity:v1beta1/Group/updateTime": update_time
"/cloudidentity:v1beta1/ListMembershipsResponse": list_memberships_response
"/cloudidentity:v1beta1/ListMembershipsResponse/memberships": memberships
"/cloudidentity:v1beta1/ListMembershipsResponse/memberships/membership": membership
"/cloudidentity:v1beta1/ListMembershipsResponse/nextPageToken": next_page_token
"/cloudidentity:v1beta1/LookupGroupNameResponse": lookup_group_name_response
"/cloudidentity:v1beta1/LookupGroupNameResponse/name": name
"/cloudidentity:v1beta1/LookupMembershipNameResponse": lookup_membership_name_response
"/cloudidentity:v1beta1/LookupMembershipNameResponse/name": name
"/cloudidentity:v1beta1/Membership": membership
"/cloudidentity:v1beta1/Membership/createTime": create_time
"/cloudidentity:v1beta1/Membership/memberKey": member_key
"/cloudidentity:v1beta1/Membership/name": name
"/cloudidentity:v1beta1/Membership/roles": roles
"/cloudidentity:v1beta1/Membership/roles/role": role
"/cloudidentity:v1beta1/Membership/updateTime": update_time
"/cloudidentity:v1beta1/MembershipRole": membership_role
"/cloudidentity:v1beta1/MembershipRole/name": name
"/cloudidentity:v1beta1/Operation": operation
"/cloudidentity:v1beta1/Operation/done": done
"/cloudidentity:v1beta1/Operation/error": error
"/cloudidentity:v1beta1/Operation/metadata": metadata
"/cloudidentity:v1beta1/Operation/metadata/metadatum": metadatum
"/cloudidentity:v1beta1/Operation/name": name
"/cloudidentity:v1beta1/Operation/response": response
"/cloudidentity:v1beta1/Operation/response/response": response
"/cloudidentity:v1beta1/SearchGroupsResponse": search_groups_response
"/cloudidentity:v1beta1/SearchGroupsResponse/groups": groups
"/cloudidentity:v1beta1/SearchGroupsResponse/groups/group": group
"/cloudidentity:v1beta1/SearchGroupsResponse/nextPageToken": next_page_token
"/cloudidentity:v1beta1/Status": status
"/cloudidentity:v1beta1/Status/code": code
"/cloudidentity:v1beta1/Status/details": details
"/cloudidentity:v1beta1/Status/details/detail": detail
"/cloudidentity:v1beta1/Status/details/detail/detail": detail
"/cloudidentity:v1beta1/Status/message": message
"/cloudidentity:v1beta1/cloudidentity.groups.create": create_group
"/cloudidentity:v1beta1/cloudidentity.groups.delete": delete_group
"/cloudidentity:v1beta1/cloudidentity.groups.delete/name": name
"/cloudidentity:v1beta1/cloudidentity.groups.get": get_group
"/cloudidentity:v1beta1/cloudidentity.groups.get/name": name
"/cloudidentity:v1beta1/cloudidentity.groups.lookup": lookup_group
"/cloudidentity:v1beta1/cloudidentity.groups.lookup/groupKey.id": group_key_id
"/cloudidentity:v1beta1/cloudidentity.groups.lookup/groupKey.namespace": group_key_namespace
"/cloudidentity:v1beta1/cloudidentity.groups.memberships.create": create_group_membership
"/cloudidentity:v1beta1/cloudidentity.groups.memberships.create/parent": parent
"/cloudidentity:v1beta1/cloudidentity.groups.memberships.delete": delete_group_membership
"/cloudidentity:v1beta1/cloudidentity.groups.memberships.delete/name": name
"/cloudidentity:v1beta1/cloudidentity.groups.memberships.get": get_group_membership
"/cloudidentity:v1beta1/cloudidentity.groups.memberships.get/name": name
"/cloudidentity:v1beta1/cloudidentity.groups.memberships.list": list_group_memberships
"/cloudidentity:v1beta1/cloudidentity.groups.memberships.list/pageSize": page_size
"/cloudidentity:v1beta1/cloudidentity.groups.memberships.list/pageToken": page_token
"/cloudidentity:v1beta1/cloudidentity.groups.memberships.list/parent": parent
"/cloudidentity:v1beta1/cloudidentity.groups.memberships.list/view": view
"/cloudidentity:v1beta1/cloudidentity.groups.memberships.lookup": lookup_group_membership
"/cloudidentity:v1beta1/cloudidentity.groups.memberships.lookup/memberKey.id": member_key_id
"/cloudidentity:v1beta1/cloudidentity.groups.memberships.lookup/memberKey.namespace": member_key_namespace
"/cloudidentity:v1beta1/cloudidentity.groups.memberships.lookup/parent": parent
"/cloudidentity:v1beta1/cloudidentity.groups.patch": patch_group
"/cloudidentity:v1beta1/cloudidentity.groups.patch/name": name
"/cloudidentity:v1beta1/cloudidentity.groups.patch/updateMask": update_mask
"/cloudidentity:v1beta1/cloudidentity.groups.search": search_groups
"/cloudidentity:v1beta1/cloudidentity.groups.search/pageSize": page_size
"/cloudidentity:v1beta1/cloudidentity.groups.search/pageToken": page_token
"/cloudidentity:v1beta1/cloudidentity.groups.search/query": query
"/cloudidentity:v1beta1/cloudidentity.groups.search/view": view
"/cloudidentity:v1beta1/fields": fields
"/cloudidentity:v1beta1/key": key
"/cloudidentity:v1beta1/quotaUser": quota_user
"/cloudiot:v1/AuditConfig": audit_config
"/cloudiot:v1/AuditConfig/auditLogConfigs": audit_log_configs
"/cloudiot:v1/AuditConfig/auditLogConfigs/audit_log_config": audit_log_config

View File

@ -25,7 +25,7 @@ module Google
# @see https://developers.google.com/admin-sdk/alertcenter/
module AlertcenterV1beta1
VERSION = 'V1beta1'
REVISION = '20181208'
REVISION = '20181215'
# See and delete your domain's G Suite alerts, and send alert feedback
AUTH_APPS_ALERTS = 'https://www.googleapis.com/auth/apps.alerts'

View File

@ -93,7 +93,7 @@ module Google
# @return [String]
attr_accessor :security_investigation_tool_link
# Required. A unique identifier for the system that is reported the alert.
# Required. A unique identifier for the system that reported the alert.
# Supported sources are any of the following:
# * Google Operations
# * Mobile device management
@ -245,6 +245,36 @@ module Google
end
end
# A reference to a Cloud Pubsub topic.
# To register for notifications, the owner of the topic must grant
# `alerts-api-push-notifications@system.gserviceaccount.com` the
# `projects.topics.publish` permission.
class CloudPubsubTopic
include Google::Apis::Core::Hashable
# Optional. The format of the payload that would be sent.
# If not specified the format will be JSON.
# Corresponds to the JSON property `payloadFormat`
# @return [String]
attr_accessor :payload_format
# The `name` field of a Cloud Pubsub [Topic]
# (https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.topics#Topic).
# Corresponds to the JSON property `topicName`
# @return [String]
attr_accessor :topic_name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@payload_format = args[:payload_format] if args.key?(:payload_format)
@topic_name = args[:topic_name] if args.key?(:topic_name)
end
end
# A representation of a CSV file attachment, as a list of column headers and
# a list of data rows.
class Csv
@ -674,6 +704,30 @@ module Google
end
end
# Settings for callback notifications.
# For more details see [G Suite Alert
# Notification](/admin-sdk/alertcenter/guides/notifications).
class Notification
include Google::Apis::Core::Hashable
# A reference to a Cloud Pubsub topic.
# To register for notifications, the owner of the topic must grant
# `alerts-api-push-notifications@system.gserviceaccount.com` the
# `projects.topics.publish` permission.
# Corresponds to the JSON property `cloudPubsubTopic`
# @return [Google::Apis::AlertcenterV1beta1::CloudPubsubTopic]
attr_accessor :cloud_pubsub_topic
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@cloud_pubsub_topic = args[:cloud_pubsub_topic] if args.key?(:cloud_pubsub_topic)
end
end
# Alert for a spike in user reported phishing.
# <aside class="warning"><b>Warning</b>: This type has been deprecated. Use
# [MailPhishing](/admin-sdk/alertcenter/reference/rest/v1beta1/MailPhishing)
@ -715,6 +769,25 @@ module Google
end
end
# Customer-level settings.
class Settings
include Google::Apis::Core::Hashable
# The list of notifications.
# Corresponds to the JSON property `notifications`
# @return [Array<Google::Apis::AlertcenterV1beta1::Notification>]
attr_accessor :notifications
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@notifications = args[:notifications] if args.key?(:notifications)
end
end
# A state-sponsored attack alert. Derived from audit logs.
class StateSponsoredAttack
include Google::Apis::Core::Hashable

View File

@ -52,6 +52,12 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class CloudPubsubTopic
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Csv
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -136,12 +142,24 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class Notification
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class PhishingSpike
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Settings
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class StateSponsoredAttack
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -224,6 +242,14 @@ module Google
end
end
class CloudPubsubTopic
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :payload_format, as: 'payloadFormat'
property :topic_name, as: 'topicName'
end
end
class Csv
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -353,6 +379,14 @@ module Google
end
end
class Notification
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :cloud_pubsub_topic, as: 'cloudPubsubTopic', class: Google::Apis::AlertcenterV1beta1::CloudPubsubTopic, decorator: Google::Apis::AlertcenterV1beta1::CloudPubsubTopic::Representation
end
end
class PhishingSpike
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -366,6 +400,14 @@ module Google
end
end
class Settings
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :notifications, as: 'notifications', class: Google::Apis::AlertcenterV1beta1::Notification, decorator: Google::Apis::AlertcenterV1beta1::Notification::Representation
end
end
class StateSponsoredAttack
# @private
class Representation < Google::Apis::Core::JsonRepresentation

View File

@ -297,6 +297,73 @@ module Google
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Returns customer-level settings.
# @param [String] customer_id
# Optional. The unique identifier of the G Suite organization account of the
# customer the alert settings are associated with.
# Inferred from the caller identity if not provided.
# @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::AlertcenterV1beta1::Settings] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AlertcenterV1beta1::Settings]
#
# @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_settings(customer_id: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1beta1/settings', options)
command.response_representation = Google::Apis::AlertcenterV1beta1::Settings::Representation
command.response_class = Google::Apis::AlertcenterV1beta1::Settings
command.query['customerId'] = customer_id unless customer_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Update the customer-level settings.
# @param [Google::Apis::AlertcenterV1beta1::Settings] settings_object
# @param [String] customer_id
# Optional. The unique identifier of the G Suite organization account of the
# customer the alert settings are associated with.
# Inferred from the caller identity if not provided.
# @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::AlertcenterV1beta1::Settings] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::AlertcenterV1beta1::Settings]
#
# @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 update_settings(settings_object = nil, customer_id: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:patch, 'v1beta1/settings', options)
command.request_representation = Google::Apis::AlertcenterV1beta1::Settings::Representation
command.request_object = settings_object
command.response_representation = Google::Apis::AlertcenterV1beta1::Settings::Representation
command.response_class = Google::Apis::AlertcenterV1beta1::Settings
command.query['customerId'] = customer_id unless customer_id.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

View File

@ -0,0 +1,31 @@
# 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 'google/apis/cloudidentity_v1beta1/service.rb'
require 'google/apis/cloudidentity_v1beta1/classes.rb'
require 'google/apis/cloudidentity_v1beta1/representations.rb'
module Google
module Apis
# Cloud Identity API
#
# API for provisioning and managing identity resources.
#
# @see https://cloud.google.com/identity/
module CloudidentityV1beta1
VERSION = 'V1beta1'
REVISION = '20181215'
end
end
end

View File

@ -0,0 +1,475 @@
# 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 CloudidentityV1beta1
# An EntityKey uniquely identifies an Entity. Namespaces are used to provide
# isolation for ids. A single Id can be reused across namespaces but the
# combination of a namespace and an id must be unique.
class EntityKey
include Google::Apis::Core::Hashable
# The id of the entity within the given namespace. The id must be unique
# within its namespace.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Namespaces provide isolation for ids, i.e an id only needs to be unique
# within its namespace.
# Namespaces are currently only created as part of IdentitySource creation
# from Admin Console. A namespace `"identitysources/`identity_source_id`"` is
# created corresponding to every Identity Source `identity_source_id`.
# Corresponds to the JSON property `namespace`
# @return [String]
attr_accessor :namespace
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@id = args[:id] if args.key?(:id)
@namespace = args[:namespace] if args.key?(:namespace)
end
end
# Resource representing a Group
class Group
include Google::Apis::Core::Hashable
# Optional. Additional entity key aliases for a Group
# Corresponds to the JSON property `additionalGroupKeys`
# @return [Array<Google::Apis::CloudidentityV1beta1::EntityKey>]
attr_accessor :additional_group_keys
# The time when the Group was created.
# Output only
# Corresponds to the JSON property `createTime`
# @return [String]
attr_accessor :create_time
# An extended description to help users determine the purpose of a Group. For
# example, you can include information about who should join the Group, the
# types of messages to send to the Group, links to FAQs about the Group, or
# related Groups. Maximum length is 4,096 characters.
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
# The Group's display name.
# Corresponds to the JSON property `displayName`
# @return [String]
attr_accessor :display_name
# An EntityKey uniquely identifies an Entity. Namespaces are used to provide
# isolation for ids. A single Id can be reused across namespaces but the
# combination of a namespace and an id must be unique.
# Corresponds to the JSON property `groupKey`
# @return [Google::Apis::CloudidentityV1beta1::EntityKey]
attr_accessor :group_key
# Labels for Group resource.
# Required.
# For creating Groups under a namespace, set label key to
# 'labels/system/groups/external' and label value as empty.
# Corresponds to the JSON property `labels`
# @return [Hash<String,String>]
attr_accessor :labels
# [Resource name](https://cloud.google.com/apis/design/resource_names) of the
# Group in the format: `groups/`group_id``, where group_id is the unique id
# assigned to the Group.
# Must be left blank while creating a Group
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The entity under which this Group resides in Cloud Identity resource
# hierarchy. Must be set when creating a Group, read-only afterwards.
# Currently allowed types: 'identitysources'.
# Corresponds to the JSON property `parent`
# @return [String]
attr_accessor :parent
# The time when the Group was last updated.
# Output only
# Corresponds to the JSON property `updateTime`
# @return [String]
attr_accessor :update_time
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@additional_group_keys = args[:additional_group_keys] if args.key?(:additional_group_keys)
@create_time = args[:create_time] if args.key?(:create_time)
@description = args[:description] if args.key?(:description)
@display_name = args[:display_name] if args.key?(:display_name)
@group_key = args[:group_key] if args.key?(:group_key)
@labels = args[:labels] if args.key?(:labels)
@name = args[:name] if args.key?(:name)
@parent = args[:parent] if args.key?(:parent)
@update_time = args[:update_time] if args.key?(:update_time)
end
end
#
class ListMembershipsResponse
include Google::Apis::Core::Hashable
# List of Memberships
# Corresponds to the JSON property `memberships`
# @return [Array<Google::Apis::CloudidentityV1beta1::Membership>]
attr_accessor :memberships
# Token to retrieve the next page of results, or empty if there are no
# more results available for listing.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@memberships = args[:memberships] if args.key?(:memberships)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
end
end
#
class LookupGroupNameResponse
include Google::Apis::Core::Hashable
# [Resource name](https://cloud.google.com/apis/design/resource_names) of the
# Group in the format: `groups/`group_id``, where `group_id` is the unique id
# assigned to the Group.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@name = args[:name] if args.key?(:name)
end
end
#
class LookupMembershipNameResponse
include Google::Apis::Core::Hashable
# [Resource name](https://cloud.google.com/apis/design/resource_names) of the
# Membership being looked up.
# Format: `groups/`group_id`/memberships/`member_id``, where `group_id` is
# the unique id assigned to the Group to which Membership belongs to, and
# `member_id` is the unique id assigned to the member.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@name = args[:name] if args.key?(:name)
end
end
# Resource representing a Membership within a Group
class Membership
include Google::Apis::Core::Hashable
# Creation timestamp of the Membership.
# Corresponds to the JSON property `createTime`
# @return [String]
attr_accessor :create_time
# An EntityKey uniquely identifies an Entity. Namespaces are used to provide
# isolation for ids. A single Id can be reused across namespaces but the
# combination of a namespace and an id must be unique.
# Corresponds to the JSON property `memberKey`
# @return [Google::Apis::CloudidentityV1beta1::EntityKey]
attr_accessor :member_key
# [Resource name](https://cloud.google.com/apis/design/resource_names) of the
# Membership in the format: `groups/`group_id`/memberships/`member_id``,
# where group_id is the unique id assigned to the Group to which Membership
# belongs to, and member_id is the unique id assigned to the member
# Must be left blank while creating a Membership.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Roles for a member within the Group.
# Currently supported MembershipRoles: `"MEMBER"`.
# Corresponds to the JSON property `roles`
# @return [Array<Google::Apis::CloudidentityV1beta1::MembershipRole>]
attr_accessor :roles
# Last updated timestamp of the Membership.
# Corresponds to the JSON property `updateTime`
# @return [String]
attr_accessor :update_time
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@create_time = args[:create_time] if args.key?(:create_time)
@member_key = args[:member_key] if args.key?(:member_key)
@name = args[:name] if args.key?(:name)
@roles = args[:roles] if args.key?(:roles)
@update_time = args[:update_time] if args.key?(:update_time)
end
end
# Resource representing a role within a Membership.
class MembershipRole
include Google::Apis::Core::Hashable
# MembershipRole in string format.
# Currently supported MembershipRoles: `"MEMBER"`.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@name = args[:name] if args.key?(:name)
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). The error model is designed to be:
# - Simple to use and understand for most users
# - Flexible enough to meet unexpected needs
# # Overview
# The `Status` message contains three pieces of data: error code, error message,
# and error details. The error code should be an enum value of
# google.rpc.Code, but it may accept additional error codes if needed. The
# error message should be a developer-facing English message that helps
# developers *understand* and *resolve* the error. If a localized user-facing
# error message is needed, put the localized message in the error details or
# localize it in the client. The optional error details may contain arbitrary
# information about the error. There is a predefined set of error detail types
# in the package `google.rpc` that can be used for common error conditions.
# # Language mapping
# The `Status` message is the logical representation of the error model, but it
# is not necessarily the actual wire format. When the `Status` message is
# exposed in different client libraries and different wire protocols, it can be
# mapped differently. For example, it will likely be mapped to some exceptions
# in Java, but more likely mapped to some error codes in C.
# # Other uses
# The error model and the `Status` message can be used in a variety of
# environments, either with or without APIs, to provide a
# consistent developer experience across different environments.
# Example uses of this error model include:
# - Partial errors. If a service needs to return partial errors to the client,
# it may embed the `Status` in the normal response to indicate the partial
# errors.
# - Workflow errors. A typical workflow has multiple steps. Each step may
# have a `Status` message for error reporting.
# - Batch operations. If a client uses batch request and batch response, the
# `Status` message should be used directly inside batch response, one for
# each error sub-response.
# - Asynchronous operations. If an API call embeds asynchronous operation
# results in its response, the status of those operations should be
# represented directly using the `Status` message.
# - Logging. If some API errors are stored in logs, the message `Status` could
# be used directly after any stripping needed for security/privacy reasons.
# Corresponds to the JSON property `error`
# @return [Google::Apis::CloudidentityV1beta1::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 have the format of `operations/some/unique/name`.
# 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
#
class SearchGroupsResponse
include Google::Apis::Core::Hashable
# List of Groups satisfying the search query.
# Corresponds to the JSON property `groups`
# @return [Array<Google::Apis::CloudidentityV1beta1::Group>]
attr_accessor :groups
# Token to retrieve the next page of results, or empty if there are no
# more results available for specified query.
# Corresponds to the JSON property `nextPageToken`
# @return [String]
attr_accessor :next_page_token
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@groups = args[:groups] if args.key?(:groups)
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
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). The error model is designed to be:
# - Simple to use and understand for most users
# - Flexible enough to meet unexpected needs
# # Overview
# The `Status` message contains three pieces of data: error code, error message,
# and error details. The error code should be an enum value of
# google.rpc.Code, but it may accept additional error codes if needed. The
# error message should be a developer-facing English message that helps
# developers *understand* and *resolve* the error. If a localized user-facing
# error message is needed, put the localized message in the error details or
# localize it in the client. The optional error details may contain arbitrary
# information about the error. There is a predefined set of error detail types
# in the package `google.rpc` that can be used for common error conditions.
# # Language mapping
# The `Status` message is the logical representation of the error model, but it
# is not necessarily the actual wire format. When the `Status` message is
# exposed in different client libraries and different wire protocols, it can be
# mapped differently. For example, it will likely be mapped to some exceptions
# in Java, but more likely mapped to some error codes in C.
# # Other uses
# The error model and the `Status` message can be used in a variety of
# environments, either with or without APIs, to provide a
# consistent developer experience across different environments.
# Example uses of this error model include:
# - Partial errors. If a service needs to return partial errors to the client,
# it may embed the `Status` in the normal response to indicate the partial
# errors.
# - Workflow errors. A typical workflow has multiple steps. Each step may
# have a `Status` message for error reporting.
# - Batch operations. If a client uses batch request and batch response, the
# `Status` message should be used directly inside batch response, one for
# each error sub-response.
# - Asynchronous operations. If an API call embeds asynchronous operation
# results in its response, the status of those operations should be
# represented directly using the `Status` message.
# - Logging. If some API errors are stored in logs, the message `Status` could
# be used directly after any stripping needed for security/privacy reasons.
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
end
end
end

View File

@ -0,0 +1,184 @@
# 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 CloudidentityV1beta1
class EntityKey
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Group
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListMembershipsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class LookupGroupNameResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class LookupMembershipNameResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Membership
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class MembershipRole
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 SearchGroupsResponse
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 EntityKey
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :id, as: 'id'
property :namespace, as: 'namespace'
end
end
class Group
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :additional_group_keys, as: 'additionalGroupKeys', class: Google::Apis::CloudidentityV1beta1::EntityKey, decorator: Google::Apis::CloudidentityV1beta1::EntityKey::Representation
property :create_time, as: 'createTime'
property :description, as: 'description'
property :display_name, as: 'displayName'
property :group_key, as: 'groupKey', class: Google::Apis::CloudidentityV1beta1::EntityKey, decorator: Google::Apis::CloudidentityV1beta1::EntityKey::Representation
hash :labels, as: 'labels'
property :name, as: 'name'
property :parent, as: 'parent'
property :update_time, as: 'updateTime'
end
end
class ListMembershipsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :memberships, as: 'memberships', class: Google::Apis::CloudidentityV1beta1::Membership, decorator: Google::Apis::CloudidentityV1beta1::Membership::Representation
property :next_page_token, as: 'nextPageToken'
end
end
class LookupGroupNameResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name'
end
end
class LookupMembershipNameResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name'
end
end
class Membership
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :create_time, as: 'createTime'
property :member_key, as: 'memberKey', class: Google::Apis::CloudidentityV1beta1::EntityKey, decorator: Google::Apis::CloudidentityV1beta1::EntityKey::Representation
property :name, as: 'name'
collection :roles, as: 'roles', class: Google::Apis::CloudidentityV1beta1::MembershipRole, decorator: Google::Apis::CloudidentityV1beta1::MembershipRole::Representation
property :update_time, as: 'updateTime'
end
end
class MembershipRole
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :name, as: 'name'
end
end
class Operation
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :done, as: 'done'
property :error, as: 'error', class: Google::Apis::CloudidentityV1beta1::Status, decorator: Google::Apis::CloudidentityV1beta1::Status::Representation
hash :metadata, as: 'metadata'
property :name, as: 'name'
hash :response, as: 'response'
end
end
class SearchGroupsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :groups, as: 'groups', class: Google::Apis::CloudidentityV1beta1::Group, decorator: Google::Apis::CloudidentityV1beta1::Group::Representation
property :next_page_token, as: 'nextPageToken'
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
end
end
end

View File

@ -0,0 +1,477 @@
# 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 '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 CloudidentityV1beta1
# Cloud Identity API
#
# API for provisioning and managing identity resources.
#
# @example
# require 'google/apis/cloudidentity_v1beta1'
#
# Cloudidentity = Google::Apis::CloudidentityV1beta1 # Alias the module
# service = Cloudidentity::CloudIdentityService.new
#
# @see https://cloud.google.com/identity/
class CloudIdentityService < Google::Apis::Core::BaseService
# @return [String]
# API key. Your API key identifies your project and provides you with API access,
# quota, and reports. Required unless you provide an OAuth 2.0 token.
attr_accessor :key
# @return [String]
# 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.
attr_accessor :quota_user
def initialize
super('https://cloudidentity.googleapis.com/', '')
@batch_path = 'batch'
end
# Creates a Group.
# @param [Google::Apis::CloudidentityV1beta1::Group] group_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::CloudidentityV1beta1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudidentityV1beta1::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 create_group(group_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/groups', options)
command.request_representation = Google::Apis::CloudidentityV1beta1::Group::Representation
command.request_object = group_object
command.response_representation = Google::Apis::CloudidentityV1beta1::Operation::Representation
command.response_class = Google::Apis::CloudidentityV1beta1::Operation
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Deletes a Group.
# @param [String] name
# [Resource name](https://cloud.google.com/apis/design/resource_names) of the
# Group in the format: `groups/`group_id``, where `group_id` is the unique id
# assigned to the Group.
# @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::CloudidentityV1beta1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudidentityV1beta1::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 delete_group(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'v1beta1/{+name}', options)
command.response_representation = Google::Apis::CloudidentityV1beta1::Operation::Representation
command.response_class = Google::Apis::CloudidentityV1beta1::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
# Retrieves a Group.
# @param [String] name
# [Resource name](https://cloud.google.com/apis/design/resource_names) of the
# Group in the format: `groups/`group_id``, where `group_id` is the unique id
# assigned to the Group.
# @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::CloudidentityV1beta1::Group] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudidentityV1beta1::Group]
#
# @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_group(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1beta1/{+name}', options)
command.response_representation = Google::Apis::CloudidentityV1beta1::Group::Representation
command.response_class = Google::Apis::CloudidentityV1beta1::Group
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
# Looks up [resource
# name](https://cloud.google.com/apis/design/resource_names) of a Group by
# its EntityKey.
# @param [String] group_key_id
# The id of the entity within the given namespace. The id must be unique
# within its namespace.
# @param [String] group_key_namespace
# Namespaces provide isolation for ids, i.e an id only needs to be unique
# within its namespace.
# Namespaces are currently only created as part of IdentitySource creation
# from Admin Console. A namespace `"identitysources/`identity_source_id`"` is
# created corresponding to every Identity Source `identity_source_id`.
# @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::CloudidentityV1beta1::LookupGroupNameResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudidentityV1beta1::LookupGroupNameResponse]
#
# @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 lookup_group(group_key_id: nil, group_key_namespace: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1beta1/groups:lookup', options)
command.response_representation = Google::Apis::CloudidentityV1beta1::LookupGroupNameResponse::Representation
command.response_class = Google::Apis::CloudidentityV1beta1::LookupGroupNameResponse
command.query['groupKey.id'] = group_key_id unless group_key_id.nil?
command.query['groupKey.namespace'] = group_key_namespace unless group_key_namespace.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Updates a Group.
# @param [String] name
# [Resource name](https://cloud.google.com/apis/design/resource_names) of the
# Group in the format: `groups/`group_id``, where group_id is the unique id
# assigned to the Group.
# Must be left blank while creating a Group
# @param [Google::Apis::CloudidentityV1beta1::Group] group_object
# @param [String] update_mask
# Editable fields: `display_name`, `description`
# @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::CloudidentityV1beta1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudidentityV1beta1::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 patch_group(name, group_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:patch, 'v1beta1/{+name}', options)
command.request_representation = Google::Apis::CloudidentityV1beta1::Group::Representation
command.request_object = group_object
command.response_representation = Google::Apis::CloudidentityV1beta1::Operation::Representation
command.response_class = Google::Apis::CloudidentityV1beta1::Operation
command.params['name'] = name unless name.nil?
command.query['updateMask'] = update_mask unless update_mask.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Searches for Groups.
# @param [Fixnum] page_size
# The max number of groups to return.
# GroupView | Default | Maximum
# --------- | ------- | -------
# BASIC | 200 | 1000
# FULL | 50 | 500
# @param [String] page_token
# The next_page_token value returned from a previous search request, if any.
# @param [String] query
# Query string for performing search on groups.
# Users can search on namespace and label attributes of groups.
# EXACT match ('=') is supported on namespace, and CONTAINS match (':') is
# supported on labels. This is a `required` field.
# Multiple queries can be combined using `AND` operator. The operator is case
# sensitive.
# An example query would be:
# "namespace=<namespace_value> AND labels:<labels_value>".
# @param [String] view
# Group resource view to be returned. Defaults to [GroupView.BASIC]().
# @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::CloudidentityV1beta1::SearchGroupsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudidentityV1beta1::SearchGroupsResponse]
#
# @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 search_groups(page_size: nil, page_token: nil, query: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1beta1/groups:search', options)
command.response_representation = Google::Apis::CloudidentityV1beta1::SearchGroupsResponse::Representation
command.response_class = Google::Apis::CloudidentityV1beta1::SearchGroupsResponse
command.query['pageSize'] = page_size unless page_size.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['query'] = query unless query.nil?
command.query['view'] = view unless view.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 Membership.
# @param [String] parent
# [Resource name](https://cloud.google.com/apis/design/resource_names) of the
# Group to create Membership within. Format: `groups/`group_id``, where
# `group_id` is the unique id assigned to the Group.
# @param [Google::Apis::CloudidentityV1beta1::Membership] membership_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::CloudidentityV1beta1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudidentityV1beta1::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 create_group_membership(parent, membership_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1beta1/{+parent}/memberships', options)
command.request_representation = Google::Apis::CloudidentityV1beta1::Membership::Representation
command.request_object = membership_object
command.response_representation = Google::Apis::CloudidentityV1beta1::Operation::Representation
command.response_class = Google::Apis::CloudidentityV1beta1::Operation
command.params['parent'] = parent unless parent.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Deletes a Membership.
# @param [String] name
# [Resource name](https://cloud.google.com/apis/design/resource_names) of the
# Membership to be deleted.
# Format: `groups/`group_id`/memberships/`member_id``, where `group_id` is
# the unique id assigned to the Group to which Membership belongs to, and
# member_id is the unique id assigned to the member.
# @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::CloudidentityV1beta1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudidentityV1beta1::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 delete_group_membership(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'v1beta1/{+name}', options)
command.response_representation = Google::Apis::CloudidentityV1beta1::Operation::Representation
command.response_class = Google::Apis::CloudidentityV1beta1::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
# Retrieves a Membership.
# @param [String] name
# [Resource name](https://cloud.google.com/apis/design/resource_names) of the
# Membership to be retrieved.
# Format: `groups/`group_id`/memberships/`member_id``, where `group_id` is
# the unique id assigned to the Group to which Membership belongs to, and
# `member_id` is the unique id assigned to the member.
# @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::CloudidentityV1beta1::Membership] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudidentityV1beta1::Membership]
#
# @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_group_membership(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1beta1/{+name}', options)
command.response_representation = Google::Apis::CloudidentityV1beta1::Membership::Representation
command.response_class = Google::Apis::CloudidentityV1beta1::Membership
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
# List Memberships within a Group.
# @param [String] parent
# [Resource name](https://cloud.google.com/apis/design/resource_names) of the
# Group to list Memberships within.
# Format: `groups/`group_id``, where `group_id` is the unique id assigned to
# the Group.
# @param [Fixnum] page_size
# Maximum number of Memberships to return.
# MembershipView | Default | Maximum
# -------------- | ------- | -------
# BASIC | 200 | 1000
# FULL | 50 | 500
# @param [String] page_token
# The next_page_token value returned from a previous list request, if any
# @param [String] view
# Membership resource view to be returned. Defaults to MembershipView.BASIC.
# @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::CloudidentityV1beta1::ListMembershipsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudidentityV1beta1::ListMembershipsResponse]
#
# @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 list_group_memberships(parent, page_size: nil, page_token: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1beta1/{+parent}/memberships', options)
command.response_representation = Google::Apis::CloudidentityV1beta1::ListMembershipsResponse::Representation
command.response_class = Google::Apis::CloudidentityV1beta1::ListMembershipsResponse
command.params['parent'] = parent unless parent.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['view'] = view unless view.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Looks up [resource
# name](https://cloud.google.com/apis/design/resource_names) of a Membership
# within a Group by member's EntityKey.
# @param [String] parent
# [Resource name](https://cloud.google.com/apis/design/resource_names) of the
# Group to lookup Membership within.
# Format: `groups/`group_id``, where `group_id` is the unique id assigned to
# the Group.
# @param [String] member_key_id
# The id of the entity within the given namespace. The id must be unique
# within its namespace.
# @param [String] member_key_namespace
# Namespaces provide isolation for ids, i.e an id only needs to be unique
# within its namespace.
# Namespaces are currently only created as part of IdentitySource creation
# from Admin Console. A namespace `"identitysources/`identity_source_id`"` is
# created corresponding to every Identity Source `identity_source_id`.
# @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::CloudidentityV1beta1::LookupMembershipNameResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudidentityV1beta1::LookupMembershipNameResponse]
#
# @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 lookup_group_membership(parent, member_key_id: nil, member_key_namespace: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1beta1/{+parent}/memberships:lookup', options)
command.response_representation = Google::Apis::CloudidentityV1beta1::LookupMembershipNameResponse::Representation
command.response_class = Google::Apis::CloudidentityV1beta1::LookupMembershipNameResponse
command.params['parent'] = parent unless parent.nil?
command.query['memberKey.id'] = member_key_id unless member_key_id.nil?
command.query['memberKey.namespace'] = member_key_namespace unless member_key_namespace.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
def apply_command_defaults(command)
command.query['key'] = key unless key.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
end
end
end
end
end

View File

@ -25,7 +25,7 @@ module Google
# @see https://cloud.google.com/pubsub/docs
module PubsubV1
VERSION = 'V1'
REVISION = '20181119'
REVISION = '20181213'
# View and manage your data across Google Cloud Platform services
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'

View File

@ -365,8 +365,9 @@ module Google
# The new ack deadline with respect to the time this request was sent to
# the Pub/Sub system. For example, if the value is 10, the new
# ack deadline will expire 10 seconds after the `ModifyAckDeadline` call
# was made. Specifying zero may immediately make the message available for
# another pull request.
# was made. Specifying zero might immediately make the message available for
# delivery to another subscriber client. This typically results in an
# increase in the rate of message redeliveries (that is, duplicates).
# The minimum deadline you can specify is 0 seconds.
# The maximum deadline you can specify is 600 seconds (10 minutes).
# Corresponds to the JSON property `ackDeadlineSeconds`