Class: OryClient::NormalizedProjectRevisionSAMLProvider

Inherits:
ApiModelBase
  • Object
show all
Defined in:
lib/ory-client/models/normalized_project_revision_saml_provider.rb

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ApiModelBase

_deserialize, #_to_hash, #to_body, #to_s

Constructor Details

#initialize(attributes = {}) ⇒ NormalizedProjectRevisionSAMLProvider

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



144
145
146
147
148
149
150
151
152
153
154
155
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
214
215
216
217
218
219
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 144

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `OryClient::NormalizedProjectRevisionSAMLProvider` 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 `OryClient::NormalizedProjectRevisionSAMLProvider`. 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?(:'audience_override_base_url')
    self.audience_override_base_url = attributes[:'audience_override_base_url']
  end

  if attributes.key?(:'created_at')
    self.created_at = attributes[:'created_at']
  end

  if attributes.key?(:'id')
    self.id = attributes[:'id']
  end

  if attributes.key?(:'label')
    self.label = attributes[:'label']
  end

  if attributes.key?(:'mapper_url')
    self.mapper_url = attributes[:'mapper_url']
  end

  if attributes.key?(:'organization_id')
    self.organization_id = attributes[:'organization_id']
  end

  if attributes.key?(:'project_revision_id')
    self.project_revision_id = attributes[:'project_revision_id']
  end

  if attributes.key?(:'provider_id')
    self.provider_id = attributes[:'provider_id']
  end

  if attributes.key?(:'proxy_acs_url')
    self.proxy_acs_url = attributes[:'proxy_acs_url']
  end

  if attributes.key?(:'proxy_saml_audience_override')
    self.proxy_saml_audience_override = attributes[:'proxy_saml_audience_override']
  end

  if attributes.key?(:'raw_idp_metadata_xml')
    self. = attributes[:'raw_idp_metadata_xml']
  end

  if attributes.key?(:'state')
    self.state = attributes[:'state']
  end

  if attributes.key?(:'update_identity_on_login')
    self. = attributes[:'update_identity_on_login']
  end

  if attributes.key?(:'updated_at')
    self.updated_at = attributes[:'updated_at']
  end

  if attributes.key?(:'valid_to')
    if (value = attributes[:'valid_to']).is_a?(Array)
      self.valid_to = value
    end
  end
end

Instance Attribute Details

#audience_override_base_urlObject

Returns the value of attribute audience_override_base_url.



18
19
20
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 18

def audience_override_base_url
  @audience_override_base_url
end

#created_atObject

The Project's Revision Creation Date



21
22
23
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 21

def created_at
  @created_at
end

#idObject

Returns the value of attribute id.



23
24
25
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 23

def id
  @id
end

#labelObject

Label represents an optional label which can be used in the UI generation.



26
27
28
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 26

def label
  @label
end

#mapper_urlObject

Mapper specifies the JSONNet code snippet which uses the OpenID Connect Provider's data (e.g. GitHub or Google profile information) to hydrate the identity's data.



29
30
31
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 29

def mapper_url
  @mapper_url
end

#organization_idObject

Returns the value of attribute organization_id.



31
32
33
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 31

def organization_id
  @organization_id
end

#project_revision_idObject

The Revision's ID this schema belongs to



34
35
36
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 34

def project_revision_id
  @project_revision_id
end

#provider_idObject

ID is the provider's ID



37
38
39
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 37

def provider_id
  @provider_id
end

#proxy_acs_urlObject

Returns the value of attribute proxy_acs_url.



39
40
41
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 39

def proxy_acs_url
  @proxy_acs_url
end

#proxy_saml_audience_overrideObject

Returns the value of attribute proxy_saml_audience_override.



41
42
43
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 41

def proxy_saml_audience_override
  @proxy_saml_audience_override
end

#raw_idp_metadata_xmlObject

RawIDPMetadataXML is the raw XML metadata of the IDP.



44
45
46
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 44

def 
  @raw_idp_metadata_xml
end

#stateObject

State indicates the state of the provider Only providers with state enabled will be used for authentication enabled ThirdPartyProviderStateEnabled disabled ThirdPartyProviderStateDisabled



47
48
49
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 47

def state
  @state
end

#update_identity_on_loginObject

UpdateIdentityOnLogin controls whether the identity is updated from SAML claims on each login. Possible values are "never" (default) and "automatic". never UpdateIdentityOnLoginNever UpdateIdentityOnLoginNever disables identity updates on login (default). automatic UpdateIdentityOnLoginAutomatic UpdateIdentityOnLoginAutomatic re-runs the Jsonnet claims mapper on every login and updates the identity's traits and metadata automatically.



50
51
52
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 50

def 
  @update_identity_on_login
end

#updated_atObject

Last Time Project's Revision was Updated



53
54
55
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 53

def updated_at
  @updated_at
end

#valid_toObject

Valid to dates of all signing certs associated with the SAML connection



56
57
58
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 56

def valid_to
  @valid_to
end

Class Method Details

.acceptable_attribute_mapObject

Returns attribute mapping this model knows about



102
103
104
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 102

def self.acceptable_attribute_map
  attribute_map
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about



107
108
109
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 107

def self.acceptable_attributes
  acceptable_attribute_map.values
end

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 81

def self.attribute_map
  {
    :'audience_override_base_url' => :'audience_override_base_url',
    :'created_at' => :'created_at',
    :'id' => :'id',
    :'label' => :'label',
    :'mapper_url' => :'mapper_url',
    :'organization_id' => :'organization_id',
    :'project_revision_id' => :'project_revision_id',
    :'provider_id' => :'provider_id',
    :'proxy_acs_url' => :'proxy_acs_url',
    :'proxy_saml_audience_override' => :'proxy_saml_audience_override',
    :'raw_idp_metadata_xml' => :'raw_idp_metadata_xml',
    :'state' => :'state',
    :'update_identity_on_login' => :'update_identity_on_login',
    :'updated_at' => :'updated_at',
    :'valid_to' => :'valid_to'
  }
end

.build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 297

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_nullableObject

List of attributes with nullable: true



133
134
135
136
137
138
139
140
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 133

def self.openapi_nullable
  Set.new([
    :'audience_override_base_url',
    :'organization_id',
    :'proxy_acs_url',
    :'proxy_saml_audience_override',
  ])
end

.openapi_typesObject

Attribute type mapping.



112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 112

def self.openapi_types
  {
    :'audience_override_base_url' => :'String',
    :'created_at' => :'Time',
    :'id' => :'String',
    :'label' => :'String',
    :'mapper_url' => :'String',
    :'organization_id' => :'String',
    :'project_revision_id' => :'String',
    :'provider_id' => :'String',
    :'proxy_acs_url' => :'String',
    :'proxy_saml_audience_override' => :'String',
    :'raw_idp_metadata_xml' => :'String',
    :'state' => :'String',
    :'update_identity_on_login' => :'String',
    :'updated_at' => :'Time',
    :'valid_to' => :'Array<String>'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 262

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      audience_override_base_url == o.audience_override_base_url &&
      created_at == o.created_at &&
      id == o.id &&
      label == o.label &&
      mapper_url == o.mapper_url &&
      organization_id == o.organization_id &&
      project_revision_id == o.project_revision_id &&
      provider_id == o.provider_id &&
      proxy_acs_url == o.proxy_acs_url &&
      proxy_saml_audience_override == o.proxy_saml_audience_override &&
       == o. &&
      state == o.state &&
       == o. &&
      updated_at == o.updated_at &&
      valid_to == o.valid_to
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


284
285
286
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 284

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



290
291
292
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 290

def hash
  [audience_override_base_url, created_at, id, label, mapper_url, organization_id, project_revision_id, provider_id, proxy_acs_url, proxy_saml_audience_override, , state, , updated_at, valid_to].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



223
224
225
226
227
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 223

def list_invalid_properties
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
  invalid_properties = Array.new
  invalid_properties
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



319
320
321
322
323
324
325
326
327
328
329
330
331
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 319

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

Returns:

  • (Boolean)

    true if the model is valid



231
232
233
234
235
236
237
238
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 231

def valid?
  warn '[DEPRECATED] the `valid?` method is obsolete'
  state_validator = EnumAttributeValidator.new('String', ["enabled", "disabled"])
  return false unless state_validator.valid?(@state)
   = EnumAttributeValidator.new('String', ["never", "automatic"])
  return false unless .valid?(@update_identity_on_login)
  true
end