Class: Google::Apis::NetworkmanagementV1::NatInfo

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/networkmanagement_v1/classes.rb,
lib/google/apis/networkmanagement_v1/representations.rb,
lib/google/apis/networkmanagement_v1/representations.rb

Overview

For display only. Metadata associated with NAT.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ NatInfo

Returns a new instance of NatInfo.



1591
1592
1593
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 1591

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#nat_gateway_name ⇒ String

The name of Cloud NAT Gateway. Only valid when type is CLOUD_NAT. Corresponds to the JSON property natGatewayName

Returns:

  • (String)


1528
1529
1530
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 1528

def nat_gateway_name
  @nat_gateway_name
end

#network_uri ⇒ String

URI of the network where NAT translation takes place. Corresponds to the JSON property networkUri

Returns:

  • (String)


1533
1534
1535
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 1533

def network_uri
  @network_uri
end

#new_destination_ip ⇒ String

Destination IP address after NAT translation. Corresponds to the JSON property newDestinationIp

Returns:

  • (String)


1538
1539
1540
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 1538

def new_destination_ip
  @new_destination_ip
end

#new_destination_port ⇒ Fixnum

Destination port after NAT translation. Only valid when protocol is TCP or UDP. Corresponds to the JSON property newDestinationPort

Returns:

  • (Fixnum)


1543
1544
1545
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 1543

def new_destination_port
  @new_destination_port
end

#new_source_ip ⇒ String

Source IP address after NAT translation. Corresponds to the JSON property newSourceIp

Returns:

  • (String)


1548
1549
1550
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 1548

def new_source_ip
  @new_source_ip
end

#new_source_port ⇒ Fixnum

Source port after NAT translation. Only valid when protocol is TCP or UDP. Corresponds to the JSON property newSourcePort

Returns:

  • (Fixnum)


1553
1554
1555
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 1553

def new_source_port
  @new_source_port
end

#old_destination_ip ⇒ String

Destination IP address before NAT translation. Corresponds to the JSON property oldDestinationIp

Returns:

  • (String)


1558
1559
1560
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 1558

def old_destination_ip
  @old_destination_ip
end

#old_destination_port ⇒ Fixnum

Destination port before NAT translation. Only valid when protocol is TCP or UDP. Corresponds to the JSON property oldDestinationPort

Returns:

  • (Fixnum)


1564
1565
1566
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 1564

def old_destination_port
  @old_destination_port
end

#old_source_ip ⇒ String

Source IP address before NAT translation. Corresponds to the JSON property oldSourceIp

Returns:

  • (String)


1569
1570
1571
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 1569

def old_source_ip
  @old_source_ip
end

#old_source_port ⇒ Fixnum

Source port before NAT translation. Only valid when protocol is TCP or UDP. Corresponds to the JSON property oldSourcePort

Returns:

  • (Fixnum)


1574
1575
1576
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 1574

def old_source_port
  @old_source_port
end

#protocol ⇒ String

IP protocol in string format, for example: "TCP", "UDP", "ICMP". Corresponds to the JSON property protocol

Returns:

  • (String)


1579
1580
1581
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 1579

def protocol
  @protocol
end

#router_uri ⇒ String

Uri of the Cloud Router. Only valid when type is CLOUD_NAT. Corresponds to the JSON property routerUri

Returns:

  • (String)


1584
1585
1586
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 1584

def router_uri
  @router_uri
end

#type ⇒ String

Type of NAT. Corresponds to the JSON property type

Returns:

  • (String)


1589
1590
1591
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 1589

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 1596

def update!(**args)
  @nat_gateway_name = args[:nat_gateway_name] if args.key?(:nat_gateway_name)
  @network_uri = args[:network_uri] if args.key?(:network_uri)
  @new_destination_ip = args[:new_destination_ip] if args.key?(:new_destination_ip)
  @new_destination_port = args[:new_destination_port] if args.key?(:new_destination_port)
  @new_source_ip = args[:new_source_ip] if args.key?(:new_source_ip)
  @new_source_port = args[:new_source_port] if args.key?(:new_source_port)
  @old_destination_ip = args[:old_destination_ip] if args.key?(:old_destination_ip)
  @old_destination_port = args[:old_destination_port] if args.key?(:old_destination_port)
  @old_source_ip = args[:old_source_ip] if args.key?(:old_source_ip)
  @old_source_port = args[:old_source_port] if args.key?(:old_source_port)
  @protocol = args[:protocol] if args.key?(:protocol)
  @router_uri = args[:router_uri] if args.key?(:router_uri)
  @type = args[:type] if args.key?(:type)
end