Class: MicrosoftGraph::Models::DomainDnsSrvRecord

Inherits:
DomainDnsRecord show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/domain_dns_srv_record.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from DomainDnsRecord

#is_optional, #is_optional=, #label, #label=, #record_type, #record_type=, #supported_service, #supported_service=, #ttl, #ttl=

Methods inherited from Entity

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

Constructor Details

#initializeObject

Instantiates a new domainDnsSrvRecord and sets the default values.



31
32
33
# File 'lib/models/domain_dns_srv_record.rb', line 31

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

Parameters:

  • parse_node

    The parse node to use to read the discriminator value and create the object

Returns:

  • a domain_dns_srv_record

Raises:

  • (StandardError)


39
40
41
42
# File 'lib/models/domain_dns_srv_record.rb', line 39

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return DomainDnsSrvRecord.new
end

Instance Method Details

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



47
48
49
50
51
52
53
54
55
56
# File 'lib/models/domain_dns_srv_record.rb', line 47

def get_field_deserializers()
    return super.merge({
        "nameTarget" => lambda {|n| @name_target = n.get_string_value() },
        "port" => lambda {|n| @port = n.get_number_value() },
        "priority" => lambda {|n| @priority = n.get_number_value() },
        "protocol" => lambda {|n| @protocol = n.get_string_value() },
        "service" => lambda {|n| @service = n.get_string_value() },
        "weight" => lambda {|n| @weight = n.get_number_value() },
    })
end

#name_targetObject

Gets the nameTarget property value. Value to use when configuring the Target property of the SRV record at the DNS host.

Returns:

  • a string



61
62
63
# File 'lib/models/domain_dns_srv_record.rb', line 61

def name_target
    return @name_target
end

#name_target=(value) ⇒ Object

Sets the nameTarget property value. Value to use when configuring the Target property of the SRV record at the DNS host.

Parameters:

  • value

    Value to set for the nameTarget property.

Returns:

  • a void



69
70
71
# File 'lib/models/domain_dns_srv_record.rb', line 69

def name_target=(value)
    @name_target = value
end

#portObject

Gets the port property value. Value to use when configuring the port property of the SRV record at the DNS host.

Returns:

  • a integer



76
77
78
# File 'lib/models/domain_dns_srv_record.rb', line 76

def port
    return @port
end

#port=(value) ⇒ Object

Sets the port property value. Value to use when configuring the port property of the SRV record at the DNS host.

Parameters:

  • value

    Value to set for the port property.

Returns:

  • a void



84
85
86
# File 'lib/models/domain_dns_srv_record.rb', line 84

def port=(value)
    @port = value
end

#priorityObject

Gets the priority property value. Value to use when configuring the priority property of the SRV record at the DNS host.

Returns:

  • a integer



91
92
93
# File 'lib/models/domain_dns_srv_record.rb', line 91

def priority
    return @priority
end

#priority=(value) ⇒ Object

Sets the priority property value. Value to use when configuring the priority property of the SRV record at the DNS host.

Parameters:

  • value

    Value to set for the priority property.

Returns:

  • a void



99
100
101
# File 'lib/models/domain_dns_srv_record.rb', line 99

def priority=(value)
    @priority = value
end

#protocolObject

Gets the protocol property value. Value to use when configuring the protocol property of the SRV record at the DNS host.

Returns:

  • a string



106
107
108
# File 'lib/models/domain_dns_srv_record.rb', line 106

def protocol
    return @protocol
end

#protocol=(value) ⇒ Object

Sets the protocol property value. Value to use when configuring the protocol property of the SRV record at the DNS host.

Parameters:

  • value

    Value to set for the protocol property.

Returns:

  • a void



114
115
116
# File 'lib/models/domain_dns_srv_record.rb', line 114

def protocol=(value)
    @protocol = value
end

#serialize(writer) ⇒ Object

Serializes information the current object

Parameters:

  • writer

    Serialization writer to use to serialize this model

Returns:

  • a void

Raises:

  • (StandardError)


122
123
124
125
126
127
128
129
130
131
# File 'lib/models/domain_dns_srv_record.rb', line 122

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_string_value("nameTarget", @name_target)
    writer.write_number_value("port", @port)
    writer.write_number_value("priority", @priority)
    writer.write_string_value("protocol", @protocol)
    writer.write_string_value("service", @service)
    writer.write_number_value("weight", @weight)
end

#serviceObject

Gets the service property value. Value to use when configuring the service property of the SRV record at the DNS host.

Returns:

  • a string



136
137
138
# File 'lib/models/domain_dns_srv_record.rb', line 136

def service
    return @service
end

#service=(value) ⇒ Object

Sets the service property value. Value to use when configuring the service property of the SRV record at the DNS host.

Parameters:

  • value

    Value to set for the service property.

Returns:

  • a void



144
145
146
# File 'lib/models/domain_dns_srv_record.rb', line 144

def service=(value)
    @service = value
end

#weightObject

Gets the weight property value. Value to use when configuring the weight property of the SRV record at the DNS host.

Returns:

  • a integer



151
152
153
# File 'lib/models/domain_dns_srv_record.rb', line 151

def weight
    return @weight
end

#weight=(value) ⇒ Object

Sets the weight property value. Value to use when configuring the weight property of the SRV record at the DNS host.

Parameters:

  • value

    Value to set for the weight property.

Returns:

  • a void



159
160
161
# File 'lib/models/domain_dns_srv_record.rb', line 159

def weight=(value)
    @weight = value
end