Class: ListSecretsOptions

Inherits:
Dry::Struct
  • Object
show all
Defined in:
lib/schemas.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_dynamic!(d) ⇒ Object



717
718
719
720
721
722
723
724
725
726
727
728
# File 'lib/schemas.rb', line 717

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    attach_to_process_env:    d["attachToProcessEnv"],
    environment:              d.fetch("environment"),
    expand_secret_references: d["expandSecretReferences"],
    include_imports:          d["includeImports"],
    path:                     d["path"],
    project_id:               d.fetch("projectId"),
    recursive:                d["recursive"],
  )
end

.from_json!(json) ⇒ Object



730
731
732
# File 'lib/schemas.rb', line 730

def self.from_json!(json)
  from_dynamic!(JSON.parse(json))
end

Instance Method Details

#to_dynamicObject



734
735
736
737
738
739
740
741
742
743
744
# File 'lib/schemas.rb', line 734

def to_dynamic
  {
    "attachToProcessEnv"     => attach_to_process_env,
    "environment"            => environment,
    "expandSecretReferences" => expand_secret_references,
    "includeImports"         => include_imports,
    "path"                   => path,
    "projectId"              => project_id,
    "recursive"              => recursive,
  }
end

#to_json(options = nil) ⇒ Object



746
747
748
# File 'lib/schemas.rb', line 746

def to_json(options = nil)
  JSON.generate(to_dynamic, options)
end