Class: Google::Apis::CloudresourcemanagerV2::Folder

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

Overview

A Folder in an Organization's resource hierarchy, used to organize that Organization's resources.

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) ⇒ Folder

Returns a new instance of Folder



224
225
226
# File 'generated/google/apis/cloudresourcemanager_v2/classes.rb', line 224

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

Instance Attribute Details

#create_timeString

Output only. Timestamp when the Folder was created. Assigned by the server. Corresponds to the JSON property createTime

Returns:

  • (String)


190
191
192
# File 'generated/google/apis/cloudresourcemanager_v2/classes.rb', line 190

def create_time
  @create_time
end

#display_nameString

The folder’s display name. A folder’s display name must be unique amongst its siblings, e.g. no two folders with the same parent can share the same display name. The display name must start and end with a letter or digit, may contain letters, digits, spaces, hyphens and underscores and can be no longer than 30 characters. This is captured by the regular expression: \pL\pN?. Corresponds to the JSON property displayName

Returns:

  • (String)


201
202
203
# File 'generated/google/apis/cloudresourcemanager_v2/classes.rb', line 201

def display_name
  @display_name
end

#lifecycle_stateString

Output only. The lifecycle state of the folder. Updates to the lifecycle_state must be performed via DeleteFolder and UndeleteFolder. Corresponds to the JSON property lifecycleState

Returns:

  • (String)


209
210
211
# File 'generated/google/apis/cloudresourcemanager_v2/classes.rb', line 209

def lifecycle_state
  @lifecycle_state
end

#nameString

Output only. The resource name of the Folder. Its format is folders/folder_id`, for example: "folders/1234". Corresponds to the JSON propertyname`

Returns:

  • (String)


215
216
217
# File 'generated/google/apis/cloudresourcemanager_v2/classes.rb', line 215

def name
  @name
end

#parentString

The Folder’s parent's resource name. Updates to the folder's parent must be performed via MoveFolder. Corresponds to the JSON property parent

Returns:

  • (String)


222
223
224
# File 'generated/google/apis/cloudresourcemanager_v2/classes.rb', line 222

def parent
  @parent
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



229
230
231
232
233
234
235
# File 'generated/google/apis/cloudresourcemanager_v2/classes.rb', line 229

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