Class: Kubevirt::V1alpha1BackupOptions
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- Kubevirt::V1alpha1BackupOptions
- Defined in:
- lib/kubevirt/models/v1alpha1_backup_options.rb
Overview
BackupOptions are options used to configure virtual machine backup job
Instance Attribute Summary collapse
-
#backup_cert ⇒ Object
Returns the value of attribute backup_cert.
-
#backup_key ⇒ Object
Returns the value of attribute backup_key.
-
#backup_name ⇒ Object
Returns the value of attribute backup_name.
-
#backup_start_time ⇒ Object
Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON.
-
#ca_cert ⇒ Object
Returns the value of attribute ca_cert.
-
#cmd ⇒ Object
Returns the value of attribute cmd.
-
#export_server_addr ⇒ Object
Returns the value of attribute export_server_addr.
-
#export_server_name ⇒ Object
Returns the value of attribute export_server_name.
-
#incremental ⇒ Object
Returns the value of attribute incremental.
-
#mode ⇒ Object
Returns the value of attribute mode.
-
#skip_quiesce ⇒ Object
Returns the value of attribute skip_quiesce.
-
#target_path ⇒ Object
Returns the value of attribute target_path.
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ V1alpha1BackupOptions
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from ApiModelBase
_deserialize, #_to_hash, #to_body, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ V1alpha1BackupOptions
Initializes the object
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 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
# File 'lib/kubevirt/models/v1alpha1_backup_options.rb', line 98 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Kubevirt::V1alpha1BackupOptions` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `Kubevirt::V1alpha1BackupOptions`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'backup_cert') self.backup_cert = attributes[:'backup_cert'] end if attributes.key?(:'backup_key') self.backup_key = attributes[:'backup_key'] end if attributes.key?(:'backup_name') self.backup_name = attributes[:'backup_name'] end if attributes.key?(:'backup_start_time') self.backup_start_time = attributes[:'backup_start_time'] end if attributes.key?(:'ca_cert') self.ca_cert = attributes[:'ca_cert'] end if attributes.key?(:'cmd') self.cmd = attributes[:'cmd'] end if attributes.key?(:'export_server_addr') self.export_server_addr = attributes[:'export_server_addr'] end if attributes.key?(:'export_server_name') self.export_server_name = attributes[:'export_server_name'] end if attributes.key?(:'incremental') self.incremental = attributes[:'incremental'] end if attributes.key?(:'mode') self.mode = attributes[:'mode'] end if attributes.key?(:'skip_quiesce') self.skip_quiesce = attributes[:'skip_quiesce'] end if attributes.key?(:'target_path') self.target_path = attributes[:'target_path'] end end |
Instance Attribute Details
#backup_cert ⇒ Object
Returns the value of attribute backup_cert.
19 20 21 |
# File 'lib/kubevirt/models/v1alpha1_backup_options.rb', line 19 def backup_cert @backup_cert end |
#backup_key ⇒ Object
Returns the value of attribute backup_key.
21 22 23 |
# File 'lib/kubevirt/models/v1alpha1_backup_options.rb', line 21 def backup_key @backup_key end |
#backup_name ⇒ Object
Returns the value of attribute backup_name.
23 24 25 |
# File 'lib/kubevirt/models/v1alpha1_backup_options.rb', line 23 def backup_name @backup_name end |
#backup_start_time ⇒ Object
Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.
26 27 28 |
# File 'lib/kubevirt/models/v1alpha1_backup_options.rb', line 26 def backup_start_time @backup_start_time end |
#ca_cert ⇒ Object
Returns the value of attribute ca_cert.
28 29 30 |
# File 'lib/kubevirt/models/v1alpha1_backup_options.rb', line 28 def ca_cert @ca_cert end |
#cmd ⇒ Object
Returns the value of attribute cmd.
30 31 32 |
# File 'lib/kubevirt/models/v1alpha1_backup_options.rb', line 30 def cmd @cmd end |
#export_server_addr ⇒ Object
Returns the value of attribute export_server_addr.
32 33 34 |
# File 'lib/kubevirt/models/v1alpha1_backup_options.rb', line 32 def export_server_addr @export_server_addr end |
#export_server_name ⇒ Object
Returns the value of attribute export_server_name.
34 35 36 |
# File 'lib/kubevirt/models/v1alpha1_backup_options.rb', line 34 def export_server_name @export_server_name end |
#incremental ⇒ Object
Returns the value of attribute incremental.
36 37 38 |
# File 'lib/kubevirt/models/v1alpha1_backup_options.rb', line 36 def incremental @incremental end |
#mode ⇒ Object
Returns the value of attribute mode.
38 39 40 |
# File 'lib/kubevirt/models/v1alpha1_backup_options.rb', line 38 def mode @mode end |
#skip_quiesce ⇒ Object
Returns the value of attribute skip_quiesce.
40 41 42 |
# File 'lib/kubevirt/models/v1alpha1_backup_options.rb', line 40 def skip_quiesce @skip_quiesce end |
#target_path ⇒ Object
Returns the value of attribute target_path.
42 43 44 |
# File 'lib/kubevirt/models/v1alpha1_backup_options.rb', line 42 def target_path @target_path end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
63 64 65 |
# File 'lib/kubevirt/models/v1alpha1_backup_options.rb', line 63 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
68 69 70 |
# File 'lib/kubevirt/models/v1alpha1_backup_options.rb', line 68 def self.acceptable_attributes acceptable_attribute_map.values end |
.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 57 58 59 60 |
# File 'lib/kubevirt/models/v1alpha1_backup_options.rb', line 45 def self.attribute_map { :'backup_cert' => :'backupCert', :'backup_key' => :'backupKey', :'backup_name' => :'backupName', :'backup_start_time' => :'backupStartTime', :'ca_cert' => :'caCert', :'cmd' => :'cmd', :'export_server_addr' => :'exportServerAddr', :'export_server_name' => :'exportServerName', :'incremental' => :'incremental', :'mode' => :'mode', :'skip_quiesce' => :'skipQuiesce', :'target_path' => :'targetPath' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 |
# File 'lib/kubevirt/models/v1alpha1_backup_options.rb', line 210 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
91 92 93 94 |
# File 'lib/kubevirt/models/v1alpha1_backup_options.rb', line 91 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/kubevirt/models/v1alpha1_backup_options.rb', line 73 def self.openapi_types { :'backup_cert' => :'String', :'backup_key' => :'String', :'backup_name' => :'String', :'backup_start_time' => :'Time', :'ca_cert' => :'String', :'cmd' => :'String', :'export_server_addr' => :'String', :'export_server_name' => :'String', :'incremental' => :'String', :'mode' => :'String', :'skip_quiesce' => :'Boolean', :'target_path' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 |
# File 'lib/kubevirt/models/v1alpha1_backup_options.rb', line 178 def ==(o) return true if self.equal?(o) self.class == o.class && backup_cert == o.backup_cert && backup_key == o.backup_key && backup_name == o.backup_name && backup_start_time == o.backup_start_time && ca_cert == o.ca_cert && cmd == o.cmd && export_server_addr == o.export_server_addr && export_server_name == o.export_server_name && incremental == o.incremental && mode == o.mode && skip_quiesce == o.skip_quiesce && target_path == o.target_path end |
#eql?(o) ⇒ Boolean
197 198 199 |
# File 'lib/kubevirt/models/v1alpha1_backup_options.rb', line 197 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
203 204 205 |
# File 'lib/kubevirt/models/v1alpha1_backup_options.rb', line 203 def hash [backup_cert, backup_key, backup_name, backup_start_time, ca_cert, cmd, export_server_addr, export_server_name, incremental, mode, skip_quiesce, target_path].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
163 164 165 166 167 |
# File 'lib/kubevirt/models/v1alpha1_backup_options.rb', line 163 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
232 233 234 235 236 237 238 239 240 241 242 243 244 |
# File 'lib/kubevirt/models/v1alpha1_backup_options.rb', line 232 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
171 172 173 174 |
# File 'lib/kubevirt/models/v1alpha1_backup_options.rb', line 171 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' true end |