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

     1  package gateways
     2  
     3  import (
     4  	"github.com/chnsz/golangsdk/openstack/common/tags"
     5  )
     6  
     7  // createResp is the structure that represents the API response of the 'Create' method, which contains virtual gateway
     8  // details.
     9  type createResp struct {
    10  	// The response detail of the virtual gateway.
    11  	VirtualGateway VirtualGateway `json:"virtual_gateway"`
    12  }
    13  
    14  // VirtualGateway is the structure that represents the details of the virtual gateway.
    15  type VirtualGateway struct {
    16  	// The ID of the virtual gateway.
    17  	ID string `json:"id"`
    18  	// The ID of the VPC connected to the virtual gateway.
    19  	VpcId string `json:"vpc_id"`
    20  	// The project ID to which the virtual gateway belongs.
    21  	TenantId string `json:"tenant_id"`
    22  	// Specifies the name of the virtual gateway.
    23  	// The valid length is limited from 0 to 64, only chinese and english letters, digits, hyphens (-), underscores (_)
    24  	// and dots (.) are allowed.
    25  	// The name must start with a chinese or english letter, and the Chinese characters must be in **UTF-8** or
    26  	// **Unicode** format.
    27  	Name string `json:"name"`
    28  	// Specifies the description of the virtual gateway.
    29  	// The description contain a maximum of 64 characters and the angle brackets (< and >) are not allowed.
    30  	// Chinese characters must be in **UTF-8** or **Unicode** format.
    31  	Description string `json:"description"`
    32  	// The type of virtual gateway.
    33  	Type string `json:"type"`
    34  	// The list of IPv4 subnets from the virtual gateway to access cloud services, which is usually the CIDR block of
    35  	// the VPC.
    36  	LocalEpGroup []string `json:"local_ep_group"`
    37  	// The list of IPv6 subnets from the virtual gateway to access cloud services, which is usually the CIDR block of
    38  	// the VPC.
    39  	LocalEpGroupIpv6 []string `json:"local_ep_group_ipv6"`
    40  	// The current status of the virtual gateway.
    41  	Status string `json:"status"`
    42  	// The local BGP ASN of the virtual gateway.
    43  	BgpAsn int `json:"bgp_asn"`
    44  	// The enterprise project ID to which the virtual gateway belongs.
    45  	EnterpriseProjectId string `json:"enterprise_project_id"`
    46  	// The key/value pairs to associate with the virtual gateway.
    47  	Tags []tags.ResourceTag `json:"tags"`
    48  }
    49  
    50  // getResp is the structure that represents the API response of the 'Get' method, which contains virtual gateway
    51  // details.
    52  type getResp struct {
    53  	// The response detail of the virtual gateway.
    54  	VirtualGateway VirtualGateway `json:"virtual_gateway"`
    55  }