class OCI::Rover::Models::UpdateRoverClusterDetails
The information required to update a RoverCluster.
Constants
- ENCLOSURE_TYPE_ENUM
- LIFECYCLE_STATE_ENUM
- SHIPPING_PREFERENCE_ENUM
Attributes
Number of nodes desired in the cluster, between 5 and 15. @return [Integer]
List of existing workloads that should be provisioned on the nodes. @return [Array<OCI::Rover::Models::RoverWorkload>]
@return [OCI::Rover::Models::ShippingAddress]
A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. @return [String]
The type of enclosure rover nodes in this cluster are shipped in. @return [String]
The current state of the RoverCluster. @return [String]
A property that can contain details on the lifecycle. @return [String]
Tracking Url for the shipped Rover
Cluster. @return [String]
Name of point of contact for this order if customer is picking up. @return [String]
Phone number of point of contact for this order if customer is picking up. @return [String]
Preference for device delivery. @return [String]
Shipping vendor of choice for orace to customer shipping. @return [String]
Root password for the rover cluster. @return [String]
Expected date when customer wants to pickup the device if they chose customer pickup. @return [DateTime]
Password to unlock the rover cluster. @return [String]
Public Class Methods
Attribute mapping from ruby-style variable name to JSON key.
# File lib/oci/rover/models/update_rover_cluster_details.rb, line 110 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'display_name': :'displayName', 'cluster_size': :'clusterSize', 'customer_shipping_address': :'customerShippingAddress', 'cluster_workloads': :'clusterWorkloads', 'super_user_password': :'superUserPassword', 'lifecycle_state': :'lifecycleState', 'lifecycle_state_details': :'lifecycleStateDetails', 'unlock_passphrase': :'unlockPassphrase', 'enclosure_type': :'enclosureType', 'point_of_contact': :'pointOfContact', 'point_of_contact_phone_number': :'pointOfContactPhoneNumber', 'shipping_preference': :'shippingPreference', 'oracle_shipping_tracking_url': :'oracleShippingTrackingUrl', 'shipping_vendor': :'shippingVendor', 'time_pickup_expected': :'timePickupExpected', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags', 'system_tags': :'systemTags' # rubocop:enable Style/SymbolLiteral } end
Initializes the object @param [Hash] attributes Model attributes in the form of hash @option attributes [String] :display_name The value to assign to the {#display_name} property @option attributes [Integer] :cluster_size The value to assign to the {#cluster_size} property @option attributes [OCI::Rover::Models::ShippingAddress] :customer_shipping_address The value to assign to the {#customer_shipping_address} property @option attributes [Array<OCI::Rover::Models::RoverWorkload>] :cluster_workloads The value to assign to the {#cluster_workloads} property @option attributes [String] :super_user_password The value to assign to the {#super_user_password} property @option attributes [String] :lifecycle_state The value to assign to the {#lifecycle_state} property @option attributes [String] :lifecycle_state_details The value to assign to the {#lifecycle_state_details} property @option attributes [String] :unlock_passphrase The value to assign to the {#unlock_passphrase} property @option attributes [String] :enclosure_type The value to assign to the {#enclosure_type} property @option attributes [String] :point_of_contact The value to assign to the {#point_of_contact} property @option attributes [String] :point_of_contact_phone_number The value to assign to the {#point_of_contact_phone_number} property @option attributes [String] :shipping_preference The value to assign to the {#shipping_preference} property @option attributes [String] :oracle_shipping_tracking_url The value to assign to the {#oracle_shipping_tracking_url} property @option attributes [String] :shipping_vendor The value to assign to the {#shipping_vendor} property @option attributes [DateTime] :time_pickup_expected The value to assign to the {#time_pickup_expected} property @option attributes [Hash<String, String>] :freeform_tags The value to assign to the {#freeform_tags} property @option attributes [Hash<String, Hash<String, Object>>] :defined_tags The value to assign to the {#defined_tags} property @option attributes [Hash<String, Hash<String, Object>>] :system_tags The value to assign to the {#system_tags} property
# File lib/oci/rover/models/update_rover_cluster_details.rb, line 185 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.display_name = attributes[:'displayName'] if attributes[:'displayName'] raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name') self.display_name = attributes[:'display_name'] if attributes[:'display_name'] self.cluster_size = attributes[:'clusterSize'] if attributes[:'clusterSize'] raise 'You cannot provide both :clusterSize and :cluster_size' if attributes.key?(:'clusterSize') && attributes.key?(:'cluster_size') self.cluster_size = attributes[:'cluster_size'] if attributes[:'cluster_size'] 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.cluster_workloads = attributes[:'clusterWorkloads'] if attributes[:'clusterWorkloads'] raise 'You cannot provide both :clusterWorkloads and :cluster_workloads' if attributes.key?(:'clusterWorkloads') && attributes.key?(:'cluster_workloads') self.cluster_workloads = attributes[:'cluster_workloads'] if attributes[:'cluster_workloads'] self.super_user_password = attributes[:'superUserPassword'] if attributes[:'superUserPassword'] raise 'You cannot provide both :superUserPassword and :super_user_password' if attributes.key?(:'superUserPassword') && attributes.key?(:'super_user_password') self.super_user_password = attributes[:'super_user_password'] if attributes[:'super_user_password'] 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.lifecycle_state_details = attributes[:'lifecycleStateDetails'] if attributes[:'lifecycleStateDetails'] raise 'You cannot provide both :lifecycleStateDetails and :lifecycle_state_details' if attributes.key?(:'lifecycleStateDetails') && attributes.key?(:'lifecycle_state_details') self.lifecycle_state_details = attributes[:'lifecycle_state_details'] if attributes[:'lifecycle_state_details'] self.unlock_passphrase = attributes[:'unlockPassphrase'] if attributes[:'unlockPassphrase'] raise 'You cannot provide both :unlockPassphrase and :unlock_passphrase' if attributes.key?(:'unlockPassphrase') && attributes.key?(:'unlock_passphrase') self.unlock_passphrase = attributes[:'unlock_passphrase'] if attributes[:'unlock_passphrase'] self.enclosure_type = attributes[:'enclosureType'] if attributes[:'enclosureType'] raise 'You cannot provide both :enclosureType and :enclosure_type' if attributes.key?(:'enclosureType') && attributes.key?(:'enclosure_type') self.enclosure_type = attributes[:'enclosure_type'] if attributes[:'enclosure_type'] self.point_of_contact = attributes[:'pointOfContact'] if attributes[:'pointOfContact'] raise 'You cannot provide both :pointOfContact and :point_of_contact' if attributes.key?(:'pointOfContact') && attributes.key?(:'point_of_contact') self.point_of_contact = attributes[:'point_of_contact'] if attributes[:'point_of_contact'] self.point_of_contact_phone_number = attributes[:'pointOfContactPhoneNumber'] if attributes[:'pointOfContactPhoneNumber'] raise 'You cannot provide both :pointOfContactPhoneNumber and :point_of_contact_phone_number' if attributes.key?(:'pointOfContactPhoneNumber') && attributes.key?(:'point_of_contact_phone_number') self.point_of_contact_phone_number = attributes[:'point_of_contact_phone_number'] if attributes[:'point_of_contact_phone_number'] self.shipping_preference = attributes[:'shippingPreference'] if attributes[:'shippingPreference'] self.shipping_preference = "ORACLE_SHIPPED" if shipping_preference.nil? && !attributes.key?(:'shippingPreference') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :shippingPreference and :shipping_preference' if attributes.key?(:'shippingPreference') && attributes.key?(:'shipping_preference') self.shipping_preference = attributes[:'shipping_preference'] if attributes[:'shipping_preference'] self.shipping_preference = "ORACLE_SHIPPED" if shipping_preference.nil? && !attributes.key?(:'shippingPreference') && !attributes.key?(:'shipping_preference') # rubocop:disable Style/StringLiterals self.oracle_shipping_tracking_url = attributes[:'oracleShippingTrackingUrl'] if attributes[:'oracleShippingTrackingUrl'] raise 'You cannot provide both :oracleShippingTrackingUrl and :oracle_shipping_tracking_url' if attributes.key?(:'oracleShippingTrackingUrl') && attributes.key?(:'oracle_shipping_tracking_url') self.oracle_shipping_tracking_url = attributes[:'oracle_shipping_tracking_url'] if attributes[:'oracle_shipping_tracking_url'] self.shipping_vendor = attributes[:'shippingVendor'] if attributes[:'shippingVendor'] raise 'You cannot provide both :shippingVendor and :shipping_vendor' if attributes.key?(:'shippingVendor') && attributes.key?(:'shipping_vendor') self.shipping_vendor = attributes[:'shipping_vendor'] if attributes[:'shipping_vendor'] self.time_pickup_expected = attributes[:'timePickupExpected'] if attributes[:'timePickupExpected'] raise 'You cannot provide both :timePickupExpected and :time_pickup_expected' if attributes.key?(:'timePickupExpected') && attributes.key?(:'time_pickup_expected') self.time_pickup_expected = attributes[:'time_pickup_expected'] if attributes[:'time_pickup_expected'] self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags'] raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags') self.freeform_tags = attributes[:'freeform_tags'] if attributes[:'freeform_tags'] self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags'] raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags') self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags'] self.system_tags = attributes[:'systemTags'] if attributes[:'systemTags'] raise 'You cannot provide both :systemTags and :system_tags' if attributes.key?(:'systemTags') && attributes.key?(:'system_tags') self.system_tags = attributes[:'system_tags'] if attributes[:'system_tags'] end
Attribute type mapping.
# File lib/oci/rover/models/update_rover_cluster_details.rb, line 136 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'display_name': :'String', 'cluster_size': :'Integer', 'customer_shipping_address': :'OCI::Rover::Models::ShippingAddress', 'cluster_workloads': :'Array<OCI::Rover::Models::RoverWorkload>', 'super_user_password': :'String', 'lifecycle_state': :'String', 'lifecycle_state_details': :'String', 'unlock_passphrase': :'String', 'enclosure_type': :'String', 'point_of_contact': :'String', 'point_of_contact_phone_number': :'String', 'shipping_preference': :'String', 'oracle_shipping_tracking_url': :'String', 'shipping_vendor': :'String', 'time_pickup_expected': :'DateTime', 'freeform_tags': :'Hash<String, String>', 'defined_tags': :'Hash<String, Hash<String, Object>>', 'system_tags': :'Hash<String, Hash<String, Object>>' # rubocop:enable Style/SymbolLiteral } end
Public Instance Methods
Checks equality by comparing each attribute. @param [Object] other the other object to be compared
# File lib/oci/rover/models/update_rover_cluster_details.rb, line 333 def ==(other) return true if equal?(other) self.class == other.class && display_name == other.display_name && cluster_size == other.cluster_size && customer_shipping_address == other.customer_shipping_address && cluster_workloads == other.cluster_workloads && super_user_password == other.super_user_password && lifecycle_state == other.lifecycle_state && lifecycle_state_details == other.lifecycle_state_details && unlock_passphrase == other.unlock_passphrase && enclosure_type == other.enclosure_type && point_of_contact == other.point_of_contact && point_of_contact_phone_number == other.point_of_contact_phone_number && shipping_preference == other.shipping_preference && oracle_shipping_tracking_url == other.oracle_shipping_tracking_url && shipping_vendor == other.shipping_vendor && time_pickup_expected == other.time_pickup_expected && freeform_tags == other.freeform_tags && defined_tags == other.defined_tags && system_tags == other.system_tags end
Builds the object from hash @param [Hash] attributes Model attributes in the form of hash @return [Object] Returns the model itself
# File lib/oci/rover/models/update_rover_cluster_details.rb, line 380 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
Custom attribute writer method checking allowed values (enum). @param [Object] enclosure_type
Object
to be assigned
# File lib/oci/rover/models/update_rover_cluster_details.rb, line 314 def enclosure_type=(enclosure_type) raise "Invalid value for 'enclosure_type': this must be one of the values in ENCLOSURE_TYPE_ENUM." if enclosure_type && !ENCLOSURE_TYPE_ENUM.include?(enclosure_type) @enclosure_type = enclosure_type end
@see the `==` method @param [Object] other the other object to be compared
# File lib/oci/rover/models/update_rover_cluster_details.rb, line 360 def eql?(other) self == other end
Calculates hash code according to all attributes. @return [Fixnum] Hash code
# File lib/oci/rover/models/update_rover_cluster_details.rb, line 369 def hash [display_name, cluster_size, customer_shipping_address, cluster_workloads, super_user_password, lifecycle_state, lifecycle_state_details, unlock_passphrase, enclosure_type, point_of_contact, point_of_contact_phone_number, shipping_preference, oracle_shipping_tracking_url, shipping_vendor, time_pickup_expected, freeform_tags, defined_tags, system_tags].hash end
Custom attribute writer method checking allowed values (enum). @param [Object] lifecycle_state
Object
to be assigned
# File lib/oci/rover/models/update_rover_cluster_details.rb, line 306 def lifecycle_state=(lifecycle_state) raise "Invalid value for 'lifecycle_state': this must be one of the values in LIFECYCLE_STATE_ENUM." if lifecycle_state && !LIFECYCLE_STATE_ENUM.include?(lifecycle_state) @lifecycle_state = lifecycle_state end
Custom attribute writer method checking allowed values (enum). @param [Object] shipping_preference
Object
to be assigned
# File lib/oci/rover/models/update_rover_cluster_details.rb, line 322 def shipping_preference=(shipping_preference) raise "Invalid value for 'shipping_preference': this must be one of the values in SHIPPING_PREFERENCE_ENUM." if shipping_preference && !SHIPPING_PREFERENCE_ENUM.include?(shipping_preference) @shipping_preference = shipping_preference end
Returns the object in the form of hash @return [Hash] Returns the object in the form of hash
# File lib/oci/rover/models/update_rover_cluster_details.rb, line 413 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
Returns the string representation of the object @return [String] String presentation of the object
# File lib/oci/rover/models/update_rover_cluster_details.rb, line 407 def to_s to_hash.to_s end
Private Instance Methods
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value @param [Object] value Any valid value @return [Hash] Returns the value in the form of hash
# File lib/oci/rover/models/update_rover_cluster_details.rb, line 430 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