Class: MicrosoftGraph::Models::DomainDnsRecord

Inherits:
Entity
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/domain_dns_record.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Entity

#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=

Constructor Details

#initializeObject

Instantiates a new domainDnsRecord and sets the default values.



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

def initialize()
    super
end

Class Method Details

.create_from_discriminator_value(parse_node) ⇒ Object

Creates a new instance of the appropriate class based on discriminator value

Raises:

  • (StandardError)


36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/models/domain_dns_record.rb', line 36

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    mapping_value_node = parse_node.get_child_node("@odata.type")
    unless mapping_value_node.nil? then
        mapping_value = mapping_value_node.get_string_value
        case mapping_value
            when "#microsoft.graph.domainDnsCnameRecord"
                return DomainDnsCnameRecord.new
            when "#microsoft.graph.domainDnsMxRecord"
                return DomainDnsMxRecord.new
            when "#microsoft.graph.domainDnsSrvRecord"
                return DomainDnsSrvRecord.new
            when "#microsoft.graph.domainDnsTxtRecord"
                return DomainDnsTxtRecord.new
            when "#microsoft.graph.domainDnsUnavailableRecord"
                return DomainDnsUnavailableRecord.new
        end
    end
    return DomainDnsRecord.new
end

Instance Method Details

#get_field_deserializersObject

The deserialization information for the current model



60
61
62
63
64
65
66
67
68
# File 'lib/models/domain_dns_record.rb', line 60

def get_field_deserializers()
    return super.merge({
        "isOptional" => lambda {|n| @is_optional = n.get_boolean_value() },
        "label" => lambda {|n| @label = n.get_string_value() },
        "recordType" => lambda {|n| @record_type = n.get_string_value() },
        "supportedService" => lambda {|n| @supported_service = n.get_string_value() },
        "ttl" => lambda {|n| @ttl = n.get_number_value() },
    })
end

#is_optionalObject

Gets the isOptional property value. If false, this record must be configured by the customer at the DNS host for Microsoft Online Services to operate correctly with the domain.



73
74
75
# File 'lib/models/domain_dns_record.rb', line 73

def is_optional
    return @is_optional
end

#is_optional=(value) ⇒ Object

Sets the isOptional property value. If false, this record must be configured by the customer at the DNS host for Microsoft Online Services to operate correctly with the domain.



81
82
83
# File 'lib/models/domain_dns_record.rb', line 81

def is_optional=(value)
    @is_optional = value
end

#labelObject

Gets the label property value. Value used when configuring the name of the DNS record at the DNS host.



88
89
90
# File 'lib/models/domain_dns_record.rb', line 88

def label
    return @label
end

#label=(value) ⇒ Object

Sets the label property value. Value used when configuring the name of the DNS record at the DNS host.



96
97
98
# File 'lib/models/domain_dns_record.rb', line 96

def label=(value)
    @label = value
end

#record_typeObject

Gets the recordType property value. Indicates what type of DNS record this entity represents.The value can be one of the following: CName, Mx, Srv, Txt.



103
104
105
# File 'lib/models/domain_dns_record.rb', line 103

def record_type
    return @record_type
end

#record_type=(value) ⇒ Object

Sets the recordType property value. Indicates what type of DNS record this entity represents.The value can be one of the following: CName, Mx, Srv, Txt.



111
112
113
# File 'lib/models/domain_dns_record.rb', line 111

def record_type=(value)
    @record_type = value
end

#serialize(writer) ⇒ Object

Serializes information the current object

Raises:

  • (StandardError)


119
120
121
122
123
124
125
126
127
# File 'lib/models/domain_dns_record.rb', line 119

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_boolean_value("isOptional", @is_optional)
    writer.write_string_value("label", @label)
    writer.write_string_value("recordType", @record_type)
    writer.write_string_value("supportedService", @supported_service)
    writer.write_number_value("ttl", @ttl)
end

#supported_serviceObject

Gets the supportedService property value. Microsoft Online Service or feature that has a dependency on this DNS record.Can be one of the following values: null, Email, Sharepoint, EmailInternalRelayOnly, OfficeCommunicationsOnline, SharePointDefaultDomain, FullRedelegation, SharePointPublic, OrgIdAuthentication, Yammer, Intune.



132
133
134
# File 'lib/models/domain_dns_record.rb', line 132

def supported_service
    return @supported_service
end

#supported_service=(value) ⇒ Object

Sets the supportedService property value. Microsoft Online Service or feature that has a dependency on this DNS record.Can be one of the following values: null, Email, Sharepoint, EmailInternalRelayOnly, OfficeCommunicationsOnline, SharePointDefaultDomain, FullRedelegation, SharePointPublic, OrgIdAuthentication, Yammer, Intune.



140
141
142
# File 'lib/models/domain_dns_record.rb', line 140

def supported_service=(value)
    @supported_service = value
end

#ttlObject

Gets the ttl property value. Value to use when configuring the time-to-live (ttl) property of the DNS record at the DNS host. Not nullable.



147
148
149
# File 'lib/models/domain_dns_record.rb', line 147

def ttl
    return @ttl
end

#ttl=(value) ⇒ Object

Sets the ttl property value. Value to use when configuring the time-to-live (ttl) property of the DNS record at the DNS host. Not nullable.



155
156
157
# File 'lib/models/domain_dns_record.rb', line 155

def ttl=(value)
    @ttl = value
end