github.com/chnsz/golangsdk@v0.0.0-20240506093406-85a3fbfa605b/openstack/nat/v3/dnats/results.go (about)

     1  package dnats
     2  
     3  // Rule is a struct that represents the private DNAT rule detail.
     4  type Rule struct {
     5  	// The ID of the DNAT rule.
     6  	ID string `json:"id"`
     7  	// The project ID.
     8  	ProjectId string `json:"project_id"`
     9  	// The description of the DNAT rule, which contain maximum of `255` characters, and angle brackets (< and >) are
    10  	// not allowed.
    11  	Description string `json:"description"`
    12  	// The ID of the transit IP.
    13  	TransitIpId string `json:"transit_ip_id"`
    14  	// The ID of the gateway to which the private DNAT rule belongs.
    15  	GatewayId string `json:"gateway_id"`
    16  	// The network interface ID of the transit IP for private NAT.
    17  	NetworkInterfaceId string `json:"network_interface_id"`
    18  	// The backend type of the DNAT rule.
    19  	// The values of the backend type are as follow:
    20  	// + COMPUTE
    21  	// + VIP
    22  	// + ELB
    23  	// + ELBv3
    24  	// + CUSTOMIZE
    25  	Type string `json:"type"`
    26  	// The protocol type. The valid values (and the related protocol numbers) are 'UDP/udp (6)', 'TCP/tcp' (17) and
    27  	// 'ANY/any (0)'.
    28  	Protocol string `json:"protocol"`
    29  	// The private IP address of the backend instance.
    30  	PrivateIpAddress string `json:"private_ip_address"`
    31  	// The port of the backend instance.
    32  	InternalServicePort string `json:"internal_service_port"`
    33  	// The port of the transit IP.
    34  	TransitServicePort string `json:"transit_service_port"`
    35  	// The ID of the enterprise project to which the private DNAT rule belongs.
    36  	EnterpriseProjectId string `json:"enterprise_project_id"`
    37  	// The creation time of the private DNAT rule.
    38  	CreatedAt string `json:"created_at"`
    39  	// The latest update time of the private DNAT rule.
    40  	UpdatedAt string `json:"updated_at"`
    41  }
    42  
    43  type createResp struct {
    44  	// The DNAT rule detail.
    45  	Rule Rule `json:"dnat_rule"`
    46  	// The request ID.
    47  	RequestId string `json:"request_id"`
    48  }
    49  
    50  type queryResp struct {
    51  	// The DNAT rule detail.
    52  	Rule Rule `json:"dnat_rule"`
    53  	// The request ID.
    54  	RequestId string `json:"request_id"`
    55  }
    56  
    57  type updateResp struct {
    58  	// The DNAT rule detail.
    59  	Rule Rule `json:"dnat_rule"`
    60  	// The request ID.
    61  	RequestId string `json:"request_id"`
    62  }