Class: Cadenya::Types::OperationMetadata

Inherits:
Object
  • Object
show all
Defined in:
lib/cadenya/types.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id: nil, account_id: nil, workspace_id: nil, labels: nil, created_at: nil, external_id: nil, profile_id: nil) ⇒ OperationMetadata

Returns a new instance of OperationMetadata.



4456
4457
4458
4459
4460
4461
4462
4463
4464
# File 'lib/cadenya/types.rb', line 4456

def initialize(id: nil, account_id: nil, workspace_id: nil, labels: nil, created_at: nil, external_id: nil, profile_id: nil)
  @id = id
  @account_id = 
  @workspace_id = workspace_id
  @labels = labels
  @created_at = created_at
  @external_id = external_id
  @profile_id = profile_id
end

Instance Attribute Details

#account_idObject (readonly)

Returns the value of attribute account_id.



4454
4455
4456
# File 'lib/cadenya/types.rb', line 4454

def 
  @account_id
end

#created_atObject (readonly)

Returns the value of attribute created_at.



4454
4455
4456
# File 'lib/cadenya/types.rb', line 4454

def created_at
  @created_at
end

#external_idObject (readonly)

Returns the value of attribute external_id.



4454
4455
4456
# File 'lib/cadenya/types.rb', line 4454

def external_id
  @external_id
end

#idObject (readonly)

Returns the value of attribute id.



4454
4455
4456
# File 'lib/cadenya/types.rb', line 4454

def id
  @id
end

#labelsObject (readonly)

Returns the value of attribute labels.



4454
4455
4456
# File 'lib/cadenya/types.rb', line 4454

def labels
  @labels
end

#profile_idObject (readonly)

Returns the value of attribute profile_id.



4454
4455
4456
# File 'lib/cadenya/types.rb', line 4454

def profile_id
  @profile_id
end

#workspace_idObject (readonly)

Returns the value of attribute workspace_id.



4454
4455
4456
# File 'lib/cadenya/types.rb', line 4454

def workspace_id
  @workspace_id
end

Class Method Details

.from_json(data) ⇒ Object



4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
# File 'lib/cadenya/types.rb', line 4466

def self.from_json(data)
  new(
    id: data["id"],
    account_id: data["accountId"],
    workspace_id: data["workspaceId"],
    labels: data["labels"],
    created_at: data["createdAt"].nil? ? nil : Time.iso8601(data["createdAt"]),
    external_id: data["externalId"],
    profile_id: data["profileId"],
  )
end

Instance Method Details

#to_hObject



4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
# File 'lib/cadenya/types.rb', line 4478

def to_h
  {
    id: Util.plain(@id),
    account_id: Util.plain(@account_id),
    workspace_id: Util.plain(@workspace_id),
    labels: Util.plain(@labels),
    created_at: Util.plain(@created_at),
    external_id: Util.plain(@external_id),
    profile_id: Util.plain(@profile_id),
  }.reject { |_k, v| v.nil? }
end