Class NatInfo.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<NatInfo.Builder>
com.google.cloud.networkmanagement.v1beta1.NatInfo.Builder
All Implemented Interfaces:
NatInfoOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
NatInfo

public static final class NatInfo.Builder extends com.google.protobuf.GeneratedMessage.Builder<NatInfo.Builder> implements NatInfoOrBuilder
 For display only. Metadata associated with NAT.
 
Protobuf type google.cloud.networkmanagement.v1beta1.NatInfo
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<NatInfo.Builder>
    • clear

      public NatInfo.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<NatInfo.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<NatInfo.Builder>
    • getDefaultInstanceForType

      public NatInfo getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public NatInfo build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public NatInfo buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public NatInfo.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<NatInfo.Builder>
    • mergeFrom

      public NatInfo.Builder mergeFrom(NatInfo other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<NatInfo.Builder>
    • mergeFrom

      public NatInfo.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<NatInfo.Builder>
      Throws:
      IOException
    • getTypeValue

      public int getTypeValue()
       Type of NAT.
       
      .google.cloud.networkmanagement.v1beta1.NatInfo.Type type = 1;
      Specified by:
      getTypeValue in interface NatInfoOrBuilder
      Returns:
      The enum numeric value on the wire for type.
    • setTypeValue

      public NatInfo.Builder setTypeValue(int value)
       Type of NAT.
       
      .google.cloud.networkmanagement.v1beta1.NatInfo.Type type = 1;
      Parameters:
      value - The enum numeric value on the wire for type to set.
      Returns:
      This builder for chaining.
    • getType

      public NatInfo.Type getType()
       Type of NAT.
       
      .google.cloud.networkmanagement.v1beta1.NatInfo.Type type = 1;
      Specified by:
      getType in interface NatInfoOrBuilder
      Returns:
      The type.
    • setType

      public NatInfo.Builder setType(NatInfo.Type value)
       Type of NAT.
       
      .google.cloud.networkmanagement.v1beta1.NatInfo.Type type = 1;
      Parameters:
      value - The type to set.
      Returns:
      This builder for chaining.
    • clearType

      public NatInfo.Builder clearType()
       Type of NAT.
       
      .google.cloud.networkmanagement.v1beta1.NatInfo.Type type = 1;
      Returns:
      This builder for chaining.
    • getProtocol

      public String getProtocol()
       IP protocol in string format, for example: "TCP", "UDP", "ICMP".
       
      string protocol = 2;
      Specified by:
      getProtocol in interface NatInfoOrBuilder
      Returns:
      The protocol.
    • getProtocolBytes

      public com.google.protobuf.ByteString getProtocolBytes()
       IP protocol in string format, for example: "TCP", "UDP", "ICMP".
       
      string protocol = 2;
      Specified by:
      getProtocolBytes in interface NatInfoOrBuilder
      Returns:
      The bytes for protocol.
    • setProtocol

      public NatInfo.Builder setProtocol(String value)
       IP protocol in string format, for example: "TCP", "UDP", "ICMP".
       
      string protocol = 2;
      Parameters:
      value - The protocol to set.
      Returns:
      This builder for chaining.
    • clearProtocol

      public NatInfo.Builder clearProtocol()
       IP protocol in string format, for example: "TCP", "UDP", "ICMP".
       
      string protocol = 2;
      Returns:
      This builder for chaining.
    • setProtocolBytes

      public NatInfo.Builder setProtocolBytes(com.google.protobuf.ByteString value)
       IP protocol in string format, for example: "TCP", "UDP", "ICMP".
       
      string protocol = 2;
      Parameters:
      value - The bytes for protocol to set.
      Returns:
      This builder for chaining.
    • getNetworkUri

      public String getNetworkUri()
       URI of the network where NAT translation takes place.
       
      string network_uri = 3;
      Specified by:
      getNetworkUri in interface NatInfoOrBuilder
      Returns:
      The networkUri.
    • getNetworkUriBytes

      public com.google.protobuf.ByteString getNetworkUriBytes()
       URI of the network where NAT translation takes place.
       
      string network_uri = 3;
      Specified by:
      getNetworkUriBytes in interface NatInfoOrBuilder
      Returns:
      The bytes for networkUri.
    • setNetworkUri

      public NatInfo.Builder setNetworkUri(String value)
       URI of the network where NAT translation takes place.
       
      string network_uri = 3;
      Parameters:
      value - The networkUri to set.
      Returns:
      This builder for chaining.
    • clearNetworkUri

      public NatInfo.Builder clearNetworkUri()
       URI of the network where NAT translation takes place.
       
      string network_uri = 3;
      Returns:
      This builder for chaining.
    • setNetworkUriBytes

      public NatInfo.Builder setNetworkUriBytes(com.google.protobuf.ByteString value)
       URI of the network where NAT translation takes place.
       
      string network_uri = 3;
      Parameters:
      value - The bytes for networkUri to set.
      Returns:
      This builder for chaining.
    • getOldSourceIp

      public String getOldSourceIp()
       Source IP address before NAT translation.
       
      string old_source_ip = 4;
      Specified by:
      getOldSourceIp in interface NatInfoOrBuilder
      Returns:
      The oldSourceIp.
    • getOldSourceIpBytes

      public com.google.protobuf.ByteString getOldSourceIpBytes()
       Source IP address before NAT translation.
       
      string old_source_ip = 4;
      Specified by:
      getOldSourceIpBytes in interface NatInfoOrBuilder
      Returns:
      The bytes for oldSourceIp.
    • setOldSourceIp

      public NatInfo.Builder setOldSourceIp(String value)
       Source IP address before NAT translation.
       
      string old_source_ip = 4;
      Parameters:
      value - The oldSourceIp to set.
      Returns:
      This builder for chaining.
    • clearOldSourceIp

      public NatInfo.Builder clearOldSourceIp()
       Source IP address before NAT translation.
       
      string old_source_ip = 4;
      Returns:
      This builder for chaining.
    • setOldSourceIpBytes

      public NatInfo.Builder setOldSourceIpBytes(com.google.protobuf.ByteString value)
       Source IP address before NAT translation.
       
      string old_source_ip = 4;
      Parameters:
      value - The bytes for oldSourceIp to set.
      Returns:
      This builder for chaining.
    • getNewSourceIp

      public String getNewSourceIp()
       Source IP address after NAT translation.
       
      string new_source_ip = 5;
      Specified by:
      getNewSourceIp in interface NatInfoOrBuilder
      Returns:
      The newSourceIp.
    • getNewSourceIpBytes

      public com.google.protobuf.ByteString getNewSourceIpBytes()
       Source IP address after NAT translation.
       
      string new_source_ip = 5;
      Specified by:
      getNewSourceIpBytes in interface NatInfoOrBuilder
      Returns:
      The bytes for newSourceIp.
    • setNewSourceIp

      public NatInfo.Builder setNewSourceIp(String value)
       Source IP address after NAT translation.
       
      string new_source_ip = 5;
      Parameters:
      value - The newSourceIp to set.
      Returns:
      This builder for chaining.
    • clearNewSourceIp

      public NatInfo.Builder clearNewSourceIp()
       Source IP address after NAT translation.
       
      string new_source_ip = 5;
      Returns:
      This builder for chaining.
    • setNewSourceIpBytes

      public NatInfo.Builder setNewSourceIpBytes(com.google.protobuf.ByteString value)
       Source IP address after NAT translation.
       
      string new_source_ip = 5;
      Parameters:
      value - The bytes for newSourceIp to set.
      Returns:
      This builder for chaining.
    • getOldDestinationIp

      public String getOldDestinationIp()
       Destination IP address before NAT translation.
       
      string old_destination_ip = 6;
      Specified by:
      getOldDestinationIp in interface NatInfoOrBuilder
      Returns:
      The oldDestinationIp.
    • getOldDestinationIpBytes

      public com.google.protobuf.ByteString getOldDestinationIpBytes()
       Destination IP address before NAT translation.
       
      string old_destination_ip = 6;
      Specified by:
      getOldDestinationIpBytes in interface NatInfoOrBuilder
      Returns:
      The bytes for oldDestinationIp.
    • setOldDestinationIp

      public NatInfo.Builder setOldDestinationIp(String value)
       Destination IP address before NAT translation.
       
      string old_destination_ip = 6;
      Parameters:
      value - The oldDestinationIp to set.
      Returns:
      This builder for chaining.
    • clearOldDestinationIp

      public NatInfo.Builder clearOldDestinationIp()
       Destination IP address before NAT translation.
       
      string old_destination_ip = 6;
      Returns:
      This builder for chaining.
    • setOldDestinationIpBytes

      public NatInfo.Builder setOldDestinationIpBytes(com.google.protobuf.ByteString value)
       Destination IP address before NAT translation.
       
      string old_destination_ip = 6;
      Parameters:
      value - The bytes for oldDestinationIp to set.
      Returns:
      This builder for chaining.
    • getNewDestinationIp

      public String getNewDestinationIp()
       Destination IP address after NAT translation.
       
      string new_destination_ip = 7;
      Specified by:
      getNewDestinationIp in interface NatInfoOrBuilder
      Returns:
      The newDestinationIp.
    • getNewDestinationIpBytes

      public com.google.protobuf.ByteString getNewDestinationIpBytes()
       Destination IP address after NAT translation.
       
      string new_destination_ip = 7;
      Specified by:
      getNewDestinationIpBytes in interface NatInfoOrBuilder
      Returns:
      The bytes for newDestinationIp.
    • setNewDestinationIp

      public NatInfo.Builder setNewDestinationIp(String value)
       Destination IP address after NAT translation.
       
      string new_destination_ip = 7;
      Parameters:
      value - The newDestinationIp to set.
      Returns:
      This builder for chaining.
    • clearNewDestinationIp

      public NatInfo.Builder clearNewDestinationIp()
       Destination IP address after NAT translation.
       
      string new_destination_ip = 7;
      Returns:
      This builder for chaining.
    • setNewDestinationIpBytes

      public NatInfo.Builder setNewDestinationIpBytes(com.google.protobuf.ByteString value)
       Destination IP address after NAT translation.
       
      string new_destination_ip = 7;
      Parameters:
      value - The bytes for newDestinationIp to set.
      Returns:
      This builder for chaining.
    • getOldSourcePort

      public int getOldSourcePort()
       Source port before NAT translation. Only valid when protocol is TCP or UDP.
       
      int32 old_source_port = 8;
      Specified by:
      getOldSourcePort in interface NatInfoOrBuilder
      Returns:
      The oldSourcePort.
    • setOldSourcePort

      public NatInfo.Builder setOldSourcePort(int value)
       Source port before NAT translation. Only valid when protocol is TCP or UDP.
       
      int32 old_source_port = 8;
      Parameters:
      value - The oldSourcePort to set.
      Returns:
      This builder for chaining.
    • clearOldSourcePort

      public NatInfo.Builder clearOldSourcePort()
       Source port before NAT translation. Only valid when protocol is TCP or UDP.
       
      int32 old_source_port = 8;
      Returns:
      This builder for chaining.
    • getNewSourcePort

      public int getNewSourcePort()
       Source port after NAT translation. Only valid when protocol is TCP or UDP.
       
      int32 new_source_port = 9;
      Specified by:
      getNewSourcePort in interface NatInfoOrBuilder
      Returns:
      The newSourcePort.
    • setNewSourcePort

      public NatInfo.Builder setNewSourcePort(int value)
       Source port after NAT translation. Only valid when protocol is TCP or UDP.
       
      int32 new_source_port = 9;
      Parameters:
      value - The newSourcePort to set.
      Returns:
      This builder for chaining.
    • clearNewSourcePort

      public NatInfo.Builder clearNewSourcePort()
       Source port after NAT translation. Only valid when protocol is TCP or UDP.
       
      int32 new_source_port = 9;
      Returns:
      This builder for chaining.
    • getOldDestinationPort

      public int getOldDestinationPort()
       Destination port before NAT translation. Only valid when protocol is TCP or
       UDP.
       
      int32 old_destination_port = 10;
      Specified by:
      getOldDestinationPort in interface NatInfoOrBuilder
      Returns:
      The oldDestinationPort.
    • setOldDestinationPort

      public NatInfo.Builder setOldDestinationPort(int value)
       Destination port before NAT translation. Only valid when protocol is TCP or
       UDP.
       
      int32 old_destination_port = 10;
      Parameters:
      value - The oldDestinationPort to set.
      Returns:
      This builder for chaining.
    • clearOldDestinationPort

      public NatInfo.Builder clearOldDestinationPort()
       Destination port before NAT translation. Only valid when protocol is TCP or
       UDP.
       
      int32 old_destination_port = 10;
      Returns:
      This builder for chaining.
    • getNewDestinationPort

      public int getNewDestinationPort()
       Destination port after NAT translation. Only valid when protocol is TCP or
       UDP.
       
      int32 new_destination_port = 11;
      Specified by:
      getNewDestinationPort in interface NatInfoOrBuilder
      Returns:
      The newDestinationPort.
    • setNewDestinationPort

      public NatInfo.Builder setNewDestinationPort(int value)
       Destination port after NAT translation. Only valid when protocol is TCP or
       UDP.
       
      int32 new_destination_port = 11;
      Parameters:
      value - The newDestinationPort to set.
      Returns:
      This builder for chaining.
    • clearNewDestinationPort

      public NatInfo.Builder clearNewDestinationPort()
       Destination port after NAT translation. Only valid when protocol is TCP or
       UDP.
       
      int32 new_destination_port = 11;
      Returns:
      This builder for chaining.
    • getRouterUri

      public String getRouterUri()
       Uri of the Cloud Router. Only valid when type is CLOUD_NAT.
       
      string router_uri = 12;
      Specified by:
      getRouterUri in interface NatInfoOrBuilder
      Returns:
      The routerUri.
    • getRouterUriBytes

      public com.google.protobuf.ByteString getRouterUriBytes()
       Uri of the Cloud Router. Only valid when type is CLOUD_NAT.
       
      string router_uri = 12;
      Specified by:
      getRouterUriBytes in interface NatInfoOrBuilder
      Returns:
      The bytes for routerUri.
    • setRouterUri

      public NatInfo.Builder setRouterUri(String value)
       Uri of the Cloud Router. Only valid when type is CLOUD_NAT.
       
      string router_uri = 12;
      Parameters:
      value - The routerUri to set.
      Returns:
      This builder for chaining.
    • clearRouterUri

      public NatInfo.Builder clearRouterUri()
       Uri of the Cloud Router. Only valid when type is CLOUD_NAT.
       
      string router_uri = 12;
      Returns:
      This builder for chaining.
    • setRouterUriBytes

      public NatInfo.Builder setRouterUriBytes(com.google.protobuf.ByteString value)
       Uri of the Cloud Router. Only valid when type is CLOUD_NAT.
       
      string router_uri = 12;
      Parameters:
      value - The bytes for routerUri to set.
      Returns:
      This builder for chaining.
    • getNatGatewayName

      public String getNatGatewayName()
       The name of Cloud NAT Gateway. Only valid when type is CLOUD_NAT.
       
      string nat_gateway_name = 13;
      Specified by:
      getNatGatewayName in interface NatInfoOrBuilder
      Returns:
      The natGatewayName.
    • getNatGatewayNameBytes

      public com.google.protobuf.ByteString getNatGatewayNameBytes()
       The name of Cloud NAT Gateway. Only valid when type is CLOUD_NAT.
       
      string nat_gateway_name = 13;
      Specified by:
      getNatGatewayNameBytes in interface NatInfoOrBuilder
      Returns:
      The bytes for natGatewayName.
    • setNatGatewayName

      public NatInfo.Builder setNatGatewayName(String value)
       The name of Cloud NAT Gateway. Only valid when type is CLOUD_NAT.
       
      string nat_gateway_name = 13;
      Parameters:
      value - The natGatewayName to set.
      Returns:
      This builder for chaining.
    • clearNatGatewayName

      public NatInfo.Builder clearNatGatewayName()
       The name of Cloud NAT Gateway. Only valid when type is CLOUD_NAT.
       
      string nat_gateway_name = 13;
      Returns:
      This builder for chaining.
    • setNatGatewayNameBytes

      public NatInfo.Builder setNatGatewayNameBytes(com.google.protobuf.ByteString value)
       The name of Cloud NAT Gateway. Only valid when type is CLOUD_NAT.
       
      string nat_gateway_name = 13;
      Parameters:
      value - The bytes for natGatewayName to set.
      Returns:
      This builder for chaining.
    • getCloudNatGatewayTypeValue

      public int getCloudNatGatewayTypeValue()
       Type of Cloud NAT gateway. Only valid when `type` is CLOUD_NAT.
       
      .google.cloud.networkmanagement.v1beta1.NatInfo.CloudNatGatewayType cloud_nat_gateway_type = 14;
      Specified by:
      getCloudNatGatewayTypeValue in interface NatInfoOrBuilder
      Returns:
      The enum numeric value on the wire for cloudNatGatewayType.
    • setCloudNatGatewayTypeValue

      public NatInfo.Builder setCloudNatGatewayTypeValue(int value)
       Type of Cloud NAT gateway. Only valid when `type` is CLOUD_NAT.
       
      .google.cloud.networkmanagement.v1beta1.NatInfo.CloudNatGatewayType cloud_nat_gateway_type = 14;
      Parameters:
      value - The enum numeric value on the wire for cloudNatGatewayType to set.
      Returns:
      This builder for chaining.
    • getCloudNatGatewayType

      public NatInfo.CloudNatGatewayType getCloudNatGatewayType()
       Type of Cloud NAT gateway. Only valid when `type` is CLOUD_NAT.
       
      .google.cloud.networkmanagement.v1beta1.NatInfo.CloudNatGatewayType cloud_nat_gateway_type = 14;
      Specified by:
      getCloudNatGatewayType in interface NatInfoOrBuilder
      Returns:
      The cloudNatGatewayType.
    • setCloudNatGatewayType

      public NatInfo.Builder setCloudNatGatewayType(NatInfo.CloudNatGatewayType value)
       Type of Cloud NAT gateway. Only valid when `type` is CLOUD_NAT.
       
      .google.cloud.networkmanagement.v1beta1.NatInfo.CloudNatGatewayType cloud_nat_gateway_type = 14;
      Parameters:
      value - The cloudNatGatewayType to set.
      Returns:
      This builder for chaining.
    • clearCloudNatGatewayType

      public NatInfo.Builder clearCloudNatGatewayType()
       Type of Cloud NAT gateway. Only valid when `type` is CLOUD_NAT.
       
      .google.cloud.networkmanagement.v1beta1.NatInfo.CloudNatGatewayType cloud_nat_gateway_type = 14;
      Returns:
      This builder for chaining.