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



139
140
141
142
143
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
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 139

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?(:'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

#updated_atObject

Last Time Project’s Revision was Updated



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

def updated_at
  @updated_at
end

#valid_toObject

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



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

def valid_to
  @valid_to
end

Class Method Details

.acceptable_attribute_mapObject

Returns attribute mapping this model knows about



98
99
100
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 98

def self.acceptable_attribute_map
  attribute_map
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about



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

def self.acceptable_attributes
  acceptable_attribute_map.values
end

.attribute_mapObject

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



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

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',
    :'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



275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 275

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



128
129
130
131
132
133
134
135
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 128

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.



108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 108

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',
    :'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



241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 241

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 &&
      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


262
263
264
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 262

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



268
269
270
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 268

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



214
215
216
217
218
# File 'lib/ory-client/models/normalized_project_revision_saml_provider.rb', line 214

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



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

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



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

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