Class: Google::Apis::CloudresourcemanagerV1::Lien

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/cloudresourcemanager_v1/classes.rb,
generated/google/apis/cloudresourcemanager_v1/representations.rb,
generated/google/apis/cloudresourcemanager_v1/representations.rb

Overview

A Lien represents an encumbrance on the actions that can be performed on a resource.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Lien

Returns a new instance of Lien.



727
728
729
# File 'generated/google/apis/cloudresourcemanager_v1/classes.rb', line 727

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

Instance Attribute Details

#create_timeString

The creation time of this Lien. Corresponds to the JSON property createTime

Returns:

  • (String)


688
689
690
# File 'generated/google/apis/cloudresourcemanager_v1/classes.rb', line 688

def create_time
  @create_time
end

#nameString

A system-generated unique identifier for this Lien. Example: liens/1234abcd Corresponds to the JSON property name

Returns:

  • (String)


694
695
696
# File 'generated/google/apis/cloudresourcemanager_v1/classes.rb', line 694

def name
  @name
end

#originString

A stable, user-visible/meaningful string identifying the origin of the Lien, intended to be inspected programmatically. Maximum length of 200 characters. Example: 'compute.googleapis.com' Corresponds to the JSON property origin

Returns:

  • (String)


702
703
704
# File 'generated/google/apis/cloudresourcemanager_v1/classes.rb', line 702

def origin
  @origin
end

#parentString

A reference to the resource this Lien is attached to. The server will validate the parent against those for which Liens are supported. Example: projects/1234 Corresponds to the JSON property parent

Returns:

  • (String)


709
710
711
# File 'generated/google/apis/cloudresourcemanager_v1/classes.rb', line 709

def parent
  @parent
end

#reasonString

Concise user-visible strings indicating why an action cannot be performed on a resource. Maximum length of 200 characters. Example: 'Holds production API key' Corresponds to the JSON property reason

Returns:

  • (String)


716
717
718
# File 'generated/google/apis/cloudresourcemanager_v1/classes.rb', line 716

def reason
  @reason
end

#restrictionsArray<String>

The types of operations which should be blocked as a result of this Lien. Each value should correspond to an IAM permission. The server will validate the permissions against those for which Liens are supported. An empty list is meaningless and will be rejected. Example: ['resourcemanager.projects.delete'] Corresponds to the JSON property restrictions

Returns:

  • (Array<String>)


725
726
727
# File 'generated/google/apis/cloudresourcemanager_v1/classes.rb', line 725

def restrictions
  @restrictions
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



732
733
734
735
736
737
738
739
# File 'generated/google/apis/cloudresourcemanager_v1/classes.rb', line 732

def update!(**args)
  @create_time = args[:create_time] if args.key?(:create_time)
  @name = args[:name] if args.key?(:name)
  @origin = args[:origin] if args.key?(:origin)
  @parent = args[:parent] if args.key?(:parent)
  @reason = args[:reason] if args.key?(:reason)
  @restrictions = args[:restrictions] if args.key?(:restrictions)
end