Class: OCI::Opensearch::Models::OutboundClusterSummary
- Inherits:
-
Object
- Object
- OCI::Opensearch::Models::OutboundClusterSummary
- Defined in:
- lib/oci/opensearch/models/outbound_cluster_summary.rb
Overview
Contains details of a Outbound cluster
Constant Summary collapse
- MODE_ENUM =
[ MODE_SEARCH_ONLY = 'SEARCH_ONLY'.freeze, MODE_REPLICATION_ONLY = 'REPLICATION_ONLY'.freeze, MODE_SEARCH_AND_REPLICATION = 'SEARCH_AND_REPLICATION'.freeze, MODE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#display_name ⇒ String
[Required] Name of the Outbound cluster.
-
#is_skip_unavailable ⇒ BOOLEAN
Flag to indicate whether to skip the Outbound cluster during cross cluster search, if it is unavailable.
-
#mode ⇒ String
Mode for the cross cluster connection.
-
#ping_schedule ⇒ String
Sets the time interval between regular application-level ping messages that are sent to try and keep outbound cluster connections alive.
-
#seed_cluster_id ⇒ String
[Required] OCID of the Outbound cluster.
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 = {}) ⇒ OutboundClusterSummary
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 = {}) ⇒ OutboundClusterSummary
Initializes the object
77 78 79 80 81 82 83 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 |
# File 'lib/oci/opensearch/models/outbound_cluster_summary.rb', line 77 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.ping_schedule = attributes[:'pingSchedule'] if attributes[:'pingSchedule'] raise 'You cannot provide both :pingSchedule and :ping_schedule' if attributes.key?(:'pingSchedule') && attributes.key?(:'ping_schedule') self.ping_schedule = attributes[:'ping_schedule'] if attributes[:'ping_schedule'] self.is_skip_unavailable = attributes[:'isSkipUnavailable'] unless attributes[:'isSkipUnavailable'].nil? self.is_skip_unavailable = true if is_skip_unavailable.nil? && !attributes.key?(:'isSkipUnavailable') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isSkipUnavailable and :is_skip_unavailable' if attributes.key?(:'isSkipUnavailable') && attributes.key?(:'is_skip_unavailable') self.is_skip_unavailable = attributes[:'is_skip_unavailable'] unless attributes[:'is_skip_unavailable'].nil? self.is_skip_unavailable = true if is_skip_unavailable.nil? && !attributes.key?(:'isSkipUnavailable') && !attributes.key?(:'is_skip_unavailable') # rubocop:disable Style/StringLiterals self.seed_cluster_id = attributes[:'seedClusterId'] if attributes[:'seedClusterId'] raise 'You cannot provide both :seedClusterId and :seed_cluster_id' if attributes.key?(:'seedClusterId') && attributes.key?(:'seed_cluster_id') self.seed_cluster_id = attributes[:'seed_cluster_id'] if attributes[:'seed_cluster_id'] self.mode = attributes[:'mode'] if attributes[:'mode'] self.mode = "SEARCH_ONLY" if mode.nil? && !attributes.key?(:'mode') # rubocop:disable Style/StringLiterals end |
Instance Attribute Details
#display_name ⇒ String
[Required] Name of the Outbound cluster. Avoid entering confidential information.
22 23 24 |
# File 'lib/oci/opensearch/models/outbound_cluster_summary.rb', line 22 def display_name @display_name end |
#is_skip_unavailable ⇒ BOOLEAN
Flag to indicate whether to skip the Outbound cluster during cross cluster search, if it is unavailable
30 31 32 |
# File 'lib/oci/opensearch/models/outbound_cluster_summary.rb', line 30 def is_skip_unavailable @is_skip_unavailable end |
#mode ⇒ String
Mode for the cross cluster connection
38 39 40 |
# File 'lib/oci/opensearch/models/outbound_cluster_summary.rb', line 38 def mode @mode end |
#ping_schedule ⇒ String
Sets the time interval between regular application-level ping messages that are sent to try and keep outbound cluster connections alive. If set to -1, application-level ping messages to this outbound cluster are not sent. If unset, application-level ping messages are sent according to the global transport.ping_schedule setting, which defaults to -1 meaning that pings are not sent.
26 27 28 |
# File 'lib/oci/opensearch/models/outbound_cluster_summary.rb', line 26 def ping_schedule @ping_schedule end |
#seed_cluster_id ⇒ String
[Required] OCID of the Outbound cluster
34 35 36 |
# File 'lib/oci/opensearch/models/outbound_cluster_summary.rb', line 34 def seed_cluster_id @seed_cluster_id end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/oci/opensearch/models/outbound_cluster_summary.rb', line 41 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'display_name': :'displayName', 'ping_schedule': :'pingSchedule', 'is_skip_unavailable': :'isSkipUnavailable', 'seed_cluster_id': :'seedClusterId', 'mode': :'mode' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/oci/opensearch/models/outbound_cluster_summary.rb', line 54 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'display_name': :'String', 'ping_schedule': :'String', 'is_skip_unavailable': :'BOOLEAN', 'seed_cluster_id': :'String', 'mode': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
133 134 135 136 137 138 139 140 141 142 |
# File 'lib/oci/opensearch/models/outbound_cluster_summary.rb', line 133 def ==(other) return true if equal?(other) self.class == other.class && display_name == other.display_name && ping_schedule == other.ping_schedule && is_skip_unavailable == other.is_skip_unavailable && seed_cluster_id == other.seed_cluster_id && mode == other.mode end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 |
# File 'lib/oci/opensearch/models/outbound_cluster_summary.rb', line 167 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
147 148 149 |
# File 'lib/oci/opensearch/models/outbound_cluster_summary.rb', line 147 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
156 157 158 |
# File 'lib/oci/opensearch/models/outbound_cluster_summary.rb', line 156 def hash [display_name, ping_schedule, is_skip_unavailable, seed_cluster_id, mode].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
200 201 202 203 204 205 206 207 208 209 |
# File 'lib/oci/opensearch/models/outbound_cluster_summary.rb', line 200 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
194 195 196 |
# File 'lib/oci/opensearch/models/outbound_cluster_summary.rb', line 194 def to_s to_hash.to_s end |