Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. See License.txt in the project root for license information. Code generated by Microsoft (R) AutoRest Code Generator.
/** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. */
package com.microsoft.azure.management.containerinstance; import com.fasterxml.jackson.annotation.JsonProperty;
The port exposed on the container instance.
/** * The port exposed on the container instance. */
public class ContainerPort {
The protocol associated with the port. Possible values include: 'TCP', 'UDP'.
/** * The protocol associated with the port. Possible values include: 'TCP', * 'UDP'. */
@JsonProperty(value = "protocol") private ContainerNetworkProtocol protocol;
The port number exposed within the container group.
/** * The port number exposed within the container group. */
@JsonProperty(value = "port", required = true) private int port;
Get the protocol associated with the port. Possible values include: 'TCP', 'UDP'.
Returns:the protocol value
/** * Get the protocol associated with the port. Possible values include: 'TCP', 'UDP'. * * @return the protocol value */
public ContainerNetworkProtocol protocol() { return this.protocol; }
Set the protocol associated with the port. Possible values include: 'TCP', 'UDP'.
Params:
  • protocol – the protocol value to set
Returns:the ContainerPort object itself.
/** * Set the protocol associated with the port. Possible values include: 'TCP', 'UDP'. * * @param protocol the protocol value to set * @return the ContainerPort object itself. */
public ContainerPort withProtocol(ContainerNetworkProtocol protocol) { this.protocol = protocol; return this; }
Get the port number exposed within the container group.
Returns:the port value
/** * Get the port number exposed within the container group. * * @return the port value */
public int port() { return this.port; }
Set the port number exposed within the container group.
Params:
  • port – the port value to set
Returns:the ContainerPort object itself.
/** * Set the port number exposed within the container group. * * @param port the port value to set * @return the ContainerPort object itself. */
public ContainerPort withPort(int port) { this.port = port; return this; } }