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

     1  package snats
     2  
     3  // Rule is a struct that represents the private SNAT rule detail.
     4  type Rule struct {
     5  	// The ID of the SNAT rule.
     6  	ID string `json:"id"`
     7  	// The project ID.
     8  	ProjectId string `json:"project_id"`
     9  	// The ID of the gateway to which the private SNAT rule belongs.
    10  	GatewayId string `json:"gateway_id"`
    11  	// The CIDR block of the match rule.
    12  	// Exactly one of cidr and virsubnet_id must be set.
    13  	Cidr string `json:"cidr"`
    14  	// The subnet ID of the match rule.
    15  	// Exactly one of cidr and virsubnet_id must be set.
    16  	SubnetId string `json:"virsubnet_id"`
    17  	// The description of the SNAT rule, which contain maximum of `255` characters, and angle brackets (< and >) are
    18  	// not allowed.
    19  	Description string `json:"description"`
    20  	// The ID of the transit IP.
    21  	TransitIpAssociations []AssociatedTransitIp `json:"transit_ip_associations"`
    22  	// The ID of the enterprise project to which the private SNAT rule belongs.
    23  	EnterpriseProjectId string `json:"enterprise_project_id"`
    24  	// The creation time of the private SNAT rule.
    25  	CreatedAt string `json:"created_at"`
    26  	// The latest update time of the private SNAT rule.
    27  	UpdatedAt string `json:"updated_at"`
    28  }
    29  
    30  type AssociatedTransitIp struct {
    31  	// The ID of the transit IP.
    32  	ID string `json:"transit_ip_id"`
    33  	// The address of the transit IP.
    34  	Address string `json:"transit_ip_address"`
    35  }
    36  
    37  type createResp struct {
    38  	// The SNAT rule detail.
    39  	Rule Rule `json:"snat_rule"`
    40  	// The request ID.
    41  	RequestId string `json:"request_id"`
    42  }
    43  
    44  type queryResp struct {
    45  	// The SNAT rule detail.
    46  	Rule Rule `json:"snat_rule"`
    47  	// The request ID.
    48  	RequestId string `json:"request_id"`
    49  }
    50  
    51  type updateResp struct {
    52  	// The SNAT rule detail.
    53  	Rule Rule `json:"snat_rule"`
    54  	// The request ID.
    55  	RequestId string `json:"request_id"`
    56  }