Class: SemgrepWebApp::ProtosOpenapiV1GetBootstrapSmsVpcResponse

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/semgrep_web_app/models/protos_openapi_v1_get_bootstrap_sms_vpc_response.rb

Overview

ProtosOpenapiV1GetBootstrapSmsVpcResponse Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(aws_template_format_version: SKIP, description: SKIP, metadata: SKIP, outputs: SKIP, parameters: SKIP, resources: SKIP, additional_properties: nil) ⇒ ProtosOpenapiV1GetBootstrapSmsVpcResponse

Returns a new instance of ProtosOpenapiV1GetBootstrapSmsVpcResponse.



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/semgrep_web_app/models/protos_openapi_v1_get_bootstrap_sms_vpc_response.rb', line 65

def initialize(aws_template_format_version: SKIP, description: SKIP,
               metadata: SKIP, outputs: SKIP, parameters: SKIP,
               resources: SKIP, additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  unless aws_template_format_version == SKIP
    @aws_template_format_version =
      aws_template_format_version
  end
  @description = description unless description == SKIP
  @metadata =  unless  == SKIP
  @outputs = outputs unless outputs == SKIP
  @parameters = parameters unless parameters == SKIP
  @resources = resources unless resources == SKIP
  @additional_properties = additional_properties
end

Instance Attribute Details

#aws_template_format_versionString

The AWSTemplateFormatVersion that the template conforms to

Returns:

  • (String)


14
15
16
# File 'lib/semgrep_web_app/models/protos_openapi_v1_get_bootstrap_sms_vpc_response.rb', line 14

def aws_template_format_version
  @aws_template_format_version
end

#descriptionString

Template description

Returns:

  • (String)


18
19
20
# File 'lib/semgrep_web_app/models/protos_openapi_v1_get_bootstrap_sms_vpc_response.rb', line 18

def description
  @description
end

#metadataObject

Template metadata including version and last updated date

Returns:

  • (Object)


22
23
24
# File 'lib/semgrep_web_app/models/protos_openapi_v1_get_bootstrap_sms_vpc_response.rb', line 22

def 
  @metadata
end

#outputsObject

Output values of the stack

Returns:

  • (Object)


26
27
28
# File 'lib/semgrep_web_app/models/protos_openapi_v1_get_bootstrap_sms_vpc_response.rb', line 26

def outputs
  @outputs
end

#parametersObject

Template parameters

Returns:

  • (Object)


30
31
32
# File 'lib/semgrep_web_app/models/protos_openapi_v1_get_bootstrap_sms_vpc_response.rb', line 30

def parameters
  @parameters
end

#resourcesObject

Declaration of AWS resources

Returns:

  • (Object)


34
35
36
# File 'lib/semgrep_web_app/models/protos_openapi_v1_get_bootstrap_sms_vpc_response.rb', line 34

def resources
  @resources
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# File 'lib/semgrep_web_app/models/protos_openapi_v1_get_bootstrap_sms_vpc_response.rb', line 84

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  aws_template_format_version =
    hash.key?('AWSTemplateFormatVersion') ? hash['AWSTemplateFormatVersion'] : SKIP
  description = hash.key?('Description') ? hash['Description'] : SKIP
   = hash.key?('Metadata') ? hash['Metadata'] : SKIP
  outputs = hash.key?('Outputs') ? hash['Outputs'] : SKIP
  parameters = hash.key?('Parameters') ? hash['Parameters'] : SKIP
  resources = hash.key?('Resources') ? hash['Resources'] : SKIP

  # Create a new hash for additional properties, removing known properties.
  new_hash = hash.reject { |k, _| names.value?(k) }

  additional_properties = APIHelper.get_additional_properties(
    new_hash, proc { |value| value }
  )

  # Create object from extracted values.
  ProtosOpenapiV1GetBootstrapSmsVpcResponse.new(aws_template_format_version: aws_template_format_version,
                                                description: description,
                                                metadata: ,
                                                outputs: outputs,
                                                parameters: parameters,
                                                resources: resources,
                                                additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



37
38
39
40
41
42
43
44
45
46
# File 'lib/semgrep_web_app/models/protos_openapi_v1_get_bootstrap_sms_vpc_response.rb', line 37

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['aws_template_format_version'] = 'AWSTemplateFormatVersion'
  @_hash['description'] = 'Description'
  @_hash['metadata'] = 'Metadata'
  @_hash['outputs'] = 'Outputs'
  @_hash['parameters'] = 'Parameters'
  @_hash['resources'] = 'Resources'
  @_hash
end

.nullablesObject

An array for nullable fields



61
62
63
# File 'lib/semgrep_web_app/models/protos_openapi_v1_get_bootstrap_sms_vpc_response.rb', line 61

def self.nullables
  []
end

.optionalsObject

An array for optional fields



49
50
51
52
53
54
55
56
57
58
# File 'lib/semgrep_web_app/models/protos_openapi_v1_get_bootstrap_sms_vpc_response.rb', line 49

def self.optionals
  %w[
    aws_template_format_version
    description
    metadata
    outputs
    parameters
    resources
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



122
123
124
125
126
127
128
# File 'lib/semgrep_web_app/models/protos_openapi_v1_get_bootstrap_sms_vpc_response.rb', line 122

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} aws_template_format_version: #{@aws_template_format_version.inspect},"\
  " description: #{@description.inspect}, metadata: #{@metadata.inspect}, outputs:"\
  " #{@outputs.inspect}, parameters: #{@parameters.inspect}, resources: #{@resources.inspect},"\
  " additional_properties: #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



114
115
116
117
118
119
# File 'lib/semgrep_web_app/models/protos_openapi_v1_get_bootstrap_sms_vpc_response.rb', line 114

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} aws_template_format_version: #{@aws_template_format_version}, description:"\
  " #{@description}, metadata: #{@metadata}, outputs: #{@outputs}, parameters: #{@parameters},"\
  " resources: #{@resources}, additional_properties: #{@additional_properties}>"
end