Class: Azure::ARM::Scheduler::Models::OAuthAuthentication
- Inherits:
-
HttpAuthentication
- Object
- HttpAuthentication
- Azure::ARM::Scheduler::Models::OAuthAuthentication
- Includes:
- MsRestAzure
- Defined in:
- lib/azure_mgmt_scheduler/models/oauth_authentication.rb
Overview
Model object.
Instance Attribute Summary collapse
-
#audience ⇒ String
Gets or sets the audience.
-
#client_id ⇒ String
Gets or sets the client identifier.
-
#secret ⇒ String
Gets or sets the secret.
-
#tenant ⇒ String
Gets or sets the tenant.
Attributes inherited from HttpAuthentication
Class Method Summary collapse
-
.deserialize_object(object) ⇒ OAuthAuthentication
Deserializes given Ruby Hash into Model object.
-
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
Instance Method Summary collapse
-
#validate ⇒ Object
Validate the object.
Instance Attribute Details
#audience ⇒ String
Returns Gets or sets the audience.
22 23 24 |
# File 'lib/azure_mgmt_scheduler/models/oauth_authentication.rb', line 22 def audience @audience end |
#client_id ⇒ String
Returns Gets or sets the client identifier.
25 26 27 |
# File 'lib/azure_mgmt_scheduler/models/oauth_authentication.rb', line 25 def client_id @client_id end |
#secret ⇒ String
Returns Gets or sets the secret.
16 17 18 |
# File 'lib/azure_mgmt_scheduler/models/oauth_authentication.rb', line 16 def secret @secret end |
#tenant ⇒ String
Returns Gets or sets the tenant.
19 20 21 |
# File 'lib/azure_mgmt_scheduler/models/oauth_authentication.rb', line 19 def tenant @tenant end |
Class Method Details
.deserialize_object(object) ⇒ OAuthAuthentication
Deserializes given Ruby Hash into Model object.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/azure_mgmt_scheduler/models/oauth_authentication.rb', line 66 def self.deserialize_object(object) return if object.nil? output_object = OAuthAuthentication.new deserialized_property = object['type'] if (!deserialized_property.nil? && !deserialized_property.empty?) enum_is_valid = HttpAuthenticationType.constants.any? { |e| HttpAuthenticationType.const_get(e).to_s.downcase == deserialized_property.downcase } warn 'Enum HttpAuthenticationType does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid end output_object.type = deserialized_property deserialized_property = object['secret'] output_object.secret = deserialized_property deserialized_property = object['tenant'] output_object.tenant = deserialized_property deserialized_property = object['audience'] output_object.audience = deserialized_property deserialized_property = object['clientId'] output_object.client_id = deserialized_property output_object end |
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/azure_mgmt_scheduler/models/oauth_authentication.rb', line 39 def self.serialize_object(object) object.validate output_object = {} serialized_property = object.type output_object['type'] = serialized_property unless serialized_property.nil? serialized_property = object.secret output_object['secret'] = serialized_property unless serialized_property.nil? serialized_property = object.tenant output_object['tenant'] = serialized_property unless serialized_property.nil? serialized_property = object.audience output_object['audience'] = serialized_property unless serialized_property.nil? serialized_property = object.client_id output_object['clientId'] = serialized_property unless serialized_property.nil? output_object end |
Instance Method Details
#validate ⇒ Object
Validate the object. Throws ValidationError if validation fails.
30 31 32 |
# File 'lib/azure_mgmt_scheduler/models/oauth_authentication.rb', line 30 def validate # Nothing to validate end |