Class: ConnectWise::SsoConfiguration
- Inherits:
-
Object
- Object
- ConnectWise::SsoConfiguration
- Defined in:
- lib/connect_wise/models/sso_configuration.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#_info ⇒ Object
Returns the value of attribute _info.
-
#all_members_submitted ⇒ Object
Returns the value of attribute all_members_submitted.
-
#client_id ⇒ Object
Client identity for this configuration of ConnectWise SSO Max length: 1000;.
-
#id ⇒ Object
Unique identifier of the SSO Configuration.
-
#inactive_flag ⇒ Object
Whether the SSO configuration is not active.
-
#is_sso_on_by_default ⇒ Object
Returns the value of attribute is_sso_on_by_default.
-
#location_ids ⇒ Object
The locations where the SAML Idp Configuration is used.
-
#name ⇒ Object
Descriptor of the SSO Configuration Max length: 100;.
-
#saml_certificate_issued_to ⇒ Object
Who the SAML certificate was issued to.
-
#saml_certificate_name ⇒ Object
Name of the SAML certificate.
-
#saml_certificate_thumbprint ⇒ Object
Thumbprint of the SAML certificate.
-
#saml_certificate_valid_from ⇒ Object
Date when the SAML certificate becomes valid.
-
#saml_certificate_valid_to ⇒ Object
Date when the SAML certificate is no longer valid.
-
#saml_entity_id ⇒ Object
SAML Identity Provider Id Max length: 1000;.
-
#saml_idp_certificate ⇒ Object
Public certificate for Identity Provider signatures.
-
#saml_sign_in_url ⇒ Object
Sign in url for the SAML Identity Provider Max length: 1000;.
-
#sso_type ⇒ Object
Type of SSO Configuration.
-
#sts_base_url ⇒ Object
Sign in URL for ConnectWise SSO.
-
#sts_user_admin_url ⇒ Object
User Admin Url for ConnectWise SSO.
-
#submitted_member_count ⇒ Object
Returns the value of attribute submitted_member_count.
-
#token ⇒ Object
Returns the value of attribute token.
Class Method Summary collapse
-
.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
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ SsoConfiguration
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ SsoConfiguration
Initializes the object
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 |
# File 'lib/connect_wise/models/sso_configuration.rb', line 156 def initialize(attributes = {}) raise ArgumentError, 'The input argument (attributes) must be a hash in `ConnectWise::SsoConfiguration` initialize method' unless attributes.is_a?(Hash) # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) do |(k, v), h| raise ArgumentError, "`#{k}` is not a valid attribute in `ConnectWise::SsoConfiguration`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect unless self.class.attribute_map.key?(k.to_sym) h[k.to_sym] = v end self.name = attributes[:name] if attributes.key?(:name) self.sso_type = attributes[:sso_type] if attributes.key?(:sso_type) if attributes.key?(:location_ids) && (value = attributes[:location_ids]).is_a?(Array) self.location_ids = value end self.id = attributes[:id] if attributes.key?(:id) self.inactive_flag = attributes[:inactive_flag] if attributes.key?(:inactive_flag) self.saml_entity_id = attributes[:saml_entity_id] if attributes.key?(:saml_entity_id) self.saml_sign_in_url = attributes[:saml_sign_in_url] if attributes.key?(:saml_sign_in_url) self.saml_idp_certificate = attributes[:saml_idp_certificate] if attributes.key?(:saml_idp_certificate) self.saml_certificate_name = attributes[:saml_certificate_name] if attributes.key?(:saml_certificate_name) self.saml_certificate_issued_to = attributes[:saml_certificate_issued_to] if attributes.key?(:saml_certificate_issued_to) self.saml_certificate_thumbprint = attributes[:saml_certificate_thumbprint] if attributes.key?(:saml_certificate_thumbprint) self.saml_certificate_valid_from = attributes[:saml_certificate_valid_from] if attributes.key?(:saml_certificate_valid_from) self.saml_certificate_valid_to = attributes[:saml_certificate_valid_to] if attributes.key?(:saml_certificate_valid_to) self.client_id = attributes[:client_id] if attributes.key?(:client_id) self.sts_base_url = attributes[:sts_base_url] if attributes.key?(:sts_base_url) self.sts_user_admin_url = attributes[:sts_user_admin_url] if attributes.key?(:sts_user_admin_url) self.token = attributes[:token] if attributes.key?(:token) self.submitted_member_count = attributes[:submitted_member_count] if attributes.key?(:submitted_member_count) self.all_members_submitted = attributes[:all_members_submitted] if attributes.key?(:all_members_submitted) if attributes.key?(:_info) && (value = attributes[:_info]).is_a?(Hash) self._info = value end return unless attributes.key?(:is_sso_on_by_default) self.is_sso_on_by_default = attributes[:is_sso_on_by_default] end |
Instance Attribute Details
#_info ⇒ Object
Returns the value of attribute _info.
64 65 66 |
# File 'lib/connect_wise/models/sso_configuration.rb', line 64 def _info @_info end |
#all_members_submitted ⇒ Object
Returns the value of attribute all_members_submitted.
64 65 66 |
# File 'lib/connect_wise/models/sso_configuration.rb', line 64 def all_members_submitted @all_members_submitted end |
#client_id ⇒ Object
Client identity for this configuration of ConnectWise SSO Max length: 1000;
56 57 58 |
# File 'lib/connect_wise/models/sso_configuration.rb', line 56 def client_id @client_id end |
#id ⇒ Object
Unique identifier of the SSO Configuration
26 27 28 |
# File 'lib/connect_wise/models/sso_configuration.rb', line 26 def id @id end |
#inactive_flag ⇒ Object
Whether the SSO configuration is not active
29 30 31 |
# File 'lib/connect_wise/models/sso_configuration.rb', line 29 def inactive_flag @inactive_flag end |
#is_sso_on_by_default ⇒ Object
Returns the value of attribute is_sso_on_by_default.
64 65 66 |
# File 'lib/connect_wise/models/sso_configuration.rb', line 64 def is_sso_on_by_default @is_sso_on_by_default end |
#location_ids ⇒ Object
The locations where the SAML Idp Configuration is used
23 24 25 |
# File 'lib/connect_wise/models/sso_configuration.rb', line 23 def location_ids @location_ids end |
#name ⇒ Object
Descriptor of the SSO Configuration Max length: 100;
17 18 19 |
# File 'lib/connect_wise/models/sso_configuration.rb', line 17 def name @name end |
#saml_certificate_issued_to ⇒ Object
Who the SAML certificate was issued to. Metadata on SAML_Idp_Certificate
44 45 46 |
# File 'lib/connect_wise/models/sso_configuration.rb', line 44 def saml_certificate_issued_to @saml_certificate_issued_to end |
#saml_certificate_name ⇒ Object
Name of the SAML certificate. Metadata on SAML_Idp_Certificate
41 42 43 |
# File 'lib/connect_wise/models/sso_configuration.rb', line 41 def saml_certificate_name @saml_certificate_name end |
#saml_certificate_thumbprint ⇒ Object
Thumbprint of the SAML certificate. Metadata on SAML_Idp_Certificate
47 48 49 |
# File 'lib/connect_wise/models/sso_configuration.rb', line 47 def saml_certificate_thumbprint @saml_certificate_thumbprint end |
#saml_certificate_valid_from ⇒ Object
Date when the SAML certificate becomes valid. Metadata on SAML_Idp_Certificate
50 51 52 |
# File 'lib/connect_wise/models/sso_configuration.rb', line 50 def saml_certificate_valid_from @saml_certificate_valid_from end |
#saml_certificate_valid_to ⇒ Object
Date when the SAML certificate is no longer valid. Metadata on SAML_Idp_Certificate
53 54 55 |
# File 'lib/connect_wise/models/sso_configuration.rb', line 53 def saml_certificate_valid_to @saml_certificate_valid_to end |
#saml_entity_id ⇒ Object
SAML Identity Provider Id Max length: 1000;
32 33 34 |
# File 'lib/connect_wise/models/sso_configuration.rb', line 32 def saml_entity_id @saml_entity_id end |
#saml_idp_certificate ⇒ Object
Public certificate for Identity Provider signatures
38 39 40 |
# File 'lib/connect_wise/models/sso_configuration.rb', line 38 def saml_idp_certificate @saml_idp_certificate end |
#saml_sign_in_url ⇒ Object
Sign in url for the SAML Identity Provider Max length: 1000;
35 36 37 |
# File 'lib/connect_wise/models/sso_configuration.rb', line 35 def saml_sign_in_url @saml_sign_in_url end |
#sso_type ⇒ Object
Type of SSO Configuration
20 21 22 |
# File 'lib/connect_wise/models/sso_configuration.rb', line 20 def sso_type @sso_type end |
#sts_base_url ⇒ Object
Sign in URL for ConnectWise SSO
59 60 61 |
# File 'lib/connect_wise/models/sso_configuration.rb', line 59 def sts_base_url @sts_base_url end |
#sts_user_admin_url ⇒ Object
User Admin Url for ConnectWise SSO
62 63 64 |
# File 'lib/connect_wise/models/sso_configuration.rb', line 62 def sts_user_admin_url @sts_user_admin_url end |
#submitted_member_count ⇒ Object
Returns the value of attribute submitted_member_count.
64 65 66 |
# File 'lib/connect_wise/models/sso_configuration.rb', line 64 def submitted_member_count @submitted_member_count end |
#token ⇒ Object
Returns the value of attribute token.
64 65 66 |
# File 'lib/connect_wise/models/sso_configuration.rb', line 64 def token @token end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
115 116 117 |
# File 'lib/connect_wise/models/sso_configuration.rb', line 115 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/connect_wise/models/sso_configuration.rb', line 88 def self.attribute_map { name: :name, sso_type: :ssoType, location_ids: :locationIds, id: :id, inactive_flag: :inactiveFlag, saml_entity_id: :samlEntityId, saml_sign_in_url: :samlSignInUrl, saml_idp_certificate: :samlIdpCertificate, saml_certificate_name: :samlCertificateName, saml_certificate_issued_to: :samlCertificateIssuedTo, saml_certificate_thumbprint: :samlCertificateThumbprint, saml_certificate_valid_from: :samlCertificateValidFrom, saml_certificate_valid_to: :samlCertificateValidTo, client_id: :clientId, sts_base_url: :stsBaseUrl, sts_user_admin_url: :stsUserAdminUrl, token: :token, submitted_member_count: :submittedMemberCount, all_members_submitted: :allMembersSubmitted, _info: :_info, is_sso_on_by_default: :isSsoOnByDefault } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
291 292 293 |
# File 'lib/connect_wise/models/sso_configuration.rb', line 291 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
147 148 149 150 151 152 |
# File 'lib/connect_wise/models/sso_configuration.rb', line 147 def self.openapi_nullable Set.new(%i[ sso_type inactive_flag ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/connect_wise/models/sso_configuration.rb', line 120 def self.openapi_types { name: :String, sso_type: :String, location_ids: :'Array<Integer>', id: :Integer, inactive_flag: :Boolean, saml_entity_id: :String, saml_sign_in_url: :String, saml_idp_certificate: :String, saml_certificate_name: :String, saml_certificate_issued_to: :String, saml_certificate_thumbprint: :String, saml_certificate_valid_from: :Time, saml_certificate_valid_to: :Time, client_id: :String, sts_base_url: :String, sts_user_admin_url: :String, token: :String, submitted_member_count: :Integer, all_members_submitted: :Boolean, _info: :'Hash<String, String>', is_sso_on_by_default: :Boolean } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 |
# File 'lib/connect_wise/models/sso_configuration.rb', line 249 def ==(other) return true if equal?(other) self.class == other.class && name == other.name && sso_type == other.sso_type && location_ids == other.location_ids && id == other.id && inactive_flag == other.inactive_flag && saml_entity_id == other.saml_entity_id && saml_sign_in_url == other.saml_sign_in_url && saml_idp_certificate == other.saml_idp_certificate && saml_certificate_name == other.saml_certificate_name && saml_certificate_issued_to == other.saml_certificate_issued_to && saml_certificate_thumbprint == other.saml_certificate_thumbprint && saml_certificate_valid_from == other.saml_certificate_valid_from && saml_certificate_valid_to == other.saml_certificate_valid_to && client_id == other.client_id && sts_base_url == other.sts_base_url && sts_user_admin_url == other.sts_user_admin_url && token == other.token && submitted_member_count == other.submitted_member_count && all_members_submitted == other.all_members_submitted && _info == other._info && is_sso_on_by_default == other.is_sso_on_by_default end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 |
# File 'lib/connect_wise/models/sso_configuration.rb', line 321 def _deserialize(type, value) case type.to_sym when :Time Time.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 # models (e.g. Pet) or oneOf klass = ConnectWise.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
392 393 394 395 396 397 398 399 400 401 402 403 404 |
# File 'lib/connect_wise/models/sso_configuration.rb', line 392 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 |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 |
# File 'lib/connect_wise/models/sso_configuration.rb', line 298 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) send("#{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 send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize(::Regexp.last_match(1), v) }) if attributes[self.class.attribute_map[key]].is_a?(Array) elsif !attributes[self.class.attribute_map[key]].nil? send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end self end |
#eql?(other) ⇒ Boolean
278 279 280 |
# File 'lib/connect_wise/models/sso_configuration.rb', line 278 def eql?(other) self == other end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
284 285 286 |
# File 'lib/connect_wise/models/sso_configuration.rb', line 284 def hash [name, sso_type, location_ids, id, inactive_flag, saml_entity_id, saml_sign_in_url, saml_idp_certificate, saml_certificate_name, saml_certificate_issued_to, saml_certificate_thumbprint, saml_certificate_valid_from, saml_certificate_valid_to, client_id, sts_base_url, sts_user_admin_url, token, submitted_member_count, all_members_submitted, _info, is_sso_on_by_default].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
217 218 219 220 221 222 223 224 |
# File 'lib/connect_wise/models/sso_configuration.rb', line 217 def list_invalid_properties invalid_properties = [] invalid_properties.push('invalid value for "name", name cannot be nil.') if @name.nil? invalid_properties.push('invalid value for "location_ids", location_ids cannot be nil.') if @location_ids.nil? invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
368 369 370 |
# File 'lib/connect_wise/models/sso_configuration.rb', line 368 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
374 375 376 377 378 379 380 381 382 383 384 385 386 |
# File 'lib/connect_wise/models/sso_configuration.rb', line 374 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = 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 |
#to_s ⇒ String
Returns the string representation of the object
362 363 364 |
# File 'lib/connect_wise/models/sso_configuration.rb', line 362 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
228 229 230 231 232 233 234 235 236 |
# File 'lib/connect_wise/models/sso_configuration.rb', line 228 def valid? return false if @name.nil? sso_type_validator = EnumAttributeValidator.new('String', %w[CWSSO SAML]) return false unless sso_type_validator.valid?(@sso_type) return false if @location_ids.nil? true end |