Class: Google::Apis::ServiceusageV1::GoogleApiServiceusageV2betaConsumerPolicy

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/serviceusage_v1/classes.rb,
lib/google/apis/serviceusage_v1/representations.rb,
lib/google/apis/serviceusage_v1/representations.rb

Overview

Consumer Policy is a set of rules that define what services or service groups can be used for a cloud resource hierarchy.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleApiServiceusageV2betaConsumerPolicy

Returns a new instance of GoogleApiServiceusageV2betaConsumerPolicy.



2747
2748
2749
# File 'lib/google/apis/serviceusage_v1/classes.rb', line 2747

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

Instance Attribute Details

#annotationsHash<String,String>

Optional. Annotations is an unstructured key-value map stored with a policy that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. AIP- 128 Corresponds to the JSON property annotations

Returns:

  • (Hash<String,String>)


2714
2715
2716
# File 'lib/google/apis/serviceusage_v1/classes.rb', line 2714

def annotations
  @annotations
end

#create_timeString

Output only. The time the policy was created. For singleton policies, this is the first touch of the policy. Corresponds to the JSON property createTime

Returns:

  • (String)


2720
2721
2722
# File 'lib/google/apis/serviceusage_v1/classes.rb', line 2720

def create_time
  @create_time
end

#enable_rulesArray<Google::Apis::ServiceusageV1::GoogleApiServiceusageV2betaEnableRule>

Enable rules define usable services, groups, and categories. There can currently be at most one EnableRule. This restriction will be lifted in later releases. Corresponds to the JSON property enableRules



2727
2728
2729
# File 'lib/google/apis/serviceusage_v1/classes.rb', line 2727

def enable_rules
  @enable_rules
end

#etagString

Output only. An opaque tag indicating the current version of the policy, used for concurrency control. Corresponds to the JSON property etag

Returns:

  • (String)


2733
2734
2735
# File 'lib/google/apis/serviceusage_v1/classes.rb', line 2733

def etag
  @etag
end

#nameString

Output only. The resource name of the policy. Only the default policy is supported: projects/12345/consumerPolicies/default, folders/12345/ consumerPolicies/default, organizations/12345/consumerPolicies/default. Corresponds to the JSON property name

Returns:

  • (String)


2740
2741
2742
# File 'lib/google/apis/serviceusage_v1/classes.rb', line 2740

def name
  @name
end

#update_timeString

Output only. The time the policy was last updated. Corresponds to the JSON property updateTime

Returns:

  • (String)


2745
2746
2747
# File 'lib/google/apis/serviceusage_v1/classes.rb', line 2745

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2752
2753
2754
2755
2756
2757
2758
2759
# File 'lib/google/apis/serviceusage_v1/classes.rb', line 2752

def update!(**args)
  @annotations = args[:annotations] if args.key?(:annotations)
  @create_time = args[:create_time] if args.key?(:create_time)
  @enable_rules = args[:enable_rules] if args.key?(:enable_rules)
  @etag = args[:etag] if args.key?(:etag)
  @name = args[:name] if args.key?(:name)
  @update_time = args[:update_time] if args.key?(:update_time)
end