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

     1  package snats
     2  
     3  // Rule is a struct that represents the SNAT rule detail.
     4  type Rule struct {
     5  	// The ID of SNAT rule.
     6  	ID string `json:"id"`
     7  	// The ID of the gateway to which the SNAT rule belongs.
     8  	GatewayId string `json:"nat_gateway_id"`
     9  	// The network IDs of subnet connected by SNAT rule (VPC side).
    10  	NetworkId string `json:"network_id"`
    11  	// The project ID.
    12  	TenantId string `json:"tenant_id"`
    13  	// The IDs (separated by commas) of the floating IP that the SNAT rule have.
    14  	FloatingIpId string `json:"floating_ip_id"`
    15  	// The floating IP addresses (separated by commas) connected by SNAT rule.
    16  	FloatingIpAddress string `json:"floating_ip_address"`
    17  	// The IDs (separated by commas) of the global EIPs connected by SNAT rule.
    18  	GlobalEipId string `json:"global_eip_id"`
    19  	// The global EIP addresses (separated by commas) connected by SNAT rule.
    20  	GlobalEipAddress string `json:"global_eip_address"`
    21  	// The description of the SNAT rule.
    22  	Description string `json:"description"`
    23  	// The status of the SNAT rule.
    24  	Status string `json:"status"`
    25  	// The frozen status.
    26  	AdminStateUp bool `json:"admin_state_up"`
    27  	// The CIDR block connected by SNAT rule (DC side).
    28  	Cidr string `json:"cidr"`
    29  	// The resource type of the SNAT rule.
    30  	// The valid values are as follows:
    31  	// + 0: VPC side.
    32  	// + 1: DC side.
    33  	SourceType int `json:"source_type"`
    34  }
    35  
    36  type createResp struct {
    37  	// The SNAT rule detail.
    38  	Rule Rule `json:"snat_rule"`
    39  }
    40  
    41  type queryResp struct {
    42  	// The SNAT rule detail.
    43  	Rule Rule `json:"snat_rule"`
    44  }
    45  
    46  type updateResp struct {
    47  	// The SNAT rule detail.
    48  	Rule Rule `json:"snat_rule"`
    49  }