Class: MicrosoftGraph::Models::SecurityKubernetesServicePort
- Inherits:
-
Object
- Object
- MicrosoftGraph::Models::SecurityKubernetesServicePort
- Includes:
- MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
- Defined in:
- lib/models/security_kubernetes_service_port.rb
Class Method Summary collapse
-
.create_from_discriminator_value(parse_node) ⇒ Object
Creates a new instance of the appropriate class based on discriminator value.
Instance Method Summary collapse
-
#additional_data ⇒ Object
Gets the additionalData property value.
-
#additional_data=(value) ⇒ Object
Sets the additionalData property value.
-
#app_protocol ⇒ Object
Gets the appProtocol property value.
-
#app_protocol=(value) ⇒ Object
Sets the appProtocol property value.
-
#get_field_deserializers ⇒ Object
The deserialization information for the current model.
-
#initialize ⇒ Object
constructor
Instantiates a new securityKubernetesServicePort and sets the default values.
-
#name ⇒ Object
Gets the name property value.
-
#name=(value) ⇒ Object
Sets the name property value.
-
#node_port ⇒ Object
Gets the nodePort property value.
-
#node_port=(value) ⇒ Object
Sets the nodePort property value.
-
#odata_type ⇒ Object
Gets the @odata.type property value.
-
#odata_type=(value) ⇒ Object
Sets the @odata.type property value.
-
#port ⇒ Object
Gets the port property value.
-
#port=(value) ⇒ Object
Sets the port property value.
-
#protocol ⇒ Object
Gets the protocol property value.
-
#protocol=(value) ⇒ Object
Sets the protocol property value.
-
#serialize(writer) ⇒ Object
Serializes information the current object.
-
#target_port ⇒ Object
Gets the targetPort property value.
-
#target_port=(value) ⇒ Object
Sets the targetPort property value.
Constructor Details
#initialize ⇒ Object
Instantiates a new securityKubernetesServicePort and sets the default values.
67 68 69 |
# File 'lib/models/security_kubernetes_service_port.rb', line 67 def initialize() @additional_data = Hash.new end |
Class Method Details
.create_from_discriminator_value(parse_node) ⇒ Object
Creates a new instance of the appropriate class based on discriminator value
75 76 77 78 |
# File 'lib/models/security_kubernetes_service_port.rb', line 75 def self.create_from_discriminator_value(parse_node) raise StandardError, 'parse_node cannot be null' if parse_node.nil? return SecurityKubernetesServicePort.new end |
Instance Method Details
#additional_data ⇒ Object
Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
37 38 39 |
# File 'lib/models/security_kubernetes_service_port.rb', line 37 def additional_data return @additional_data end |
#additional_data=(value) ⇒ Object
Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
45 46 47 |
# File 'lib/models/security_kubernetes_service_port.rb', line 45 def additional_data=(value) @additional_data = value end |
#app_protocol ⇒ Object
Gets the appProtocol property value. The application protocol for this port.
52 53 54 |
# File 'lib/models/security_kubernetes_service_port.rb', line 52 def app_protocol return @app_protocol end |
#app_protocol=(value) ⇒ Object
Sets the appProtocol property value. The application protocol for this port.
60 61 62 |
# File 'lib/models/security_kubernetes_service_port.rb', line 60 def app_protocol=(value) @app_protocol = value end |
#get_field_deserializers ⇒ Object
The deserialization information for the current model
83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/models/security_kubernetes_service_port.rb', line 83 def get_field_deserializers() return { "appProtocol" => lambda {|n| @app_protocol = n.get_string_value() }, "name" => lambda {|n| @name = n.get_string_value() }, "nodePort" => lambda {|n| @node_port = n.get_number_value() }, "@odata.type" => lambda {|n| @odata_type = n.get_string_value() }, "port" => lambda {|n| @port = n.get_number_value() }, "protocol" => lambda {|n| @protocol = n.get_enum_value(MicrosoftGraph::Models::SecurityContainerPortProtocol) }, "targetPort" => lambda {|n| @target_port = n.get_string_value() }, } end |
#name ⇒ Object
Gets the name property value. The name of this port within the service.
98 99 100 |
# File 'lib/models/security_kubernetes_service_port.rb', line 98 def name return @name end |
#name=(value) ⇒ Object
Sets the name property value. The name of this port within the service.
106 107 108 |
# File 'lib/models/security_kubernetes_service_port.rb', line 106 def name=(value) @name = value end |
#node_port ⇒ Object
Gets the nodePort property value. The port on each node on which this service is exposed when the type is either NodePort or LoadBalancer.
113 114 115 |
# File 'lib/models/security_kubernetes_service_port.rb', line 113 def node_port return @node_port end |
#node_port=(value) ⇒ Object
Sets the nodePort property value. The port on each node on which this service is exposed when the type is either NodePort or LoadBalancer.
121 122 123 |
# File 'lib/models/security_kubernetes_service_port.rb', line 121 def node_port=(value) @node_port = value end |
#odata_type ⇒ Object
Gets the @odata.type property value. The OdataType property
128 129 130 |
# File 'lib/models/security_kubernetes_service_port.rb', line 128 def odata_type return @odata_type end |
#odata_type=(value) ⇒ Object
Sets the @odata.type property value. The OdataType property
136 137 138 |
# File 'lib/models/security_kubernetes_service_port.rb', line 136 def odata_type=(value) @odata_type = value end |
#port ⇒ Object
Gets the port property value. The port that this service exposes.
143 144 145 |
# File 'lib/models/security_kubernetes_service_port.rb', line 143 def port return @port end |
#port=(value) ⇒ Object
Sets the port property value. The port that this service exposes.
151 152 153 |
# File 'lib/models/security_kubernetes_service_port.rb', line 151 def port=(value) @port = value end |
#protocol ⇒ Object
Gets the protocol property value. The protocol name. Possible values are: udp, tcp, sctp, unknownFutureValue.
158 159 160 |
# File 'lib/models/security_kubernetes_service_port.rb', line 158 def protocol return @protocol end |
#protocol=(value) ⇒ Object
Sets the protocol property value. The protocol name. Possible values are: udp, tcp, sctp, unknownFutureValue.
166 167 168 |
# File 'lib/models/security_kubernetes_service_port.rb', line 166 def protocol=(value) @protocol = value end |
#serialize(writer) ⇒ Object
Serializes information the current object
174 175 176 177 178 179 180 181 182 183 184 |
# File 'lib/models/security_kubernetes_service_port.rb', line 174 def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? writer.write_string_value("appProtocol", @app_protocol) writer.write_string_value("name", @name) writer.write_number_value("nodePort", @node_port) writer.write_string_value("@odata.type", @odata_type) writer.write_number_value("port", @port) writer.write_enum_value("protocol", @protocol) writer.write_string_value("targetPort", @target_port) writer.write_additional_data(@additional_data) end |
#target_port ⇒ Object
Gets the targetPort property value. The name or number of the port to access on the pods targeted by the service. The port number must be in the range 1 to 65535. The name must be an IANASVCNAME.
189 190 191 |
# File 'lib/models/security_kubernetes_service_port.rb', line 189 def target_port return @target_port end |
#target_port=(value) ⇒ Object
Sets the targetPort property value. The name or number of the port to access on the pods targeted by the service. The port number must be in the range 1 to 65535. The name must be an IANASVCNAME.
197 198 199 |
# File 'lib/models/security_kubernetes_service_port.rb', line 197 def target_port=(value) @target_port = value end |