Class: LaunchDarklyApi::WarehouseSetupScriptPostBody

Inherits:
ApiModelBase
  • Object
show all
Defined in:
lib/launchdarkly_api/models/warehouse_setup_script_post_body.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ApiModelBase

_deserialize, #_to_hash, #to_body, #to_s

Constructor Details

#initialize(attributes = {}) ⇒ WarehouseSetupScriptPostBody

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
# File 'lib/launchdarkly_api/models/warehouse_setup_script_post_body.rb', line 120

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `LaunchDarklyApi::WarehouseSetupScriptPostBody` initialize method"
  end

  # check to see if the attribute exists and convert string to symbol for hash key
  acceptable_attribute_map = self.class.acceptable_attribute_map
  attributes = attributes.each_with_object({}) { |(k, v), h|
    if (!acceptable_attribute_map.key?(k.to_sym))
      fail ArgumentError, "`#{k}` is not a valid attribute in `LaunchDarklyApi::WarehouseSetupScriptPostBody`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
    end
    h[k.to_sym] = v
  }

  if attributes.key?(:'name')
    self.name = attributes[:'name']
  end

  if attributes.key?(:'snowflake_host_address')
    self.snowflake_host_address = attributes[:'snowflake_host_address']
  end

  if attributes.key?(:'database_name')
    self.database_name = attributes[:'database_name']
  end

  if attributes.key?(:'warehouse_name')
    self.warehouse_name = attributes[:'warehouse_name']
  end

  if attributes.key?(:'role_name')
    self.role_name = attributes[:'role_name']
  end

  if attributes.key?(:'schema_name')
    self.schema_name = attributes[:'schema_name']
  end

  if attributes.key?(:'user_name')
    self.user_name = attributes[:'user_name']
  end

  if attributes.key?(:'include_network_policy')
    self.include_network_policy = attributes[:'include_network_policy']
  end

  if attributes.key?(:'cluster_identifier')
    self.cluster_identifier = attributes[:'cluster_identifier']
  end

  if attributes.key?(:'cluster_region')
    self.cluster_region = attributes[:'cluster_region']
  end

  if attributes.key?(:'cluster_aws_account_id')
    self. = attributes[:'cluster_aws_account_id']
  end

  if attributes.key?(:'endpoint')
    self.endpoint = attributes[:'endpoint']
  end

  if attributes.key?(:'click_house_database_name')
    self.click_house_database_name = attributes[:'click_house_database_name']
  end

  if attributes.key?(:'click_house_user_name')
    self.click_house_user_name = attributes[:'click_house_user_name']
  end

  if attributes.key?(:'click_house_s3_bucket_name')
    self.click_house_s3_bucket_name = attributes[:'click_house_s3_bucket_name']
  end

  if attributes.key?(:'click_house_include_host_restriction')
    self.click_house_include_host_restriction = attributes[:'click_house_include_host_restriction']
  end

  if attributes.key?(:'click_house_service_role_arn')
    self.click_house_service_role_arn = attributes[:'click_house_service_role_arn']
  end

  if attributes.key?(:'click_house_password')
    self.click_house_password = attributes[:'click_house_password']
  end
end

Instance Attribute Details

#click_house_database_nameObject

Returns the value of attribute click_house_database_name.



42
43
44
# File 'lib/launchdarkly_api/models/warehouse_setup_script_post_body.rb', line 42

def click_house_database_name
  @click_house_database_name
end

#click_house_include_host_restrictionObject

Returns the value of attribute click_house_include_host_restriction.



48
49
50
# File 'lib/launchdarkly_api/models/warehouse_setup_script_post_body.rb', line 48

def click_house_include_host_restriction
  @click_house_include_host_restriction
end

#click_house_passwordObject

Returns the value of attribute click_house_password.



52
53
54
# File 'lib/launchdarkly_api/models/warehouse_setup_script_post_body.rb', line 52

def click_house_password
  @click_house_password
end

#click_house_s3_bucket_nameObject

Returns the value of attribute click_house_s3_bucket_name.



46
47
48
# File 'lib/launchdarkly_api/models/warehouse_setup_script_post_body.rb', line 46

def click_house_s3_bucket_name
  @click_house_s3_bucket_name
end

#click_house_service_role_arnObject

Returns the value of attribute click_house_service_role_arn.



50
51
52
# File 'lib/launchdarkly_api/models/warehouse_setup_script_post_body.rb', line 50

def click_house_service_role_arn
  @click_house_service_role_arn
end

#click_house_user_nameObject

Returns the value of attribute click_house_user_name.



44
45
46
# File 'lib/launchdarkly_api/models/warehouse_setup_script_post_body.rb', line 44

def click_house_user_name
  @click_house_user_name
end

#cluster_aws_account_idObject

Returns the value of attribute cluster_aws_account_id.



38
39
40
# File 'lib/launchdarkly_api/models/warehouse_setup_script_post_body.rb', line 38

def 
  @cluster_aws_account_id
end

#cluster_identifierObject

Returns the value of attribute cluster_identifier.



34
35
36
# File 'lib/launchdarkly_api/models/warehouse_setup_script_post_body.rb', line 34

def cluster_identifier
  @cluster_identifier
end

#cluster_regionObject

Returns the value of attribute cluster_region.



36
37
38
# File 'lib/launchdarkly_api/models/warehouse_setup_script_post_body.rb', line 36

def cluster_region
  @cluster_region
end

#database_nameObject

Returns the value of attribute database_name.



22
23
24
# File 'lib/launchdarkly_api/models/warehouse_setup_script_post_body.rb', line 22

def database_name
  @database_name
end

#endpointObject

Returns the value of attribute endpoint.



40
41
42
# File 'lib/launchdarkly_api/models/warehouse_setup_script_post_body.rb', line 40

def endpoint
  @endpoint
end

#include_network_policyObject

Returns the value of attribute include_network_policy.



32
33
34
# File 'lib/launchdarkly_api/models/warehouse_setup_script_post_body.rb', line 32

def include_network_policy
  @include_network_policy
end

#nameObject

Returns the value of attribute name.



18
19
20
# File 'lib/launchdarkly_api/models/warehouse_setup_script_post_body.rb', line 18

def name
  @name
end

#role_nameObject

Returns the value of attribute role_name.



26
27
28
# File 'lib/launchdarkly_api/models/warehouse_setup_script_post_body.rb', line 26

def role_name
  @role_name
end

#schema_nameObject

Returns the value of attribute schema_name.



28
29
30
# File 'lib/launchdarkly_api/models/warehouse_setup_script_post_body.rb', line 28

def schema_name
  @schema_name
end

#snowflake_host_addressObject

Returns the value of attribute snowflake_host_address.



20
21
22
# File 'lib/launchdarkly_api/models/warehouse_setup_script_post_body.rb', line 20

def snowflake_host_address
  @snowflake_host_address
end

#user_nameObject

Returns the value of attribute user_name.



30
31
32
# File 'lib/launchdarkly_api/models/warehouse_setup_script_post_body.rb', line 30

def user_name
  @user_name
end

#warehouse_nameObject

Returns the value of attribute warehouse_name.



24
25
26
# File 'lib/launchdarkly_api/models/warehouse_setup_script_post_body.rb', line 24

def warehouse_name
  @warehouse_name
end

Class Method Details

.acceptable_attribute_mapObject

Returns attribute mapping this model knows about



79
80
81
# File 'lib/launchdarkly_api/models/warehouse_setup_script_post_body.rb', line 79

def self.acceptable_attribute_map
  attribute_map
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about



84
85
86
# File 'lib/launchdarkly_api/models/warehouse_setup_script_post_body.rb', line 84

def self.acceptable_attributes
  acceptable_attribute_map.values
end

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/launchdarkly_api/models/warehouse_setup_script_post_body.rb', line 55

def self.attribute_map
  {
    :'name' => :'name',
    :'snowflake_host_address' => :'snowflakeHostAddress',
    :'database_name' => :'databaseName',
    :'warehouse_name' => :'warehouseName',
    :'role_name' => :'roleName',
    :'schema_name' => :'schemaName',
    :'user_name' => :'userName',
    :'include_network_policy' => :'includeNetworkPolicy',
    :'cluster_identifier' => :'clusterIdentifier',
    :'cluster_region' => :'clusterRegion',
    :'cluster_aws_account_id' => :'clusterAwsAccountId',
    :'endpoint' => :'endpoint',
    :'click_house_database_name' => :'clickHouseDatabaseName',
    :'click_house_user_name' => :'clickHouseUserName',
    :'click_house_s3_bucket_name' => :'clickHouseS3BucketName',
    :'click_house_include_host_restriction' => :'clickHouseIncludeHostRestriction',
    :'click_house_service_role_arn' => :'clickHouseServiceRoleArn',
    :'click_house_password' => :'clickHousePassword'
  }
end

.build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
# File 'lib/launchdarkly_api/models/warehouse_setup_script_post_body.rb', line 262

def self.build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  attributes = attributes.transform_keys(&:to_sym)
  transformed_hash = {}
  openapi_types.each_pair do |key, type|
    if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
      transformed_hash["#{key}"] = nil
    elsif type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the attribute
      # is documented as an array but the input is not
      if attributes[attribute_map[key]].is_a?(Array)
        transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
      end
    elsif !attributes[attribute_map[key]].nil?
      transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
    end
  end
  new(transformed_hash)
end

.openapi_nullableObject

List of attributes with nullable: true



113
114
115
116
# File 'lib/launchdarkly_api/models/warehouse_setup_script_post_body.rb', line 113

def self.openapi_nullable
  Set.new([
  ])
end

.openapi_typesObject

Attribute type mapping.



89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/launchdarkly_api/models/warehouse_setup_script_post_body.rb', line 89

def self.openapi_types
  {
    :'name' => :'String',
    :'snowflake_host_address' => :'String',
    :'database_name' => :'String',
    :'warehouse_name' => :'String',
    :'role_name' => :'String',
    :'schema_name' => :'String',
    :'user_name' => :'String',
    :'include_network_policy' => :'Boolean',
    :'cluster_identifier' => :'String',
    :'cluster_region' => :'String',
    :'cluster_aws_account_id' => :'String',
    :'endpoint' => :'String',
    :'click_house_database_name' => :'String',
    :'click_house_user_name' => :'String',
    :'click_house_s3_bucket_name' => :'String',
    :'click_house_include_host_restriction' => :'Boolean',
    :'click_house_service_role_arn' => :'String',
    :'click_house_password' => :'String'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
# File 'lib/launchdarkly_api/models/warehouse_setup_script_post_body.rb', line 224

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      name == o.name &&
      snowflake_host_address == o.snowflake_host_address &&
      database_name == o.database_name &&
      warehouse_name == o.warehouse_name &&
      role_name == o.role_name &&
      schema_name == o.schema_name &&
      user_name == o.user_name &&
      include_network_policy == o.include_network_policy &&
      cluster_identifier == o.cluster_identifier &&
      cluster_region == o.cluster_region &&
       == o. &&
      endpoint == o.endpoint &&
      click_house_database_name == o.click_house_database_name &&
      click_house_user_name == o.click_house_user_name &&
      click_house_s3_bucket_name == o.click_house_s3_bucket_name &&
      click_house_include_host_restriction == o.click_house_include_host_restriction &&
      click_house_service_role_arn == o.click_house_service_role_arn &&
      click_house_password == o.click_house_password
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


249
250
251
# File 'lib/launchdarkly_api/models/warehouse_setup_script_post_body.rb', line 249

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



255
256
257
# File 'lib/launchdarkly_api/models/warehouse_setup_script_post_body.rb', line 255

def hash
  [name, snowflake_host_address, database_name, warehouse_name, role_name, schema_name, user_name, include_network_policy, cluster_identifier, cluster_region, , endpoint, click_house_database_name, click_house_user_name, click_house_s3_bucket_name, click_house_include_host_restriction, click_house_service_role_arn, click_house_password].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



209
210
211
212
213
# File 'lib/launchdarkly_api/models/warehouse_setup_script_post_body.rb', line 209

def list_invalid_properties
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
  invalid_properties = Array.new
  invalid_properties
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



284
285
286
287
288
289
290
291
292
293
294
295
296
# File 'lib/launchdarkly_api/models/warehouse_setup_script_post_body.rb', line 284

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    if value.nil?
      is_nullable = self.class.openapi_nullable.include?(attr)
      next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
    end

    hash[param] = _to_hash(value)
  end
  hash
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



217
218
219
220
# File 'lib/launchdarkly_api/models/warehouse_setup_script_post_body.rb', line 217

def valid?
  warn '[DEPRECATED] the `valid?` method is obsolete'
  true
end