Class: OCI::Core::Models::ListIpInventoryDetails

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/core/models/list_ip_inventory_details.rb

Overview

Required input parameters for retrieving IP Inventory data within the specified compartments of a region.

Constant Summary collapse

RESOURCE_TYPE_LIST_ENUM =
[
  RESOURCE_TYPE_LIST_RESOURCE = 'Resource'.freeze
].freeze
SORT_BY_ENUM =
[
  SORT_BY_DISPLAYNAME = 'DISPLAYNAME'.freeze,
  SORT_BY_UTILIZATION = 'UTILIZATION'.freeze,
  SORT_BY_DNS_HOSTNAME = 'DNS_HOSTNAME'.freeze,
  SORT_BY_REGION = 'REGION'.freeze
].freeze
SORT_ORDER_ENUM =
[
  SORT_ORDER_ASC = 'ASC'.freeze,
  SORT_ORDER_DESC = 'DESC'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ ListIpInventoryDetails

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :region_list (Array<String>)

    The value to assign to the #region_list property

  • :compartment_list (Array<String>)

    The value to assign to the #compartment_list property

  • :override_filters (BOOLEAN)

    The value to assign to the #override_filters property

  • :utilization (Float)

    The value to assign to the #utilization property

  • :overlapping_vcns_only (BOOLEAN)

    The value to assign to the #overlapping_vcns_only property

  • :address_type_list (Array<OCI::Core::Models::AddressType>)

    The value to assign to the #address_type_list property

  • :resource_type_list (Array<String>)

    The value to assign to the #resource_type_list property

  • :search_keyword (String)

    The value to assign to the #search_keyword property

  • :sort_by (String)

    The value to assign to the #sort_by property

  • :sort_order (String)

    The value to assign to the #sort_order property

  • :pagination_offset (Integer)

    The value to assign to the #pagination_offset property

  • :pagination_limit (Integer)

    The value to assign to the #pagination_limit property



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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
# File 'lib/oci/core/models/list_ip_inventory_details.rb', line 145

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  self.region_list = attributes[:'regionList'] if attributes[:'regionList']

  raise 'You cannot provide both :regionList and :region_list' if attributes.key?(:'regionList') && attributes.key?(:'region_list')

  self.region_list = attributes[:'region_list'] if attributes[:'region_list']

  self.compartment_list = attributes[:'compartmentList'] if attributes[:'compartmentList']

  raise 'You cannot provide both :compartmentList and :compartment_list' if attributes.key?(:'compartmentList') && attributes.key?(:'compartment_list')

  self.compartment_list = attributes[:'compartment_list'] if attributes[:'compartment_list']

  self.override_filters = attributes[:'overrideFilters'] unless attributes[:'overrideFilters'].nil?
  self.override_filters = false if override_filters.nil? && !attributes.key?(:'overrideFilters') # rubocop:disable Style/StringLiterals

  raise 'You cannot provide both :overrideFilters and :override_filters' if attributes.key?(:'overrideFilters') && attributes.key?(:'override_filters')

  self.override_filters = attributes[:'override_filters'] unless attributes[:'override_filters'].nil?
  self.override_filters = false if override_filters.nil? && !attributes.key?(:'overrideFilters') && !attributes.key?(:'override_filters') # rubocop:disable Style/StringLiterals

  self.utilization = attributes[:'utilization'] if attributes[:'utilization']

  self.overlapping_vcns_only = attributes[:'overlappingVcnsOnly'] unless attributes[:'overlappingVcnsOnly'].nil?
  self.overlapping_vcns_only = false if overlapping_vcns_only.nil? && !attributes.key?(:'overlappingVcnsOnly') # rubocop:disable Style/StringLiterals

  raise 'You cannot provide both :overlappingVcnsOnly and :overlapping_vcns_only' if attributes.key?(:'overlappingVcnsOnly') && attributes.key?(:'overlapping_vcns_only')

  self.overlapping_vcns_only = attributes[:'overlapping_vcns_only'] unless attributes[:'overlapping_vcns_only'].nil?
  self.overlapping_vcns_only = false if overlapping_vcns_only.nil? && !attributes.key?(:'overlappingVcnsOnly') && !attributes.key?(:'overlapping_vcns_only') # rubocop:disable Style/StringLiterals

  self.address_type_list = attributes[:'addressTypeList'] if attributes[:'addressTypeList']

  raise 'You cannot provide both :addressTypeList and :address_type_list' if attributes.key?(:'addressTypeList') && attributes.key?(:'address_type_list')

  self.address_type_list = attributes[:'address_type_list'] if attributes[:'address_type_list']

  self.resource_type_list = attributes[:'resourceTypeList'] if attributes[:'resourceTypeList']

  raise 'You cannot provide both :resourceTypeList and :resource_type_list' if attributes.key?(:'resourceTypeList') && attributes.key?(:'resource_type_list')

  self.resource_type_list = attributes[:'resource_type_list'] if attributes[:'resource_type_list']

  self.search_keyword = attributes[:'searchKeyword'] if attributes[:'searchKeyword']

  raise 'You cannot provide both :searchKeyword and :search_keyword' if attributes.key?(:'searchKeyword') && attributes.key?(:'search_keyword')

  self.search_keyword = attributes[:'search_keyword'] if attributes[:'search_keyword']

  self.sort_by = attributes[:'sortBy'] if attributes[:'sortBy']
  self.sort_by = "DISPLAYNAME" if sort_by.nil? && !attributes.key?(:'sortBy') # rubocop:disable Style/StringLiterals

  raise 'You cannot provide both :sortBy and :sort_by' if attributes.key?(:'sortBy') && attributes.key?(:'sort_by')

  self.sort_by = attributes[:'sort_by'] if attributes[:'sort_by']
  self.sort_by = "DISPLAYNAME" if sort_by.nil? && !attributes.key?(:'sortBy') && !attributes.key?(:'sort_by') # rubocop:disable Style/StringLiterals

  self.sort_order = attributes[:'sortOrder'] if attributes[:'sortOrder']
  self.sort_order = "ASC" if sort_order.nil? && !attributes.key?(:'sortOrder') # rubocop:disable Style/StringLiterals

  raise 'You cannot provide both :sortOrder and :sort_order' if attributes.key?(:'sortOrder') && attributes.key?(:'sort_order')

  self.sort_order = attributes[:'sort_order'] if attributes[:'sort_order']
  self.sort_order = "ASC" if sort_order.nil? && !attributes.key?(:'sortOrder') && !attributes.key?(:'sort_order') # rubocop:disable Style/StringLiterals

  self.pagination_offset = attributes[:'paginationOffset'] if attributes[:'paginationOffset']
  self.pagination_offset = 0 if pagination_offset.nil? && !attributes.key?(:'paginationOffset') # rubocop:disable Style/StringLiterals

  raise 'You cannot provide both :paginationOffset and :pagination_offset' if attributes.key?(:'paginationOffset') && attributes.key?(:'pagination_offset')

  self.pagination_offset = attributes[:'pagination_offset'] if attributes[:'pagination_offset']
  self.pagination_offset = 0 if pagination_offset.nil? && !attributes.key?(:'paginationOffset') && !attributes.key?(:'pagination_offset') # rubocop:disable Style/StringLiterals

  self.pagination_limit = attributes[:'paginationLimit'] if attributes[:'paginationLimit']
  self.pagination_limit = 10 if pagination_limit.nil? && !attributes.key?(:'paginationLimit') # rubocop:disable Style/StringLiterals

  raise 'You cannot provide both :paginationLimit and :pagination_limit' if attributes.key?(:'paginationLimit') && attributes.key?(:'pagination_limit')

  self.pagination_limit = attributes[:'pagination_limit'] if attributes[:'pagination_limit']
  self.pagination_limit = 10 if pagination_limit.nil? && !attributes.key?(:'paginationLimit') && !attributes.key?(:'pagination_limit') # rubocop:disable Style/StringLiterals
end

Instance Attribute Details

#address_type_listArray<OCI::Core::Models::AddressType>

List of IP address types used.

Returns:

  • (Array<OCI::Core::Models::AddressType>)


50
51
52
# File 'lib/oci/core/models/list_ip_inventory_details.rb', line 50

def address_type_list
  @address_type_list
end

#compartment_listArray<String>

[Required] List the OCID of the compartments.

Returns:

  • (Array<String>)


34
35
36
# File 'lib/oci/core/models/list_ip_inventory_details.rb', line 34

def compartment_list
  @compartment_list
end

#overlapping_vcns_onlyBOOLEAN

List of overlapping VCNs.

Returns:

  • (BOOLEAN)


46
47
48
# File 'lib/oci/core/models/list_ip_inventory_details.rb', line 46

def overlapping_vcns_only
  @overlapping_vcns_only
end

#override_filtersBOOLEAN

List of selected filters.

Returns:

  • (BOOLEAN)


38
39
40
# File 'lib/oci/core/models/list_ip_inventory_details.rb', line 38

def override_filters
  @override_filters
end

#pagination_limitInteger

Specifies the maximum number of results displayed per page for a paginated "List" call. For more information, see List Pagination. Example: 50

Returns:

  • (Integer)


85
86
87
# File 'lib/oci/core/models/list_ip_inventory_details.rb', line 85

def pagination_limit
  @pagination_limit
end

#pagination_offsetInteger

Most List operations paginate results. Results are paginated for the ListInstances operations. When you call a paginated List operation, the response indicates more pages of results by including the opc-next-page header. For more information, see List Pagination.

Returns:

  • (Integer)


79
80
81
# File 'lib/oci/core/models/list_ip_inventory_details.rb', line 79

def pagination_offset
  @pagination_offset
end

#region_listArray<String>

[Required] Lists the selected regions.

Returns:

  • (Array<String>)


30
31
32
# File 'lib/oci/core/models/list_ip_inventory_details.rb', line 30

def region_list
  @region_list
end

#resource_type_listArray<String>

List of VCN resource types.

Returns:

  • (Array<String>)


54
55
56
# File 'lib/oci/core/models/list_ip_inventory_details.rb', line 54

def resource_type_list
  @resource_type_list
end

#search_keywordString

Filters the results for the specified string.

Returns:

  • (String)


58
59
60
# File 'lib/oci/core/models/list_ip_inventory_details.rb', line 58

def search_keyword
  @search_keyword
end

#sort_byString

Provide the sort order (sortOrder) to sort the fields such as TIMECREATED in descending or descending order, and DISPLAYNAME in case sensitive.

Note: For some "List" operations (for example, ListInstances), sort resources by an availability domain when the resources belong to a single availability domain. If you sort the "List" operations without specifying an availability domain, the resources are grouped by availability domains and then sorted.

Returns:

  • (String)


67
68
69
# File 'lib/oci/core/models/list_ip_inventory_details.rb', line 67

def sort_by
  @sort_by
end

#sort_orderString

Specifies the sort order to use. Select either ascending (ASC) or descending (DESC) order. The DISPLAYNAME sort order is case sensitive.

Returns:

  • (String)


73
74
75
# File 'lib/oci/core/models/list_ip_inventory_details.rb', line 73

def sort_order
  @sort_order
end

#utilizationFloat

The CIDR utilization of a VCN.

Returns:

  • (Float)


42
43
44
# File 'lib/oci/core/models/list_ip_inventory_details.rb', line 42

def utilization
  @utilization
end

Class Method Details

.attribute_mapObject

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



88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# File 'lib/oci/core/models/list_ip_inventory_details.rb', line 88

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'region_list': :'regionList',
    'compartment_list': :'compartmentList',
    'override_filters': :'overrideFilters',
    'utilization': :'utilization',
    'overlapping_vcns_only': :'overlappingVcnsOnly',
    'address_type_list': :'addressTypeList',
    'resource_type_list': :'resourceTypeList',
    'search_keyword': :'searchKeyword',
    'sort_by': :'sortBy',
    'sort_order': :'sortOrder',
    'pagination_offset': :'paginationOffset',
    'pagination_limit': :'paginationLimit'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# File 'lib/oci/core/models/list_ip_inventory_details.rb', line 108

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'region_list': :'Array<String>',
    'compartment_list': :'Array<String>',
    'override_filters': :'BOOLEAN',
    'utilization': :'Float',
    'overlapping_vcns_only': :'BOOLEAN',
    'address_type_list': :'Array<OCI::Core::Models::AddressType>',
    'resource_type_list': :'Array<String>',
    'search_keyword': :'String',
    'sort_by': :'String',
    'sort_order': :'String',
    'pagination_offset': :'Integer',
    'pagination_limit': :'Integer'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • other (Object)

    the other object to be compared



270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
# File 'lib/oci/core/models/list_ip_inventory_details.rb', line 270

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    region_list == other.region_list &&
    compartment_list == other.compartment_list &&
    override_filters == other.override_filters &&
    utilization == other.utilization &&
    overlapping_vcns_only == other.overlapping_vcns_only &&
    address_type_list == other.address_type_list &&
    resource_type_list == other.resource_type_list &&
    search_keyword == other.search_keyword &&
    sort_by == other.sort_by &&
    sort_order == other.sort_order &&
    pagination_offset == other.pagination_offset &&
    pagination_limit == other.pagination_limit
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



311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
# File 'lib/oci/core/models/list_ip_inventory_details.rb', line 311

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)

  self.class.swagger_types.each_pair do |key, type|
    if type =~ /^Array<(.*)>/i
      # check to ensure the input is an array given that the the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        public_method("#{key}=").call(
          attributes[self.class.attribute_map[key]]
            .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
        )
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      public_method("#{key}=").call(
        OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
      )
    end
    # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(other) ⇒ Boolean

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


291
292
293
# File 'lib/oci/core/models/list_ip_inventory_details.rb', line 291

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



300
301
302
# File 'lib/oci/core/models/list_ip_inventory_details.rb', line 300

def hash
  [region_list, compartment_list, override_filters, utilization, overlapping_vcns_only, address_type_list, resource_type_list, search_keyword, sort_by, sort_order, pagination_offset, pagination_limit].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



344
345
346
347
348
349
350
351
352
353
# File 'lib/oci/core/models/list_ip_inventory_details.rb', line 344

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = public_method(attr).call
    next if value.nil? && !instance_variable_defined?("@#{attr}")

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

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



338
339
340
# File 'lib/oci/core/models/list_ip_inventory_details.rb', line 338

def to_s
  to_hash.to_s
end