Class: Cadenya::Types::OperationMetadata
- Inherits:
-
Object
- Object
- Cadenya::Types::OperationMetadata
- Defined in:
- lib/cadenya/types.rb
Instance Attribute Summary collapse
-
#account_id ⇒ Object
readonly
Returns the value of attribute account_id.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#external_id ⇒ Object
readonly
Returns the value of attribute external_id.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#labels ⇒ Object
readonly
Returns the value of attribute labels.
-
#profile_id ⇒ Object
readonly
Returns the value of attribute profile_id.
-
#workspace_id ⇒ Object
readonly
Returns the value of attribute workspace_id.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id: nil, account_id: nil, workspace_id: nil, labels: nil, created_at: nil, external_id: nil, profile_id: nil) ⇒ OperationMetadata
constructor
A new instance of OperationMetadata.
- #to_h ⇒ Object
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 = 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_id ⇒ Object (readonly)
Returns the value of attribute account_id.
4454 4455 4456 |
# File 'lib/cadenya/types.rb', line 4454 def account_id @account_id end |
#created_at ⇒ Object (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_id ⇒ Object (readonly)
Returns the value of attribute external_id.
4454 4455 4456 |
# File 'lib/cadenya/types.rb', line 4454 def external_id @external_id end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4454 4455 4456 |
# File 'lib/cadenya/types.rb', line 4454 def id @id end |
#labels ⇒ Object (readonly)
Returns the value of attribute labels.
4454 4455 4456 |
# File 'lib/cadenya/types.rb', line 4454 def labels @labels end |
#profile_id ⇒ Object (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_id ⇒ Object (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_h ⇒ Object
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 |