Class: OracleBMC::Core::Models::LetterOfAuthority

Inherits:
Object
  • Object
show all
Defined in:
lib/oraclebmc/core/models/letter_of_authority.rb

Constant Summary collapse

CIRCUIT_TYPE_ENUM =
[CIRCUIT_TYPE_SINGLE_MODE_LC = 'Single_mode_LC',
CIRCUIT_TYPE_SINGLE_MODE_SC = 'Single_mode_SC',
CIRCUIT_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ LetterOfAuthority

Initializes the object

Parameters:

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

    Model attributes in the form of hash



43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/oraclebmc/core/models/letter_of_authority.rb', line 43

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[:'circuitType']
    self.circuit_type = attributes[:'circuitType']
  end
  
  if attributes[:'crossConnectId']
    self.cross_connect_id = attributes[:'crossConnectId']
  end
  
  if attributes[:'facilityLocation']
    self.facility_location = attributes[:'facilityLocation']
  end
  
  if attributes[:'portName']
    self.port_name = attributes[:'portName']
  end
  
  if attributes[:'timeExpires']
    self.time_expires = attributes[:'timeExpires']
  end
  
  if attributes[:'timeIssued']
    self.time_issued = attributes[:'timeIssued']
  end
  
end

Instance Attribute Details

#circuit_typeString

The type of cross-connect fiber, termination, and optical specification.

Returns:

  • (String)


14
15
16
# File 'lib/oraclebmc/core/models/letter_of_authority.rb', line 14

def circuit_type
  @circuit_type
end

#cross_connect_idString

The OCID of the cross-connect.

Returns:

  • (String)


18
19
20
# File 'lib/oraclebmc/core/models/letter_of_authority.rb', line 18

def cross_connect_id
  @cross_connect_id
end

#facility_locationString

The address of the FastConnect location.

Returns:

  • (String)


22
23
24
# File 'lib/oraclebmc/core/models/letter_of_authority.rb', line 22

def facility_location
  @facility_location
end

#port_nameString

The meet-me room port for this cross-connect.

Returns:

  • (String)


26
27
28
# File 'lib/oraclebmc/core/models/letter_of_authority.rb', line 26

def port_name
  @port_name
end

#time_expiresDateTime

The date and time when the Letter of Authority expires, in the format defined by RFC3339.

Returns:

  • (DateTime)


31
32
33
# File 'lib/oraclebmc/core/models/letter_of_authority.rb', line 31

def time_expires
  @time_expires
end

#time_issuedDateTime

The date and time the Letter of Authority was created, in the format defined by RFC3339.

Example: ‘2016-08-25T21:10:29.600Z`

Returns:

  • (DateTime)


38
39
40
# File 'lib/oraclebmc/core/models/letter_of_authority.rb', line 38

def time_issued
  @time_issued
end

Instance Method Details

#==(other_object) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • other_object (Object)

    to be compared



88
89
90
91
92
93
94
95
96
97
# File 'lib/oraclebmc/core/models/letter_of_authority.rb', line 88

def ==(other_object)
  return true if self.equal?(other_object)
  self.class == other_object.class &&
      circuit_type == other_object.circuit_type &&
      cross_connect_id == other_object.cross_connect_id &&
      facility_location == other_object.facility_location &&
      port_name == other_object.port_name &&
      time_expires == other_object.time_expires &&
      time_issued == other_object.time_issued
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



114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# File 'lib/oraclebmc/core/models/letter_of_authority.rb', line 114

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)
        self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } )
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      self.send("#{key}=", OracleBMC::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_object) ⇒ Boolean

Parameters:

  • other_object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


101
102
103
# File 'lib/oraclebmc/core/models/letter_of_authority.rb', line 101

def eql?(other_object)
  self == other_object
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



107
108
109
# File 'lib/oraclebmc/core/models/letter_of_authority.rb', line 107

def hash
  [circuit_type, cross_connect_id, facility_location, port_name, time_expires, time_issued].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



139
140
141
142
143
144
145
146
147
# File 'lib/oraclebmc/core/models/letter_of_authority.rb', line 139

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

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



133
134
135
# File 'lib/oraclebmc/core/models/letter_of_authority.rb', line 133

def to_s
  to_hash.to_s
end