@@ -43,6 +43,7 @@ type ListOpts struct {
4343 NotTags string `q:"not-tags"`
4444 NotTagsAny string `q:"not-tags-any"`
4545 RevisionNumber * int `q:"revision_number"`
46+ SegmentID string `q:"segment_id"`
4647}
4748
4849// ToSubnetListQuery formats a ListOpts into a query string.
@@ -147,6 +148,10 @@ type CreateOpts struct {
147148 // Prefixlen is used when user creates a subnet from the subnetpool. It will
148149 // overwrite the "default_prefixlen" value of the referenced subnetpool.
149150 Prefixlen int `json:"prefixlen,omitempty"`
151+
152+ // SegmentID is a network segment the subnet is associated with. It is
153+ // available when segment extension is enabled.
154+ SegmentID string `json:"segment_id,omitempty"`
150155}
151156
152157// ToSubnetCreateMap builds a request body from CreateOpts.
@@ -219,6 +224,10 @@ type UpdateOpts struct {
219224 // will set revision_number=%s. If the revision number does not match, the
220225 // update will fail.
221226 RevisionNumber * int `json:"-" h:"If-Match"`
227+
228+ // SegmentID is a network segment the subnet is associated with. It is
229+ // available when segment extension is enabled.
230+ SegmentID * string `json:"segment_id,omitempty"`
222231}
223232
224233// ToSubnetUpdateMap builds a request body from UpdateOpts.
0 commit comments