2017-03-10 21:11:09 +00:00
|
|
|
# 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 CloudkmsV1
|
|
|
|
|
2017-03-27 22:14:47 +00:00
|
|
|
class Location
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
|
|
|
|
|
|
include Google::Apis::Core::JsonObjectSupport
|
|
|
|
end
|
|
|
|
|
|
|
|
class ListCryptoKeysResponse
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
|
|
|
|
|
|
include Google::Apis::Core::JsonObjectSupport
|
|
|
|
end
|
|
|
|
|
2017-03-10 21:11:09 +00:00
|
|
|
class Condition
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
|
|
|
|
|
|
include Google::Apis::Core::JsonObjectSupport
|
|
|
|
end
|
|
|
|
|
|
|
|
class CounterOptions
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
|
|
|
|
|
|
include Google::Apis::Core::JsonObjectSupport
|
|
|
|
end
|
|
|
|
|
|
|
|
class AuditLogConfig
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
|
|
|
|
|
|
include Google::Apis::Core::JsonObjectSupport
|
|
|
|
end
|
|
|
|
|
|
|
|
class DecryptResponse
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
|
|
|
|
|
|
include Google::Apis::Core::JsonObjectSupport
|
|
|
|
end
|
|
|
|
|
|
|
|
class TestIamPermissionsRequest
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
|
|
|
|
|
|
include Google::Apis::Core::JsonObjectSupport
|
|
|
|
end
|
|
|
|
|
2017-03-27 22:14:47 +00:00
|
|
|
class Policy
|
2017-03-10 21:11:09 +00:00
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
|
|
|
|
|
|
include Google::Apis::Core::JsonObjectSupport
|
|
|
|
end
|
|
|
|
|
2017-03-27 22:14:47 +00:00
|
|
|
class ListLocationsResponse
|
2017-03-10 21:11:09 +00:00
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
|
|
|
|
|
|
include Google::Apis::Core::JsonObjectSupport
|
|
|
|
end
|
|
|
|
|
2017-03-27 22:14:47 +00:00
|
|
|
class KeyRing
|
2017-03-10 21:11:09 +00:00
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
|
|
|
|
|
|
include Google::Apis::Core::JsonObjectSupport
|
|
|
|
end
|
|
|
|
|
2017-03-27 22:14:47 +00:00
|
|
|
class EncryptResponse
|
2017-03-10 21:11:09 +00:00
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
|
|
|
|
|
|
include Google::Apis::Core::JsonObjectSupport
|
|
|
|
end
|
|
|
|
|
2017-03-27 22:14:47 +00:00
|
|
|
class RestoreCryptoKeyVersionRequest
|
2017-03-10 21:11:09 +00:00
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
|
|
|
|
|
|
include Google::Apis::Core::JsonObjectSupport
|
|
|
|
end
|
|
|
|
|
2017-03-27 22:14:47 +00:00
|
|
|
class UpdateCryptoKeyPrimaryVersionRequest
|
2017-03-10 21:11:09 +00:00
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
|
|
|
|
|
|
include Google::Apis::Core::JsonObjectSupport
|
|
|
|
end
|
|
|
|
|
2017-03-27 22:14:47 +00:00
|
|
|
class ListKeyRingsResponse
|
2017-03-10 21:11:09 +00:00
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
|
|
|
|
|
|
include Google::Apis::Core::JsonObjectSupport
|
|
|
|
end
|
|
|
|
|
2017-03-27 22:14:47 +00:00
|
|
|
class DataAccessOptions
|
2017-03-10 21:11:09 +00:00
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
|
|
|
|
|
|
include Google::Apis::Core::JsonObjectSupport
|
|
|
|
end
|
|
|
|
|
|
|
|
class AuditConfig
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
|
|
|
|
|
|
include Google::Apis::Core::JsonObjectSupport
|
|
|
|
end
|
|
|
|
|
|
|
|
class CryptoKeyVersion
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
|
|
|
|
|
|
include Google::Apis::Core::JsonObjectSupport
|
|
|
|
end
|
|
|
|
|
|
|
|
class CloudAuditOptions
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
|
|
|
|
|
|
include Google::Apis::Core::JsonObjectSupport
|
|
|
|
end
|
|
|
|
|
|
|
|
class Binding
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
|
|
|
|
|
|
include Google::Apis::Core::JsonObjectSupport
|
|
|
|
end
|
|
|
|
|
|
|
|
class EncryptRequest
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
|
|
|
|
|
|
include Google::Apis::Core::JsonObjectSupport
|
|
|
|
end
|
|
|
|
|
|
|
|
class ListCryptoKeyVersionsResponse
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
|
|
|
|
|
|
include Google::Apis::Core::JsonObjectSupport
|
|
|
|
end
|
|
|
|
|
|
|
|
class TestIamPermissionsResponse
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
|
|
|
|
|
|
include Google::Apis::Core::JsonObjectSupport
|
|
|
|
end
|
|
|
|
|
|
|
|
class DestroyCryptoKeyVersionRequest
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
|
|
|
|
|
|
include Google::Apis::Core::JsonObjectSupport
|
|
|
|
end
|
|
|
|
|
2017-03-27 22:14:47 +00:00
|
|
|
class CryptoKey
|
2017-03-10 21:11:09 +00:00
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
|
|
|
|
|
|
include Google::Apis::Core::JsonObjectSupport
|
|
|
|
end
|
|
|
|
|
2017-03-27 22:14:47 +00:00
|
|
|
class Rule
|
2017-03-10 21:11:09 +00:00
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
|
|
|
|
|
|
include Google::Apis::Core::JsonObjectSupport
|
|
|
|
end
|
|
|
|
|
|
|
|
class LogConfig
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
|
|
|
|
|
|
include Google::Apis::Core::JsonObjectSupport
|
|
|
|
end
|
|
|
|
|
|
|
|
class SetIamPolicyRequest
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
|
|
|
|
|
|
include Google::Apis::Core::JsonObjectSupport
|
|
|
|
end
|
|
|
|
|
|
|
|
class DecryptRequest
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
|
|
|
|
|
|
include Google::Apis::Core::JsonObjectSupport
|
|
|
|
end
|
|
|
|
|
|
|
|
class Location
|
2017-03-27 22:14:47 +00:00
|
|
|
# @private
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
|
|
property :name, as: 'name'
|
|
|
|
property :location_id, as: 'locationId'
|
|
|
|
hash :metadata, as: 'metadata'
|
|
|
|
hash :labels, as: 'labels'
|
|
|
|
end
|
2017-03-10 21:11:09 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
class ListCryptoKeysResponse
|
2017-03-27 22:14:47 +00:00
|
|
|
# @private
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
|
|
property :next_page_token, as: 'nextPageToken'
|
|
|
|
collection :crypto_keys, as: 'cryptoKeys', class: Google::Apis::CloudkmsV1::CryptoKey, decorator: Google::Apis::CloudkmsV1::CryptoKey::Representation
|
2017-03-10 21:11:09 +00:00
|
|
|
|
2017-03-27 22:14:47 +00:00
|
|
|
property :total_size, as: 'totalSize'
|
|
|
|
end
|
2017-03-10 21:11:09 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
class Condition
|
|
|
|
# @private
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
|
|
property :op, as: 'op'
|
|
|
|
property :svc, as: 'svc'
|
|
|
|
property :value, as: 'value'
|
2017-03-27 22:14:47 +00:00
|
|
|
property :sys, as: 'sys'
|
2017-03-10 21:11:09 +00:00
|
|
|
property :iam, as: 'iam'
|
2017-03-27 22:14:47 +00:00
|
|
|
collection :values, as: 'values'
|
2017-03-10 21:11:09 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
class CounterOptions
|
|
|
|
# @private
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
|
|
property :metric, as: 'metric'
|
|
|
|
property :field, as: 'field'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
class AuditLogConfig
|
|
|
|
# @private
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
|
|
collection :exempted_members, as: 'exemptedMembers'
|
|
|
|
property :log_type, as: 'logType'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
class DecryptResponse
|
|
|
|
# @private
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
|
|
property :plaintext, :base64 => true, as: 'plaintext'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
class TestIamPermissionsRequest
|
|
|
|
# @private
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
|
|
collection :permissions, as: 'permissions'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
class Policy
|
|
|
|
# @private
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
|
|
property :etag, :base64 => true, as: 'etag'
|
|
|
|
property :iam_owned, as: 'iamOwned'
|
|
|
|
collection :rules, as: 'rules', class: Google::Apis::CloudkmsV1::Rule, decorator: Google::Apis::CloudkmsV1::Rule::Representation
|
|
|
|
|
|
|
|
property :version, as: 'version'
|
|
|
|
collection :audit_configs, as: 'auditConfigs', class: Google::Apis::CloudkmsV1::AuditConfig, decorator: Google::Apis::CloudkmsV1::AuditConfig::Representation
|
|
|
|
|
|
|
|
collection :bindings, as: 'bindings', class: Google::Apis::CloudkmsV1::Binding, decorator: Google::Apis::CloudkmsV1::Binding::Representation
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-03-27 22:14:47 +00:00
|
|
|
class ListLocationsResponse
|
2017-03-10 21:11:09 +00:00
|
|
|
# @private
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation
|
2017-03-27 22:14:47 +00:00
|
|
|
collection :locations, as: 'locations', class: Google::Apis::CloudkmsV1::Location, decorator: Google::Apis::CloudkmsV1::Location::Representation
|
|
|
|
|
|
|
|
property :next_page_token, as: 'nextPageToken'
|
2017-03-10 21:11:09 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
class KeyRing
|
|
|
|
# @private
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
|
|
property :name, as: 'name'
|
2017-03-27 22:14:47 +00:00
|
|
|
property :create_time, as: 'createTime'
|
2017-03-10 21:11:09 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-03-27 22:14:47 +00:00
|
|
|
class EncryptResponse
|
2017-03-10 21:11:09 +00:00
|
|
|
# @private
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation
|
2017-03-27 22:14:47 +00:00
|
|
|
property :name, as: 'name'
|
|
|
|
property :ciphertext, :base64 => true, as: 'ciphertext'
|
2017-03-10 21:11:09 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
class RestoreCryptoKeyVersionRequest
|
|
|
|
# @private
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-03-27 22:14:47 +00:00
|
|
|
class UpdateCryptoKeyPrimaryVersionRequest
|
2017-03-10 21:11:09 +00:00
|
|
|
# @private
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation
|
2017-03-27 22:14:47 +00:00
|
|
|
property :crypto_key_version_id, as: 'cryptoKeyVersionId'
|
2017-03-10 21:11:09 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
class ListKeyRingsResponse
|
|
|
|
# @private
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
|
|
property :next_page_token, as: 'nextPageToken'
|
|
|
|
property :total_size, as: 'totalSize'
|
|
|
|
collection :key_rings, as: 'keyRings', class: Google::Apis::CloudkmsV1::KeyRing, decorator: Google::Apis::CloudkmsV1::KeyRing::Representation
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-03-27 22:14:47 +00:00
|
|
|
class DataAccessOptions
|
|
|
|
# @private
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-03-10 21:11:09 +00:00
|
|
|
class AuditConfig
|
|
|
|
# @private
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
|
|
property :service, as: 'service'
|
|
|
|
collection :audit_log_configs, as: 'auditLogConfigs', class: Google::Apis::CloudkmsV1::AuditLogConfig, decorator: Google::Apis::CloudkmsV1::AuditLogConfig::Representation
|
|
|
|
|
2017-03-27 22:14:47 +00:00
|
|
|
collection :exempted_members, as: 'exemptedMembers'
|
2017-03-10 21:11:09 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
class CryptoKeyVersion
|
|
|
|
# @private
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation
|
2017-03-27 22:14:47 +00:00
|
|
|
property :destroy_time, as: 'destroyTime'
|
|
|
|
property :create_time, as: 'createTime'
|
2017-03-10 21:11:09 +00:00
|
|
|
property :state, as: 'state'
|
|
|
|
property :name, as: 'name'
|
|
|
|
property :destroy_event_time, as: 'destroyEventTime'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
class CloudAuditOptions
|
|
|
|
# @private
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
class Binding
|
|
|
|
# @private
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
|
|
collection :members, as: 'members'
|
|
|
|
property :role, as: 'role'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
class EncryptRequest
|
|
|
|
# @private
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
|
|
property :additional_authenticated_data, :base64 => true, as: 'additionalAuthenticatedData'
|
2017-03-27 22:14:47 +00:00
|
|
|
property :plaintext, :base64 => true, as: 'plaintext'
|
2017-03-10 21:11:09 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
class ListCryptoKeyVersionsResponse
|
|
|
|
# @private
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
|
|
property :next_page_token, as: 'nextPageToken'
|
|
|
|
property :total_size, as: 'totalSize'
|
|
|
|
collection :crypto_key_versions, as: 'cryptoKeyVersions', class: Google::Apis::CloudkmsV1::CryptoKeyVersion, decorator: Google::Apis::CloudkmsV1::CryptoKeyVersion::Representation
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
class TestIamPermissionsResponse
|
|
|
|
# @private
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
|
|
collection :permissions, as: 'permissions'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
class DestroyCryptoKeyVersionRequest
|
|
|
|
# @private
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
class CryptoKey
|
|
|
|
# @private
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
|
|
property :purpose, as: 'purpose'
|
|
|
|
property :next_rotation_time, as: 'nextRotationTime'
|
|
|
|
property :create_time, as: 'createTime'
|
|
|
|
property :rotation_period, as: 'rotationPeriod'
|
|
|
|
property :primary, as: 'primary', class: Google::Apis::CloudkmsV1::CryptoKeyVersion, decorator: Google::Apis::CloudkmsV1::CryptoKeyVersion::Representation
|
|
|
|
|
|
|
|
property :name, as: 'name'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-03-27 22:14:47 +00:00
|
|
|
class Rule
|
|
|
|
# @private
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
|
|
collection :log_config, as: 'logConfig', class: Google::Apis::CloudkmsV1::LogConfig, decorator: Google::Apis::CloudkmsV1::LogConfig::Representation
|
|
|
|
|
|
|
|
collection :in, as: 'in'
|
|
|
|
collection :permissions, as: 'permissions'
|
|
|
|
property :action, as: 'action'
|
|
|
|
collection :not_in, as: 'notIn'
|
|
|
|
property :description, as: 'description'
|
|
|
|
collection :conditions, as: 'conditions', class: Google::Apis::CloudkmsV1::Condition, decorator: Google::Apis::CloudkmsV1::Condition::Representation
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-03-10 21:11:09 +00:00
|
|
|
class LogConfig
|
|
|
|
# @private
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation
|
2017-03-27 22:14:47 +00:00
|
|
|
property :cloud_audit, as: 'cloudAudit', class: Google::Apis::CloudkmsV1::CloudAuditOptions, decorator: Google::Apis::CloudkmsV1::CloudAuditOptions::Representation
|
|
|
|
|
2017-03-10 21:11:09 +00:00
|
|
|
property :counter, as: 'counter', class: Google::Apis::CloudkmsV1::CounterOptions, decorator: Google::Apis::CloudkmsV1::CounterOptions::Representation
|
|
|
|
|
|
|
|
property :data_access, as: 'dataAccess', class: Google::Apis::CloudkmsV1::DataAccessOptions, decorator: Google::Apis::CloudkmsV1::DataAccessOptions::Representation
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
class SetIamPolicyRequest
|
|
|
|
# @private
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
|
|
property :update_mask, as: 'updateMask'
|
|
|
|
property :policy, as: 'policy', class: Google::Apis::CloudkmsV1::Policy, decorator: Google::Apis::CloudkmsV1::Policy::Representation
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
class DecryptRequest
|
|
|
|
# @private
|
|
|
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
|
|
property :ciphertext, :base64 => true, as: 'ciphertext'
|
|
|
|
property :additional_authenticated_data, :base64 => true, as: 'additionalAuthenticatedData'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|