class SwaggerAemOsgiClient::OrgApacheSlingDiscoveryOakConfigProperties
Attributes
Public Class Methods
Attribute mapping from ruby-style variable name to JSON key.
# File lib/swagger_aem_osgi/models/org_apache_sling_discovery_oak_config_properties.rb, line 56 def self.attribute_map { :'connector_ping_timeout' => :'connectorPingTimeout', :'connector_ping_interval' => :'connectorPingInterval', :'discovery_lite_check_interval' => :'discoveryLiteCheckInterval', :'cluster_sync_service_timeout' => :'clusterSyncServiceTimeout', :'cluster_sync_service_interval' => :'clusterSyncServiceInterval', :'enable_sync_token' => :'enableSyncToken', :'min_event_delay' => :'minEventDelay', :'socket_connect_timeout' => :'socketConnectTimeout', :'so_timeout' => :'soTimeout', :'topology_connector_urls' => :'topologyConnectorUrls', :'topology_connector_whitelist' => :'topologyConnectorWhitelist', :'auto_stop_local_loop_enabled' => :'autoStopLocalLoopEnabled', :'gzip_connector_requests_enabled' => :'gzipConnectorRequestsEnabled', :'hmac_enabled' => :'hmacEnabled', :'enable_encryption' => :'enableEncryption', :'shared_key' => :'sharedKey', :'hmac_shared_key_ttl' => :'hmacSharedKeyTTL', :'backoff_standby_factor' => :'backoffStandbyFactor', :'backoff_stable_factor' => :'backoffStableFactor' } end
Initializes the object @param [Hash] attributes Model attributes in the form of hash
# File lib/swagger_aem_osgi/models/org_apache_sling_discovery_oak_config_properties.rb, line 107 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?(:'connectorPingTimeout') self.connector_ping_timeout = attributes[:'connectorPingTimeout'] end if attributes.has_key?(:'connectorPingInterval') self.connector_ping_interval = attributes[:'connectorPingInterval'] end if attributes.has_key?(:'discoveryLiteCheckInterval') self.discovery_lite_check_interval = attributes[:'discoveryLiteCheckInterval'] end if attributes.has_key?(:'clusterSyncServiceTimeout') self.cluster_sync_service_timeout = attributes[:'clusterSyncServiceTimeout'] end if attributes.has_key?(:'clusterSyncServiceInterval') self.cluster_sync_service_interval = attributes[:'clusterSyncServiceInterval'] end if attributes.has_key?(:'enableSyncToken') self.enable_sync_token = attributes[:'enableSyncToken'] end if attributes.has_key?(:'minEventDelay') self.min_event_delay = attributes[:'minEventDelay'] end if attributes.has_key?(:'socketConnectTimeout') self.socket_connect_timeout = attributes[:'socketConnectTimeout'] end if attributes.has_key?(:'soTimeout') self.so_timeout = attributes[:'soTimeout'] end if attributes.has_key?(:'topologyConnectorUrls') self.topology_connector_urls = attributes[:'topologyConnectorUrls'] end if attributes.has_key?(:'topologyConnectorWhitelist') self.topology_connector_whitelist = attributes[:'topologyConnectorWhitelist'] end if attributes.has_key?(:'autoStopLocalLoopEnabled') self.auto_stop_local_loop_enabled = attributes[:'autoStopLocalLoopEnabled'] end if attributes.has_key?(:'gzipConnectorRequestsEnabled') self.gzip_connector_requests_enabled = attributes[:'gzipConnectorRequestsEnabled'] end if attributes.has_key?(:'hmacEnabled') self.hmac_enabled = attributes[:'hmacEnabled'] end if attributes.has_key?(:'enableEncryption') self.enable_encryption = attributes[:'enableEncryption'] end if attributes.has_key?(:'sharedKey') self.shared_key = attributes[:'sharedKey'] end if attributes.has_key?(:'hmacSharedKeyTTL') self.hmac_shared_key_ttl = attributes[:'hmacSharedKeyTTL'] end if attributes.has_key?(:'backoffStandbyFactor') self.backoff_standby_factor = attributes[:'backoffStandbyFactor'] end if attributes.has_key?(:'backoffStableFactor') self.backoff_stable_factor = attributes[:'backoffStableFactor'] end end
Attribute type mapping.
# File lib/swagger_aem_osgi/models/org_apache_sling_discovery_oak_config_properties.rb, line 81 def self.openapi_types { :'connector_ping_timeout' => :'ConfigNodePropertyInteger', :'connector_ping_interval' => :'ConfigNodePropertyInteger', :'discovery_lite_check_interval' => :'ConfigNodePropertyInteger', :'cluster_sync_service_timeout' => :'ConfigNodePropertyInteger', :'cluster_sync_service_interval' => :'ConfigNodePropertyInteger', :'enable_sync_token' => :'ConfigNodePropertyBoolean', :'min_event_delay' => :'ConfigNodePropertyInteger', :'socket_connect_timeout' => :'ConfigNodePropertyInteger', :'so_timeout' => :'ConfigNodePropertyInteger', :'topology_connector_urls' => :'ConfigNodePropertyArray', :'topology_connector_whitelist' => :'ConfigNodePropertyArray', :'auto_stop_local_loop_enabled' => :'ConfigNodePropertyBoolean', :'gzip_connector_requests_enabled' => :'ConfigNodePropertyBoolean', :'hmac_enabled' => :'ConfigNodePropertyBoolean', :'enable_encryption' => :'ConfigNodePropertyBoolean', :'shared_key' => :'ConfigNodePropertyString', :'hmac_shared_key_ttl' => :'ConfigNodePropertyInteger', :'backoff_standby_factor' => :'ConfigNodePropertyString', :'backoff_stable_factor' => :'ConfigNodePropertyString' } end
Public Instance Methods
Checks equality by comparing each attribute. @param [Object] Object to be compared
# File lib/swagger_aem_osgi/models/org_apache_sling_discovery_oak_config_properties.rb, line 205 def ==(o) return true if self.equal?(o) self.class == o.class && connector_ping_timeout == o.connector_ping_timeout && connector_ping_interval == o.connector_ping_interval && discovery_lite_check_interval == o.discovery_lite_check_interval && cluster_sync_service_timeout == o.cluster_sync_service_timeout && cluster_sync_service_interval == o.cluster_sync_service_interval && enable_sync_token == o.enable_sync_token && min_event_delay == o.min_event_delay && socket_connect_timeout == o.socket_connect_timeout && so_timeout == o.so_timeout && topology_connector_urls == o.topology_connector_urls && topology_connector_whitelist == o.topology_connector_whitelist && auto_stop_local_loop_enabled == o.auto_stop_local_loop_enabled && gzip_connector_requests_enabled == o.gzip_connector_requests_enabled && hmac_enabled == o.hmac_enabled && enable_encryption == o.enable_encryption && shared_key == o.shared_key && hmac_shared_key_ttl == o.hmac_shared_key_ttl && backoff_standby_factor == o.backoff_standby_factor && backoff_stable_factor == o.backoff_stable_factor end
Deserializes the data based on type @param string type Data type @param string value Value to be deserialized @return [Object] Deserialized data
# File lib/swagger_aem_osgi/models/org_apache_sling_discovery_oak_config_properties.rb, line 265 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 =~ /\A(true|t|yes|y|1)\z/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 temp_model = SwaggerAemOsgiClient.const_get(type).new temp_model.build_from_hash(value) end end
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/swagger_aem_osgi/models/org_apache_sling_discovery_oak_config_properties.rb, line 331 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
Builds the object from hash @param [Hash] attributes Model attributes in the form of hash @return [Object] Returns the model itself
# File lib/swagger_aem_osgi/models/org_apache_sling_discovery_oak_config_properties.rb, line 244 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if type =~ /\AArray<(.*)>/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| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(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
@see the `==` method @param [Object] Object to be compared
# File lib/swagger_aem_osgi/models/org_apache_sling_discovery_oak_config_properties.rb, line 231 def eql?(o) self == o end
Calculates hash code according to all attributes. @return [Fixnum] Hash code
# File lib/swagger_aem_osgi/models/org_apache_sling_discovery_oak_config_properties.rb, line 237 def hash [connector_ping_timeout, connector_ping_interval, discovery_lite_check_interval, cluster_sync_service_timeout, cluster_sync_service_interval, enable_sync_token, min_event_delay, socket_connect_timeout, so_timeout, topology_connector_urls, topology_connector_whitelist, auto_stop_local_loop_enabled, gzip_connector_requests_enabled, hmac_enabled, enable_encryption, shared_key, hmac_shared_key_ttl, backoff_standby_factor, backoff_stable_factor].hash end
Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons
# File lib/swagger_aem_osgi/models/org_apache_sling_discovery_oak_config_properties.rb, line 192 def list_invalid_properties invalid_properties = Array.new invalid_properties end
Returns the object in the form of hash @return [Hash] Returns the object in the form of hash
# File lib/swagger_aem_osgi/models/org_apache_sling_discovery_oak_config_properties.rb, line 317 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
Returns the string representation of the object @return [String] String presentation of the object
# File lib/swagger_aem_osgi/models/org_apache_sling_discovery_oak_config_properties.rb, line 305 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/swagger_aem_osgi/models/org_apache_sling_discovery_oak_config_properties.rb, line 199 def valid? true end