Class: OCI::Dts::Models::UpdateTransferApplianceDetails
- Inherits:
-
Object
- Object
- OCI::Dts::Models::UpdateTransferApplianceDetails
- Defined in:
- lib/oci/dts/models/update_transfer_appliance_details.rb
Overview
UpdateTransferApplianceDetails model.
Constant Summary collapse
- LIFECYCLE_STATE_ENUM =
[ LIFECYCLE_STATE_PREPARING = 'PREPARING'.freeze, LIFECYCLE_STATE_FINALIZED = 'FINALIZED'.freeze, LIFECYCLE_STATE_RETURN_LABEL_REQUESTED = 'RETURN_LABEL_REQUESTED'.freeze, LIFECYCLE_STATE_RETURN_LABEL_GENERATING = 'RETURN_LABEL_GENERATING'.freeze, LIFECYCLE_STATE_RETURN_LABEL_AVAILABLE = 'RETURN_LABEL_AVAILABLE'.freeze, LIFECYCLE_STATE_DELETED = 'DELETED'.freeze, LIFECYCLE_STATE_CUSTOMER_NEVER_RECEIVED = 'CUSTOMER_NEVER_RECEIVED'.freeze, LIFECYCLE_STATE_CANCELLED = 'CANCELLED'.freeze ].freeze
Instance Attribute Summary collapse
- #customer_shipping_address ⇒ OCI::Dts::Models::ShippingAddress
-
#expected_return_date ⇒ DateTime
Expected return date from customer for the device, time portion should be zero.
- #lifecycle_state ⇒ String
-
#minimum_storage_capacity_in_terabytes ⇒ Integer
Minimum storage capacity of the device, in terabytes.
-
#pickup_window_end_time ⇒ DateTime
End time for the window to pickup the device from customer.
-
#pickup_window_start_time ⇒ DateTime
Start time for the window to pickup the device from customer.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ UpdateTransferApplianceDetails
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ UpdateTransferApplianceDetails
Initializes the object
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 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/oci/dts/models/update_transfer_appliance_details.rb', line 84 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.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState'] raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state') self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state'] self.customer_shipping_address = attributes[:'customerShippingAddress'] if attributes[:'customerShippingAddress'] raise 'You cannot provide both :customerShippingAddress and :customer_shipping_address' if attributes.key?(:'customerShippingAddress') && attributes.key?(:'customer_shipping_address') self.customer_shipping_address = attributes[:'customer_shipping_address'] if attributes[:'customer_shipping_address'] self.expected_return_date = attributes[:'expectedReturnDate'] if attributes[:'expectedReturnDate'] raise 'You cannot provide both :expectedReturnDate and :expected_return_date' if attributes.key?(:'expectedReturnDate') && attributes.key?(:'expected_return_date') self.expected_return_date = attributes[:'expected_return_date'] if attributes[:'expected_return_date'] self.pickup_window_start_time = attributes[:'pickupWindowStartTime'] if attributes[:'pickupWindowStartTime'] raise 'You cannot provide both :pickupWindowStartTime and :pickup_window_start_time' if attributes.key?(:'pickupWindowStartTime') && attributes.key?(:'pickup_window_start_time') self.pickup_window_start_time = attributes[:'pickup_window_start_time'] if attributes[:'pickup_window_start_time'] self.pickup_window_end_time = attributes[:'pickupWindowEndTime'] if attributes[:'pickupWindowEndTime'] raise 'You cannot provide both :pickupWindowEndTime and :pickup_window_end_time' if attributes.key?(:'pickupWindowEndTime') && attributes.key?(:'pickup_window_end_time') self.pickup_window_end_time = attributes[:'pickup_window_end_time'] if attributes[:'pickup_window_end_time'] self.minimum_storage_capacity_in_terabytes = attributes[:'minimumStorageCapacityInTerabytes'] if attributes[:'minimumStorageCapacityInTerabytes'] raise 'You cannot provide both :minimumStorageCapacityInTerabytes and :minimum_storage_capacity_in_terabytes' if attributes.key?(:'minimumStorageCapacityInTerabytes') && attributes.key?(:'minimum_storage_capacity_in_terabytes') self.minimum_storage_capacity_in_terabytes = attributes[:'minimum_storage_capacity_in_terabytes'] if attributes[:'minimum_storage_capacity_in_terabytes'] end |
Instance Attribute Details
#customer_shipping_address ⇒ OCI::Dts::Models::ShippingAddress
26 27 28 |
# File 'lib/oci/dts/models/update_transfer_appliance_details.rb', line 26 def customer_shipping_address @customer_shipping_address end |
#expected_return_date ⇒ DateTime
Expected return date from customer for the device, time portion should be zero.
30 31 32 |
# File 'lib/oci/dts/models/update_transfer_appliance_details.rb', line 30 def expected_return_date @expected_return_date end |
#lifecycle_state ⇒ String
23 24 25 |
# File 'lib/oci/dts/models/update_transfer_appliance_details.rb', line 23 def lifecycle_state @lifecycle_state end |
#minimum_storage_capacity_in_terabytes ⇒ Integer
Minimum storage capacity of the device, in terabytes. Valid options are 50, 95 and 150.
42 43 44 |
# File 'lib/oci/dts/models/update_transfer_appliance_details.rb', line 42 def minimum_storage_capacity_in_terabytes @minimum_storage_capacity_in_terabytes end |
#pickup_window_end_time ⇒ DateTime
End time for the window to pickup the device from customer.
38 39 40 |
# File 'lib/oci/dts/models/update_transfer_appliance_details.rb', line 38 def pickup_window_end_time @pickup_window_end_time end |
#pickup_window_start_time ⇒ DateTime
Start time for the window to pickup the device from customer.
34 35 36 |
# File 'lib/oci/dts/models/update_transfer_appliance_details.rb', line 34 def pickup_window_start_time @pickup_window_start_time end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/oci/dts/models/update_transfer_appliance_details.rb', line 45 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'lifecycle_state': :'lifecycleState', 'customer_shipping_address': :'customerShippingAddress', 'expected_return_date': :'expectedReturnDate', 'pickup_window_start_time': :'pickupWindowStartTime', 'pickup_window_end_time': :'pickupWindowEndTime', 'minimum_storage_capacity_in_terabytes': :'minimumStorageCapacityInTerabytes' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/oci/dts/models/update_transfer_appliance_details.rb', line 59 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'lifecycle_state': :'String', 'customer_shipping_address': :'OCI::Dts::Models::ShippingAddress', 'expected_return_date': :'DateTime', 'pickup_window_start_time': :'DateTime', 'pickup_window_end_time': :'DateTime', 'minimum_storage_capacity_in_terabytes': :'Integer' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
142 143 144 145 146 147 148 149 150 151 152 |
# File 'lib/oci/dts/models/update_transfer_appliance_details.rb', line 142 def ==(other) return true if equal?(other) self.class == other.class && lifecycle_state == other.lifecycle_state && customer_shipping_address == other.customer_shipping_address && expected_return_date == other.expected_return_date && pickup_window_start_time == other.pickup_window_start_time && pickup_window_end_time == other.pickup_window_end_time && minimum_storage_capacity_in_terabytes == other.minimum_storage_capacity_in_terabytes end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 |
# File 'lib/oci/dts/models/update_transfer_appliance_details.rb', line 177 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
157 158 159 |
# File 'lib/oci/dts/models/update_transfer_appliance_details.rb', line 157 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
166 167 168 |
# File 'lib/oci/dts/models/update_transfer_appliance_details.rb', line 166 def hash [lifecycle_state, customer_shipping_address, expected_return_date, pickup_window_start_time, pickup_window_end_time, minimum_storage_capacity_in_terabytes].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
210 211 212 213 214 215 216 217 218 219 |
# File 'lib/oci/dts/models/update_transfer_appliance_details.rb', line 210 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_s ⇒ String
Returns the string representation of the object
204 205 206 |
# File 'lib/oci/dts/models/update_transfer_appliance_details.rb', line 204 def to_s to_hash.to_s end |