Skip to content

Commit

Permalink
feat: add new NAT fields to Network Management API definition
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 613999902
  • Loading branch information
Google APIs authored and Copybara-Service committed Mar 8, 2024
1 parent 4664532 commit 87e7c58
Show file tree
Hide file tree
Showing 2 changed files with 122 additions and 0 deletions.
61 changes: 61 additions & 0 deletions google/cloud/networkmanagement/v1/trace.proto
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,9 @@ message Step {
// Display information of a Cloud Run revision.
CloudRunRevisionInfo cloud_run_revision = 23;

// Display information of a NAT.
NatInfo nat = 25;

// Display information of a ProxyConnection.
ProxyConnectionInfo proxy_connection = 26;

Expand Down Expand Up @@ -1218,6 +1221,64 @@ message VpcConnectorInfo {
string location = 3;
}

// For display only. Metadata associated with NAT.
message NatInfo {
// Types of NAT.
enum Type {
// Type is unspecified.
TYPE_UNSPECIFIED = 0;
// From Compute Engine instance's internal address to external address.
INTERNAL_TO_EXTERNAL = 1;
// From Compute Engine instance's external address to internal address.
EXTERNAL_TO_INTERNAL = 2;
// Cloud NAT Gateway.
CLOUD_NAT = 3;
// Private service connect NAT.
PRIVATE_SERVICE_CONNECT = 4;
}

// Type of NAT.
Type type = 1;

// IP protocol in string format, for example: "TCP", "UDP", "ICMP".
string protocol = 2;

// URI of the network where NAT translation takes place.
string network_uri = 3;

// Source IP address before NAT translation.
string old_source_ip = 4;

// Source IP address after NAT translation.
string new_source_ip = 5;

// Destination IP address before NAT translation.
string old_destination_ip = 6;

// Destination IP address after NAT translation.
string new_destination_ip = 7;

// Source port before NAT translation. Only valid when protocol is TCP or UDP.
int32 old_source_port = 8;

// Source port after NAT translation. Only valid when protocol is TCP or UDP.
int32 new_source_port = 9;

// Destination port before NAT translation. Only valid when protocol is TCP or
// UDP.
int32 old_destination_port = 10;

// Destination port after NAT translation. Only valid when protocol is TCP or
// UDP.
int32 new_destination_port = 11;

// Uri of the Cloud Router. Only valid when type is CLOUD_NAT.
string router_uri = 12;

// The name of Cloud NAT Gateway. Only valid when type is CLOUD_NAT.
string nat_gateway_name = 13;
}

// For display only. Metadata associated with ProxyConnection.
message ProxyConnectionInfo {
// IP protocol in string format, for example: "TCP", "UDP", "ICMP".
Expand Down
61 changes: 61 additions & 0 deletions google/cloud/networkmanagement/v1beta1/trace.proto
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,9 @@ message Step {
// Display information of a Cloud Run revision.
CloudRunRevisionInfo cloud_run_revision = 23;

// Display information of a NAT.
NatInfo nat = 25;

// Display information of a ProxyConnection.
ProxyConnectionInfo proxy_connection = 26;

Expand Down Expand Up @@ -1218,6 +1221,64 @@ message VpcConnectorInfo {
string location = 3;
}

// For display only. Metadata associated with NAT.
message NatInfo {
// Types of NAT.
enum Type {
// Type is unspecified.
TYPE_UNSPECIFIED = 0;
// From Compute Engine instance's internal address to external address.
INTERNAL_TO_EXTERNAL = 1;
// From Compute Engine instance's external address to internal address.
EXTERNAL_TO_INTERNAL = 2;
// Cloud NAT Gateway.
CLOUD_NAT = 3;
// Private service connect NAT.
PRIVATE_SERVICE_CONNECT = 4;
}

// Type of NAT.
Type type = 1;

// IP protocol in string format, for example: "TCP", "UDP", "ICMP".
string protocol = 2;

// URI of the network where NAT translation takes place.
string network_uri = 3;

// Source IP address before NAT translation.
string old_source_ip = 4;

// Source IP address after NAT translation.
string new_source_ip = 5;

// Destination IP address before NAT translation.
string old_destination_ip = 6;

// Destination IP address after NAT translation.
string new_destination_ip = 7;

// Source port before NAT translation. Only valid when protocol is TCP or UDP.
int32 old_source_port = 8;

// Source port after NAT translation. Only valid when protocol is TCP or UDP.
int32 new_source_port = 9;

// Destination port before NAT translation. Only valid when protocol is TCP or
// UDP.
int32 old_destination_port = 10;

// Destination port after NAT translation. Only valid when protocol is TCP or
// UDP.
int32 new_destination_port = 11;

// Uri of the Cloud Router. Only valid when type is CLOUD_NAT.
string router_uri = 12;

// The name of Cloud NAT Gateway. Only valid when type is CLOUD_NAT.
string nat_gateway_name = 13;
}

// For display only. Metadata associated with ProxyConnection.
message ProxyConnectionInfo {
// IP protocol in string format, for example: "TCP", "UDP", "ICMP".
Expand Down

0 comments on commit 87e7c58

Please sign in to comment.