Class: Stigg::Models::V1Beta::EntityUpsertParams::Entity

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/stigg/models/v1_beta/entity_upsert_params.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(id:, metadata: nil, type_ref_id: nil) ⇒ Object

Some parameter documentations has been truncated, see Stigg::Models::V1Beta::EntityUpsertParams::Entity for more details.

A single entity to create or update.

Parameters:

  • id (String)

    The unique identifier for the entity

  • metadata (Hash{Symbol=>String}) (defaults to: nil)

    Free-form key/value metadata. Patch semantics: empty-string value removes a key,

  • type_ref_id (String) (defaults to: nil)

    The entity type refId this entity instantiates. Required when creating a new ent



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/stigg/models/v1_beta/entity_upsert_params.rb', line 29

class Entity < Stigg::Internal::Type::BaseModel
  # @!attribute id
  #   The unique identifier for the entity
  #
  #   @return [String]
  required :id, String

  # @!attribute metadata
  #   Free-form key/value metadata. Patch semantics: empty-string value removes a key,
  #   omitted keys are preserved.
  #
  #   @return [Hash{Symbol=>String}, nil]
  optional :metadata, Stigg::Internal::Type::HashOf[String]

  # @!attribute type_ref_id
  #   The entity type refId this entity instantiates. Required when creating a new
  #   entity; on a re-upsert may be omitted to preserve the existing type. Governance
  #   returns 400 if missing on create.
  #
  #   @return [String, nil]
  optional :type_ref_id, String, api_name: :typeRefId

  # @!method initialize(id:, metadata: nil, type_ref_id: nil)
  #   Some parameter documentations has been truncated, see
  #   {Stigg::Models::V1Beta::EntityUpsertParams::Entity} for more details.
  #
  #   A single entity to create or update.
  #
  #   @param id [String] The unique identifier for the entity
  #
  #   @param metadata [Hash{Symbol=>String}] Free-form key/value metadata. Patch semantics: empty-string value removes a key,
  #
  #   @param type_ref_id [String] The entity type refId this entity instantiates. Required when creating a new ent
end

Instance Attribute Details

#idString

The unique identifier for the entity

Returns:

  • (String)


34
# File 'lib/stigg/models/v1_beta/entity_upsert_params.rb', line 34

required :id, String

#metadataHash{Symbol=>String}?

Free-form key/value metadata. Patch semantics: empty-string value removes a key, omitted keys are preserved.

Returns:

  • (Hash{Symbol=>String}, nil)


41
# File 'lib/stigg/models/v1_beta/entity_upsert_params.rb', line 41

optional :metadata, Stigg::Internal::Type::HashOf[String]

#type_ref_idString?

The entity type refId this entity instantiates. Required when creating a new entity; on a re-upsert may be omitted to preserve the existing type. Governance returns 400 if missing on create.

Returns:

  • (String, nil)


49
# File 'lib/stigg/models/v1_beta/entity_upsert_params.rb', line 49

optional :type_ref_id, String, api_name: :typeRefId