Class: Azure::ARM::Web::Models::SourceControlProperties
- Inherits:
-
Object
- Object
- Azure::ARM::Web::Models::SourceControlProperties
- Includes:
- MsRestAzure
- Defined in:
- lib/azure_mgmt_web/models/source_control_properties.rb
Overview
Model object.
Instance Attribute Summary collapse
-
#expiration_time ⇒ DateTime
OAuth Token Expiration.
-
#name ⇒ String
Name or Source Control Type.
-
#refresh_token ⇒ String
OAuth Refresh Token.
-
#token ⇒ String
OAuth Access Token.
-
#token_secret ⇒ String
OAuth Access Token Secret.
Class Method Summary collapse
-
.deserialize_object(object) ⇒ SourceControlProperties
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
#expiration_time ⇒ DateTime
Returns OAuth Token Expiration.
28 29 30 |
# File 'lib/azure_mgmt_web/models/source_control_properties.rb', line 28 def expiration_time @expiration_time end |
#name ⇒ String
Returns Name or Source Control Type.
16 17 18 |
# File 'lib/azure_mgmt_web/models/source_control_properties.rb', line 16 def name @name end |
#refresh_token ⇒ String
Returns OAuth Refresh Token.
25 26 27 |
# File 'lib/azure_mgmt_web/models/source_control_properties.rb', line 25 def refresh_token @refresh_token end |
#token ⇒ String
Returns OAuth Access Token.
19 20 21 |
# File 'lib/azure_mgmt_web/models/source_control_properties.rb', line 19 def token @token end |
#token_secret ⇒ String
Returns OAuth Access Token Secret.
22 23 24 |
# File 'lib/azure_mgmt_web/models/source_control_properties.rb', line 22 def token_secret @token_secret end |
Class Method Details
.deserialize_object(object) ⇒ SourceControlProperties
Deserializes given Ruby Hash into Model object.
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/azure_mgmt_web/models/source_control_properties.rb', line 70 def self.deserialize_object(object) return if object.nil? output_object = SourceControlProperties.new deserialized_property = object['name'] output_object.name = deserialized_property deserialized_property = object['token'] output_object.token = deserialized_property deserialized_property = object['tokenSecret'] output_object.token_secret = deserialized_property deserialized_property = object['refreshToken'] output_object.refresh_token = deserialized_property deserialized_property = object['expirationTime'] deserialized_property = DateTime.parse(deserialized_property) unless deserialized_property.to_s.empty? output_object.expiration_time = deserialized_property output_object end |
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/azure_mgmt_web/models/source_control_properties.rb', line 42 def self.serialize_object(object) object.validate output_object = {} serialized_property = object.name output_object['name'] = serialized_property unless serialized_property.nil? serialized_property = object.token output_object['token'] = serialized_property unless serialized_property.nil? serialized_property = object.token_secret output_object['tokenSecret'] = serialized_property unless serialized_property.nil? serialized_property = object.refresh_token output_object['refreshToken'] = serialized_property unless serialized_property.nil? serialized_property = object.expiration_time serialized_property = serialized_property.new_offset(0).strftime('%FT%TZ') output_object['expirationTime'] = serialized_property unless serialized_property.nil? output_object end |
Instance Method Details
#validate ⇒ Object
Validate the object. Throws ValidationError if validation fails.
33 34 35 |
# File 'lib/azure_mgmt_web/models/source_control_properties.rb', line 33 def validate # Nothing to validate end |