Class: Azure::ARM::Web::Models::SourceControlProperties

Inherits:
Object
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/azure_mgmt_web/models/source_control_properties.rb

Overview

Model object.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#expiration_timeDateTime

Returns OAuth Token Expiration.

Returns:

  • (DateTime)

    OAuth Token Expiration



28
29
30
# File 'lib/azure_mgmt_web/models/source_control_properties.rb', line 28

def expiration_time
  @expiration_time
end

#nameString

Returns Name or Source Control Type.

Returns:

  • (String)

    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_tokenString

Returns OAuth Refresh Token.

Returns:

  • (String)

    OAuth Refresh Token



25
26
27
# File 'lib/azure_mgmt_web/models/source_control_properties.rb', line 25

def refresh_token
  @refresh_token
end

#tokenString

Returns OAuth Access Token.

Returns:

  • (String)

    OAuth Access Token



19
20
21
# File 'lib/azure_mgmt_web/models/source_control_properties.rb', line 19

def token
  @token
end

#token_secretString

Returns OAuth Access Token Secret.

Returns:

  • (String)

    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.

Parameters:

  • object (Hash)

    Ruby Hash object to deserialize.

Returns:



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.

Parameters:

  • object

    Model object to serialize.

Returns:

  • (Hash)

    Serialized object in form of 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

#validateObject

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