class PureCloud::DomainLogicalInterface
Attributes
The list of IP addresses on this interface. Priority of dns addresses are based on order in the list.
The ID of the user that created the resource.
The application that created the resource.
The date the resource was created. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
The date of the last modification to the resource. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
The resource's description.
Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
External trunk base settings to use for external communication from this interface.
Friendly Name
Hardware Address
The globally unique identifier for the object.
The type of this network interface.
IPv4 interface settings.
IPv6 interface settings.
The ID of the user that last modified the resource.
The application that last modified the resource.
The name of the entity.
Phone
trunk base settings to use for phone communication from this interface. These settings will be ignored when "inheritPhoneTrunkBases" is true.
Physical Adapter Id
IPv4 NENT IP Address
IPv6 NENT IP Address
The list of routes assigned to this interface.
The URI for this object
Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
Indicates if the resource is active, inactive, or deleted.
Site
Interconnects using the "Cloud Proxy" method will broker the connection between them with a Cloud Proxy. This method is required for connections between one or more Sites using Cloud Media, but can optionally be used between two premises Sites if Direct or Indirect are not an option.
The current version of the resource.
Public Class Methods
Attribute
mapping from ruby-style variable name to JSON key.
# File lib/purecloudplatformclientv2/models/domain_logical_interface.rb, line 133 def self.attribute_map { :'id' => :'id', :'name' => :'name', :'description' => :'description', :'version' => :'version', :'date_created' => :'dateCreated', :'date_modified' => :'dateModified', :'modified_by' => :'modifiedBy', :'created_by' => :'createdBy', :'state' => :'state', :'modified_by_app' => :'modifiedByApp', :'created_by_app' => :'createdByApp', :'edge_uri' => :'edgeUri', :'edge_assigned_id' => :'edgeAssignedId', :'friendly_name' => :'friendlyName', :'vlan_tag_id' => :'vlanTagId', :'hardware_address' => :'hardwareAddress', :'physical_adapter_id' => :'physicalAdapterId', :'if_status' => :'ifStatus', :'interface_type' => :'interfaceType', :'public_nat_address_ip_v4' => :'publicNatAddressIpV4', :'public_nat_address_ip_v6' => :'publicNatAddressIpV6', :'routes' => :'routes', :'addresses' => :'addresses', :'ipv4_capabilities' => :'ipv4Capabilities', :'ipv6_capabilities' => :'ipv6Capabilities', :'current_state' => :'currentState', :'last_modified_user_id' => :'lastModifiedUserId', :'last_modified_correlation_id' => :'lastModifiedCorrelationId', :'command_responses' => :'commandResponses', :'inherit_phone_trunk_bases_i_pv4' => :'inheritPhoneTrunkBasesIPv4', :'inherit_phone_trunk_bases_i_pv6' => :'inheritPhoneTrunkBasesIPv6', :'use_for_internal_edge_communication' => :'useForInternalEdgeCommunication', :'use_for_indirect_edge_communication' => :'useForIndirectEdgeCommunication', :'use_for_cloud_proxy_edge_communication' => :'useForCloudProxyEdgeCommunication', :'external_trunk_base_assignments' => :'externalTrunkBaseAssignments', :'phone_trunk_base_assignments' => :'phoneTrunkBaseAssignments', :'trace_enabled' => :'traceEnabled', :'start_date' => :'startDate', :'end_date' => :'endDate', :'self_uri' => :'selfUri' } end
Initializes the object @param [Hash] attributes Model attributes in the form of hash
# File lib/purecloudplatformclientv2/models/domain_logical_interface.rb, line 308 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} if attributes.has_key?(:'id') self.id = attributes[:'id'] end if attributes.has_key?(:'name') self.name = attributes[:'name'] end if attributes.has_key?(:'description') self.description = attributes[:'description'] end if attributes.has_key?(:'version') self.version = attributes[:'version'] end if attributes.has_key?(:'dateCreated') self.date_created = attributes[:'dateCreated'] end if attributes.has_key?(:'dateModified') self.date_modified = attributes[:'dateModified'] end if attributes.has_key?(:'modifiedBy') self.modified_by = attributes[:'modifiedBy'] end if attributes.has_key?(:'createdBy') self.created_by = attributes[:'createdBy'] end if attributes.has_key?(:'state') self.state = attributes[:'state'] end if attributes.has_key?(:'modifiedByApp') self.modified_by_app = attributes[:'modifiedByApp'] end if attributes.has_key?(:'createdByApp') self.created_by_app = attributes[:'createdByApp'] end if attributes.has_key?(:'edgeUri') self.edge_uri = attributes[:'edgeUri'] end if attributes.has_key?(:'edgeAssignedId') self.edge_assigned_id = attributes[:'edgeAssignedId'] end if attributes.has_key?(:'friendlyName') self.friendly_name = attributes[:'friendlyName'] end if attributes.has_key?(:'vlanTagId') self.vlan_tag_id = attributes[:'vlanTagId'] end if attributes.has_key?(:'hardwareAddress') self.hardware_address = attributes[:'hardwareAddress'] end if attributes.has_key?(:'physicalAdapterId') self.physical_adapter_id = attributes[:'physicalAdapterId'] end if attributes.has_key?(:'ifStatus') self.if_status = attributes[:'ifStatus'] end if attributes.has_key?(:'interfaceType') self.interface_type = attributes[:'interfaceType'] end if attributes.has_key?(:'publicNatAddressIpV4') self.public_nat_address_ip_v4 = attributes[:'publicNatAddressIpV4'] end if attributes.has_key?(:'publicNatAddressIpV6') self.public_nat_address_ip_v6 = attributes[:'publicNatAddressIpV6'] end if attributes.has_key?(:'routes') if (value = attributes[:'routes']).is_a?(Array) self.routes = value end end if attributes.has_key?(:'addresses') if (value = attributes[:'addresses']).is_a?(Array) self.addresses = value end end if attributes.has_key?(:'ipv4Capabilities') self.ipv4_capabilities = attributes[:'ipv4Capabilities'] end if attributes.has_key?(:'ipv6Capabilities') self.ipv6_capabilities = attributes[:'ipv6Capabilities'] end if attributes.has_key?(:'currentState') self.current_state = attributes[:'currentState'] end if attributes.has_key?(:'lastModifiedUserId') self.last_modified_user_id = attributes[:'lastModifiedUserId'] end if attributes.has_key?(:'lastModifiedCorrelationId') self.last_modified_correlation_id = attributes[:'lastModifiedCorrelationId'] end if attributes.has_key?(:'commandResponses') if (value = attributes[:'commandResponses']).is_a?(Array) self.command_responses = value end end if attributes.has_key?(:'inheritPhoneTrunkBasesIPv4') self.inherit_phone_trunk_bases_i_pv4 = attributes[:'inheritPhoneTrunkBasesIPv4'] end if attributes.has_key?(:'inheritPhoneTrunkBasesIPv6') self.inherit_phone_trunk_bases_i_pv6 = attributes[:'inheritPhoneTrunkBasesIPv6'] end if attributes.has_key?(:'useForInternalEdgeCommunication') self.use_for_internal_edge_communication = attributes[:'useForInternalEdgeCommunication'] end if attributes.has_key?(:'useForIndirectEdgeCommunication') self.use_for_indirect_edge_communication = attributes[:'useForIndirectEdgeCommunication'] end if attributes.has_key?(:'useForCloudProxyEdgeCommunication') self.use_for_cloud_proxy_edge_communication = attributes[:'useForCloudProxyEdgeCommunication'] end if attributes.has_key?(:'externalTrunkBaseAssignments') if (value = attributes[:'externalTrunkBaseAssignments']).is_a?(Array) self.external_trunk_base_assignments = value end end if attributes.has_key?(:'phoneTrunkBaseAssignments') if (value = attributes[:'phoneTrunkBaseAssignments']).is_a?(Array) self.phone_trunk_base_assignments = value end end if attributes.has_key?(:'traceEnabled') self.trace_enabled = attributes[:'traceEnabled'] end if attributes.has_key?(:'startDate') self.start_date = attributes[:'startDate'] end if attributes.has_key?(:'endDate') self.end_date = attributes[:'endDate'] end if attributes.has_key?(:'selfUri') self.self_uri = attributes[:'selfUri'] end end
Attribute
type mapping.
# File lib/purecloudplatformclientv2/models/domain_logical_interface.rb, line 220 def self.swagger_types { :'id' => :'String', :'name' => :'String', :'description' => :'String', :'version' => :'Integer', :'date_created' => :'DateTime', :'date_modified' => :'DateTime', :'modified_by' => :'String', :'created_by' => :'String', :'state' => :'String', :'modified_by_app' => :'String', :'created_by_app' => :'String', :'edge_uri' => :'String', :'edge_assigned_id' => :'String', :'friendly_name' => :'String', :'vlan_tag_id' => :'Integer', :'hardware_address' => :'String', :'physical_adapter_id' => :'String', :'if_status' => :'String', :'interface_type' => :'String', :'public_nat_address_ip_v4' => :'String', :'public_nat_address_ip_v6' => :'String', :'routes' => :'Array<DomainNetworkRoute>', :'addresses' => :'Array<DomainNetworkAddress>', :'ipv4_capabilities' => :'DomainCapabilities', :'ipv6_capabilities' => :'DomainCapabilities', :'current_state' => :'String', :'last_modified_user_id' => :'String', :'last_modified_correlation_id' => :'String', :'command_responses' => :'Array<DomainNetworkCommandResponse>', :'inherit_phone_trunk_bases_i_pv4' => :'BOOLEAN', :'inherit_phone_trunk_bases_i_pv6' => :'BOOLEAN', :'use_for_internal_edge_communication' => :'BOOLEAN', :'use_for_indirect_edge_communication' => :'BOOLEAN', :'use_for_cloud_proxy_edge_communication' => :'BOOLEAN', :'external_trunk_base_assignments' => :'Array<TrunkBaseAssignment>', :'phone_trunk_base_assignments' => :'Array<TrunkBaseAssignment>', :'trace_enabled' => :'BOOLEAN', :'start_date' => :'DateTime', :'end_date' => :'DateTime', :'self_uri' => :'String' } end
Public Instance Methods
Checks equality by comparing each attribute. @param [Object] Object to be compared
# File lib/purecloudplatformclientv2/models/domain_logical_interface.rb, line 1127 def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id && name == o.name && description == o.description && version == o.version && date_created == o.date_created && date_modified == o.date_modified && modified_by == o.modified_by && created_by == o.created_by && state == o.state && modified_by_app == o.modified_by_app && created_by_app == o.created_by_app && edge_uri == o.edge_uri && edge_assigned_id == o.edge_assigned_id && friendly_name == o.friendly_name && vlan_tag_id == o.vlan_tag_id && hardware_address == o.hardware_address && physical_adapter_id == o.physical_adapter_id && if_status == o.if_status && interface_type == o.interface_type && public_nat_address_ip_v4 == o.public_nat_address_ip_v4 && public_nat_address_ip_v6 == o.public_nat_address_ip_v6 && routes == o.routes && addresses == o.addresses && ipv4_capabilities == o.ipv4_capabilities && ipv6_capabilities == o.ipv6_capabilities && current_state == o.current_state && last_modified_user_id == o.last_modified_user_id && last_modified_correlation_id == o.last_modified_correlation_id && command_responses == o.command_responses && inherit_phone_trunk_bases_i_pv4 == o.inherit_phone_trunk_bases_i_pv4 && inherit_phone_trunk_bases_i_pv6 == o.inherit_phone_trunk_bases_i_pv6 && use_for_internal_edge_communication == o.use_for_internal_edge_communication && use_for_indirect_edge_communication == o.use_for_indirect_edge_communication && use_for_cloud_proxy_edge_communication == o.use_for_cloud_proxy_edge_communication && external_trunk_base_assignments == o.external_trunk_base_assignments && phone_trunk_base_assignments == o.phone_trunk_base_assignments && trace_enabled == o.trace_enabled && start_date == o.start_date && end_date == o.end_date && self_uri == o.self_uri end
# File lib/purecloudplatformclientv2/models/domain_logical_interface.rb, line 1204 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :BOOLEAN if value.to_s =~ /^(true|t|yes|y|1)$/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model _model = Object.const_get("PureCloud").const_get(type).new _model.build_from_hash(value) end end
Method to output non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
# File lib/purecloudplatformclientv2/models/domain_logical_interface.rb, line 1264 def _to_hash(value) if value.is_a?(Array) value.compact.map{ |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end
build the object from hash
# File lib/purecloudplatformclientv2/models/domain_logical_interface.rb, line 1185 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 if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } ) else #TODO show warning in debug mode end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) else # data not found in attributes(hash), not an issue as the data can be optional end end self end
Custom attribute writer method checking allowed values (enum). @param [Object] current_state
Object to be assigned
# File lib/purecloudplatformclientv2/models/domain_logical_interface.rb, line 1044 def current_state=(current_state) allowed_values = ["INIT", "CREATING", "UPDATING", "OK", "EXCEPTION", "DELETING"] if current_state && !allowed_values.include?(current_state) fail ArgumentError, "invalid value for 'current_state', must be one of #{allowed_values}." end @current_state = current_state end
@see the `==` method @param [Object] Object to be compared
# File lib/purecloudplatformclientv2/models/domain_logical_interface.rb, line 1174 def eql?(o) self == o end
Calculates hash code according to all attributes. @return [Fixnum] Hash code
# File lib/purecloudplatformclientv2/models/domain_logical_interface.rb, line 1180 def hash [id, name, description, version, date_created, date_modified, modified_by, created_by, state, modified_by_app, created_by_app, edge_uri, edge_assigned_id, friendly_name, vlan_tag_id, hardware_address, physical_adapter_id, if_status, interface_type, public_nat_address_ip_v4, public_nat_address_ip_v6, routes, addresses, ipv4_capabilities, ipv6_capabilities, current_state, last_modified_user_id, last_modified_correlation_id, command_responses, inherit_phone_trunk_bases_i_pv4, inherit_phone_trunk_bases_i_pv6, use_for_internal_edge_communication, use_for_indirect_edge_communication, use_for_cloud_proxy_edge_communication, external_trunk_base_assignments, phone_trunk_base_assignments, trace_enabled, start_date, end_date, self_uri].hash end
Custom attribute writer method checking allowed values (enum). @param [Object] interface_type
Object to be assigned
# File lib/purecloudplatformclientv2/models/domain_logical_interface.rb, line 1000 def interface_type=(interface_type) allowed_values = ["DIAGNOSTIC", "SYSTEM"] if interface_type && !allowed_values.include?(interface_type) fail ArgumentError, "invalid value for 'interface_type', must be one of #{allowed_values}." end @interface_type = interface_type end
Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properies with the reasons
# File lib/purecloudplatformclientv2/models/domain_logical_interface.rb, line 689 def list_invalid_properties invalid_properties = Array.new return invalid_properties end
Custom attribute writer method checking allowed values (enum). @param [Object] state Object to be assigned
# File lib/purecloudplatformclientv2/models/domain_logical_interface.rb, line 941 def state=(state) allowed_values = ["active", "inactive", "deleted"] if state && !allowed_values.include?(state) fail ArgumentError, "invalid value for 'state', must be one of #{allowed_values}." end @state = state end
return the object in the form of hash
# File lib/purecloudplatformclientv2/models/domain_logical_interface.rb, line 1252 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end
# File lib/purecloudplatformclientv2/models/domain_logical_interface.rb, line 1242 def to_s to_hash.to_s end
Check to see if the all the properties in the model are valid @return true if the model is valid
# File lib/purecloudplatformclientv2/models/domain_logical_interface.rb, line 698 def valid? if @name.nil? return false end allowed_values = ["active", "inactive", "deleted"] if @state && !allowed_values.include?(@state) return false end if @friendly_name.nil? return false end if @hardware_address.nil? return false end if @physical_adapter_id.nil? return false end allowed_values = ["DIAGNOSTIC", "SYSTEM"] if @interface_type && !allowed_values.include?(@interface_type) return false end allowed_values = ["INIT", "CREATING", "UPDATING", "OK", "EXCEPTION", "DELETING"] if @current_state && !allowed_values.include?(@current_state) return false end end