Vendor newest GCP Go client

This commit is contained in:
Cheng Xing
2018-03-07 14:03:10 -08:00
parent 10cc971388
commit df3d8bcba6
11 changed files with 4902 additions and 331 deletions

View File

@@ -1341,7 +1341,7 @@ type Address struct {
// Name: Name of the resource. Provided by the client when the resource
// is created. The name must be 1-63 characters long, and comply with
// RFC1035. Specifically, the name must be 1-63 characters long and
// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
// match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means
// the first character must be a lowercase letter, and all following
// characters must be a dash, lowercase letter, or digit, except the
// last character, which cannot be a dash.
@@ -1932,6 +1932,11 @@ type AttachedDisk struct {
// group.
DiskEncryptionKey *CustomerEncryptionKey `json:"diskEncryptionKey,omitempty"`
// GuestOsFeatures: A list of features to enable on the guest operating
// system. Applicable only for bootable images. Read Enabling guest
// operating system features to see a list of available options.
GuestOsFeatures []*GuestOsFeature `json:"guestOsFeatures,omitempty"`
// Index: [Output Only] A zero-based index to this disk, where 0 is
// reserved for the boot disk. If you have many disks attached to an
// instance, each disk would have a unique index number.
@@ -2158,7 +2163,7 @@ type Autoscaler struct {
// Name: Name of the resource. Provided by the client when the resource
// is created. The name must be 1-63 characters long, and comply with
// RFC1035. Specifically, the name must be 1-63 characters long and
// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
// match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means
// the first character must be a lowercase letter, and all following
// characters must be a dash, lowercase letter, or digit, except the
// last character, which cannot be a dash.
@@ -3098,7 +3103,7 @@ type BackendBucket struct {
// Name: Name of the resource. Provided by the client when the resource
// is created. The name must be 1-63 characters long, and comply with
// RFC1035. Specifically, the name must be 1-63 characters long and
// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
// match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means
// the first character must be a lowercase letter, and all following
// characters must be a dash, lowercase letter, or digit, except the
// last character, which cannot be a dash.
@@ -3364,7 +3369,7 @@ type BackendService struct {
// Name: Name of the resource. Provided by the client when the resource
// is created. The name must be 1-63 characters long, and comply with
// RFC1035. Specifically, the name must be 1-63 characters long and
// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
// match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means
// the first character must be a lowercase letter, and all following
// characters must be a dash, lowercase letter, or digit, except the
// last character, which cannot be a dash.
@@ -4124,7 +4129,7 @@ type Commitment struct {
// Name: Name of the resource. Provided by the client when the resource
// is created. The name must be 1-63 characters long, and comply with
// RFC1035. Specifically, the name must be 1-63 characters long and
// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
// match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means
// the first character must be a lowercase letter, and all following
// characters must be a dash, lowercase letter, or digit, except the
// last character, which cannot be a dash.
@@ -4828,6 +4833,11 @@ type Disk struct {
// you do not need to provide a key to use the disk later.
DiskEncryptionKey *CustomerEncryptionKey `json:"diskEncryptionKey,omitempty"`
// GuestOsFeatures: A list of features to enable on the guest operating
// system. Applicable only for bootable images. Read Enabling guest
// operating system features to see a list of available options.
GuestOsFeatures []*GuestOsFeature `json:"guestOsFeatures,omitempty"`
// Id: [Output Only] The unique identifier for the resource. This
// identifier is defined by the server.
Id uint64 `json:"id,omitempty,string"`
@@ -4865,7 +4875,7 @@ type Disk struct {
// Name: Name of the resource. Provided by the client when the resource
// is created. The name must be 1-63 characters long, and comply with
// RFC1035. Specifically, the name must be 1-63 characters long and
// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
// match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means
// the first character must be a lowercase letter, and all following
// characters must be a dash, lowercase letter, or digit, except the
// last character, which cannot be a dash.
@@ -6078,7 +6088,7 @@ type Firewall struct {
// Name: Name of the resource; provided by the client when the resource
// is created. The name must be 1-63 characters long, and comply with
// RFC1035. Specifically, the name must be 1-63 characters long and
// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
// match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means
// the first character must be a lowercase letter, and all following
// characters must be a dash, lowercase letter, or digit, except the
// last character, which cannot be a dash.
@@ -6525,7 +6535,7 @@ type ForwardingRule struct {
// Name: Name of the resource; provided by the client when the resource
// is created. The name must be 1-63 characters long, and comply with
// RFC1035. Specifically, the name must be 1-63 characters long and
// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
// match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means
// the first character must be a lowercase letter, and all following
// characters must be a dash, lowercase letter, or digit, except the
// last character, which cannot be a dash.
@@ -7079,8 +7089,8 @@ type GlobalSetLabelsRequest struct {
// Labels: A list of labels to apply for this resource. Each label key &
// value must comply with RFC1035. Specifically, the name must be 1-63
// characters long and match the regular expression
// [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a
// lowercase letter, and all following characters must be a dash,
// `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be
// a lowercase letter, and all following characters must be a dash,
// lowercase letter, or digit, except the last character, which cannot
// be a dash. For example, "webserver-frontend": "images". A label value
// can also be empty (e.g. "my-label": "").
@@ -7118,6 +7128,8 @@ type GuestOsFeature struct {
// Possible values:
// "FEATURE_TYPE_UNSPECIFIED"
// "MULTI_IP_SUBNET"
// "SECURE_BOOT"
// "UEFI_COMPATIBLE"
// "VIRTIO_SCSI_MULTIQUEUE"
// "WINDOWS"
Type string `json:"type,omitempty"`
@@ -7279,7 +7291,7 @@ type HealthCheck struct {
// Name: Name of the resource. Provided by the client when the resource
// is created. The name must be 1-63 characters long, and comply with
// RFC1035. Specifically, the name must be 1-63 characters long and
// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
// match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means
// the first character must be a lowercase letter, and all following
// characters must be a dash, lowercase letter, or digit, except the
// last character, which cannot be a dash.
@@ -7645,7 +7657,7 @@ type HttpHealthCheck struct {
// Name: Name of the resource. Provided by the client when the resource
// is created. The name must be 1-63 characters long, and comply with
// RFC1035. Specifically, the name must be 1-63 characters long and
// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
// match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means
// the first character must be a lowercase letter, and all following
// characters must be a dash, lowercase letter, or digit, except the
// last character, which cannot be a dash.
@@ -7890,7 +7902,7 @@ type HttpsHealthCheck struct {
// Name: Name of the resource. Provided by the client when the resource
// is created. The name must be 1-63 characters long, and comply with
// RFC1035. Specifically, the name must be 1-63 characters long and
// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
// match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means
// the first character must be a lowercase letter, and all following
// characters must be a dash, lowercase letter, or digit, except the
// last character, which cannot be a dash.
@@ -8178,7 +8190,7 @@ type Image struct {
// Name: Name of the resource; provided by the client when the resource
// is created. The name must be 1-63 characters long, and comply with
// RFC1035. Specifically, the name must be 1-63 characters long and
// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
// match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means
// the first character must be a lowercase letter, and all following
// characters must be a dash, lowercase letter, or digit, except the
// last character, which cannot be a dash.
@@ -8228,6 +8240,26 @@ type Image struct {
// taken from the current or a previous instance of a given image name.
SourceImageId string `json:"sourceImageId,omitempty"`
// SourceSnapshot: URL of the source snapshot used to create this image.
// This can be a full or valid partial URL. You must provide exactly one
// of:
// - this property, or
// - the sourceImage property, or
// - the rawDisk.source property, or
// - the sourceDisk property in order to create an image.
SourceSnapshot string `json:"sourceSnapshot,omitempty"`
// SourceSnapshotEncryptionKey: The customer-supplied encryption key of
// the source snapshot. Required if the source snapshot is protected by
// a customer-supplied encryption key.
SourceSnapshotEncryptionKey *CustomerEncryptionKey `json:"sourceSnapshotEncryptionKey,omitempty"`
// SourceSnapshotId: [Output Only] The ID value of the snapshot used to
// create this image. This value may be used to determine whether the
// snapshot was taken from the current or a previous instance of a given
// snapshot name.
SourceSnapshotId string `json:"sourceSnapshotId,omitempty"`
// SourceType: The type of the image used to create this disk. The
// default and only value is RAW
//
@@ -8563,8 +8595,8 @@ type Instance struct {
// creating the resource. The resource name must be 1-63 characters
// long, and comply with RFC1035. Specifically, the name must be 1-63
// characters long and match the regular expression
// [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a
// lowercase letter, and all following characters must be a dash,
// `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be
// a lowercase letter, and all following characters must be a dash,
// lowercase letter, or digit, except the last character, which cannot
// be a dash.
Name string `json:"name,omitempty"`
@@ -10936,7 +10968,7 @@ type InstanceTemplate struct {
// Name: Name of the resource; provided by the client when the resource
// is created. The name must be 1-63 characters long, and comply with
// RFC1035. Specifically, the name must be 1-63 characters long and
// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
// match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means
// the first character must be a lowercase letter, and all following
// characters must be a dash, lowercase letter, or digit, except the
// last character, which cannot be a dash.
@@ -11571,7 +11603,7 @@ type Interconnect struct {
// Name: Name of the resource. Provided by the client when the resource
// is created. The name must be 1-63 characters long, and comply with
// RFC1035. Specifically, the name must be 1-63 characters long and
// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
// match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means
// the first character must be a lowercase letter, and all following
// characters must be a dash, lowercase letter, or digit, except the
// last character, which cannot be a dash.
@@ -11678,7 +11710,7 @@ type InterconnectAttachment struct {
// Name: Name of the resource. Provided by the client when the resource
// is created. The name must be 1-63 characters long, and comply with
// RFC1035. Specifically, the name must be 1-63 characters long and
// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
// match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means
// the first character must be a lowercase letter, and all following
// characters must be a dash, lowercase letter, or digit, except the
// last character, which cannot be a dash.
@@ -13396,6 +13428,7 @@ func (s *MachineTypesScopedListWarningData) MarshalJSON() ([]byte, error) {
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ManagedInstance: Next available tag: 12
type ManagedInstance struct {
// CurrentAction: [Output Only] The current action that the managed
// instance group has scheduled for the instance. Possible values:
@@ -13728,7 +13761,7 @@ type Network struct {
// Name: Name of the resource. Provided by the client when the resource
// is created. The name must be 1-63 characters long, and comply with
// RFC1035. Specifically, the name must be 1-63 characters long and
// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
// match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means
// the first character must be a lowercase letter, and all following
// characters must be a dash, lowercase letter, or digit, except the
// last character, which cannot be a dash.
@@ -13790,6 +13823,12 @@ type NetworkInterface struct {
// subnet-mode networks.
AliasIpRanges []*AliasIpRange `json:"aliasIpRanges,omitempty"`
// Fingerprint: Fingerprint hash of contents stored in this network
// interface. This field will be ignored when inserting an Instance or
// adding a NetworkInterface. An up-to-date fingerprint must be provided
// in order to update the NetworkInterface.
Fingerprint string `json:"fingerprint,omitempty"`
// Kind: [Output Only] Type of the resource. Always
// compute#networkInterface for network interfaces.
Kind string `json:"kind,omitempty"`
@@ -14026,8 +14065,8 @@ type NetworkPeering struct {
// Name: Name of this peering. Provided by the client when the peering
// is created. The name must comply with RFC1035. Specifically, the name
// must be 1-63 characters long and match regular expression
// [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a
// lowercase letter, and all the following characters must be a dash,
// `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be
// a lowercase letter, and all the following characters must be a dash,
// lowercase letter, or digit, except the last character, which cannot
// be a dash.
Name string `json:"name,omitempty"`
@@ -16568,7 +16607,7 @@ type Route struct {
// Name: Name of the resource. Provided by the client when the resource
// is created. The name must be 1-63 characters long, and comply with
// RFC1035. Specifically, the name must be 1-63 characters long and
// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
// match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means
// the first character must be a lowercase letter, and all following
// characters must be a dash, lowercase letter, or digit, except the
// last character, which cannot be a dash.
@@ -16941,7 +16980,7 @@ type Router struct {
// Name: Name of the resource. Provided by the client when the resource
// is created. The name must be 1-63 characters long, and comply with
// RFC1035. Specifically, the name must be 1-63 characters long and
// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
// match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means
// the first character must be a lowercase letter, and all following
// characters must be a dash, lowercase letter, or digit, except the
// last character, which cannot be a dash.
@@ -16985,6 +17024,39 @@ func (s *Router) MarshalJSON() ([]byte, error) {
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// RouterAdvertisedIpRange: Description-tagged IP ranges for the router
// to advertise.
type RouterAdvertisedIpRange struct {
// Description: User-specified description for the IP range.
Description string `json:"description,omitempty"`
// Range: The IP range to advertise. The value must be a CIDR-formatted
// string.
Range string `json:"range,omitempty"`
// ForceSendFields is a list of field names (e.g. "Description") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Description") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *RouterAdvertisedIpRange) MarshalJSON() ([]byte, error) {
type NoMethod RouterAdvertisedIpRange
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// RouterAggregatedList: Contains a list of routers.
type RouterAggregatedList struct {
// Id: [Output Only] Unique identifier for the resource; defined by the
@@ -17141,13 +17213,39 @@ func (s *RouterAggregatedListWarningData) MarshalJSON() ([]byte, error) {
}
type RouterBgp struct {
// AdvertiseMode: User-specified flag to indicate which mode to use for
// advertisement.
//
// Possible values:
// "CUSTOM"
// "DEFAULT"
AdvertiseMode string `json:"advertiseMode,omitempty"`
// AdvertisedGroups: User-specified list of prefix groups to advertise
// in custom mode. This field can only be populated if advertise_mode is
// CUSTOM and is advertised to all peers of the router. These groups
// will be advertised in addition to any specified prefixes. Leave this
// field blank to advertise no custom groups.
//
// Possible values:
// "ALL_SUBNETS"
AdvertisedGroups []string `json:"advertisedGroups,omitempty"`
// AdvertisedIpRanges: User-specified list of individual IP ranges to
// advertise in custom mode. This field can only be populated if
// advertise_mode is CUSTOM and is advertised to all peers of the
// router. These IP ranges will be advertised in addition to any
// specified groups. Leave this field blank to advertise no custom IP
// ranges.
AdvertisedIpRanges []*RouterAdvertisedIpRange `json:"advertisedIpRanges,omitempty"`
// Asn: Local BGP Autonomous System Number (ASN). Must be an RFC6996
// private ASN, either 16-bit or 32-bit. The value will be fixed for
// this router resource. All VPN tunnels that link to this router will
// have the same local ASN.
Asn int64 `json:"asn,omitempty"`
// ForceSendFields is a list of field names (e.g. "Asn") to
// ForceSendFields is a list of field names (e.g. "AdvertiseMode") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
@@ -17155,10 +17253,10 @@ type RouterBgp struct {
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Asn") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// NullFields is a list of field names (e.g. "AdvertiseMode") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
@@ -17171,6 +17269,33 @@ func (s *RouterBgp) MarshalJSON() ([]byte, error) {
}
type RouterBgpPeer struct {
// AdvertiseMode: User-specified flag to indicate which mode to use for
// advertisement.
//
// Possible values:
// "CUSTOM"
// "DEFAULT"
AdvertiseMode string `json:"advertiseMode,omitempty"`
// AdvertisedGroups: User-specified list of prefix groups to advertise
// in custom mode. This field can only be populated if advertise_mode is
// CUSTOM and overrides the list defined for the router (in Bgp
// message). These groups will be advertised in addition to any
// specified prefixes. Leave this field blank to advertise no custom
// groups.
//
// Possible values:
// "ALL_SUBNETS"
AdvertisedGroups []string `json:"advertisedGroups,omitempty"`
// AdvertisedIpRanges: User-specified list of individual IP ranges to
// advertise in custom mode. This field can only be populated if
// advertise_mode is CUSTOM and overrides the list defined for the
// router (in Bgp message). These IP ranges will be advertised in
// addition to any specified groups. Leave this field blank to advertise
// no custom IP ranges.
AdvertisedIpRanges []*RouterAdvertisedIpRange `json:"advertisedIpRanges,omitempty"`
// AdvertisedRoutePriority: The priority of routes advertised to this
// BGP peer. In the case where there is more than one matching route of
// maximum length, the routes with lowest priority value win.
@@ -17195,22 +17320,20 @@ type RouterBgpPeer struct {
// Only IPv4 is supported.
PeerIpAddress string `json:"peerIpAddress,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "AdvertisedRoutePriority") to unconditionally include in API
// requests. By default, fields with empty values are omitted from API
// requests. However, any non-pointer, non-interface field appearing in
// ForceSendFields will be sent to the server regardless of whether the
// field is empty or not. This may be used to include empty fields in
// Patch requests.
// ForceSendFields is a list of field names (e.g. "AdvertiseMode") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AdvertisedRoutePriority")
// to include in API requests with the JSON null value. By default,
// fields with empty values are omitted from API requests. However, any
// field with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
// NullFields is a list of field names (e.g. "AdvertiseMode") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
@@ -17947,7 +18070,7 @@ type Snapshot struct {
// Name: Name of the resource; provided by the client when the resource
// is created. The name must be 1-63 characters long, and comply with
// RFC1035. Specifically, the name must be 1-63 characters long and
// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
// match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means
// the first character must be a lowercase letter, and all following
// characters must be a dash, lowercase letter, or digit, except the
// last character, which cannot be a dash.
@@ -18225,7 +18348,7 @@ type SslCertificate struct {
// Name: Name of the resource. Provided by the client when the resource
// is created. The name must be 1-63 characters long, and comply with
// RFC1035. Specifically, the name must be 1-63 characters long and
// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
// match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means
// the first character must be a lowercase letter, and all following
// characters must be a dash, lowercase letter, or digit, except the
// last character, which cannot be a dash.
@@ -18432,6 +18555,12 @@ type Subnetwork struct {
// resource creation time.
Description string `json:"description,omitempty"`
// Fingerprint: Fingerprint of this resource. A hash of the contents
// stored in this object. This field is used in optimistic locking. This
// field will be ignored when inserting a Subnetwork. An up-to-date
// fingerprint must be provided in order to update the Subnetwork.
Fingerprint string `json:"fingerprint,omitempty"`
// GatewayAddress: [Output Only] The gateway address for default routes
// to reach destination addresses outside this subnetwork.
GatewayAddress string `json:"gatewayAddress,omitempty"`
@@ -18454,7 +18583,7 @@ type Subnetwork struct {
// Name: The name of the resource, provided by the client when initially
// creating the resource. The name must be 1-63 characters long, and
// comply with RFC1035. Specifically, the name must be 1-63 characters
// long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?
// long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?`
// which means the first character must be a lowercase letter, and all
// following characters must be a dash, lowercase letter, or digit,
// except the last character, which cannot be a dash.
@@ -19168,7 +19297,7 @@ type TargetHttpProxy struct {
// Name: Name of the resource. Provided by the client when the resource
// is created. The name must be 1-63 characters long, and comply with
// RFC1035. Specifically, the name must be 1-63 characters long and
// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
// match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means
// the first character must be a lowercase letter, and all following
// characters must be a dash, lowercase letter, or digit, except the
// last character, which cannot be a dash.
@@ -19418,7 +19547,7 @@ type TargetHttpsProxy struct {
// Name: Name of the resource. Provided by the client when the resource
// is created. The name must be 1-63 characters long, and comply with
// RFC1035. Specifically, the name must be 1-63 characters long and
// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
// match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means
// the first character must be a lowercase letter, and all following
// characters must be a dash, lowercase letter, or digit, except the
// last character, which cannot be a dash.
@@ -19659,7 +19788,7 @@ type TargetInstance struct {
// Name: Name of the resource. Provided by the client when the resource
// is created. The name must be 1-63 characters long, and comply with
// RFC1035. Specifically, the name must be 1-63 characters long and
// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
// match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means
// the first character must be a lowercase letter, and all following
// characters must be a dash, lowercase letter, or digit, except the
// last character, which cannot be a dash.
@@ -20222,7 +20351,7 @@ type TargetPool struct {
// Name: Name of the resource. Provided by the client when the resource
// is created. The name must be 1-63 characters long, and comply with
// RFC1035. Specifically, the name must be 1-63 characters long and
// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
// match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means
// the first character must be a lowercase letter, and all following
// characters must be a dash, lowercase letter, or digit, except the
// last character, which cannot be a dash.
@@ -21032,7 +21161,7 @@ type TargetSslProxy struct {
// Name: Name of the resource. Provided by the client when the resource
// is created. The name must be 1-63 characters long, and comply with
// RFC1035. Specifically, the name must be 1-63 characters long and
// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
// match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means
// the first character must be a lowercase letter, and all following
// characters must be a dash, lowercase letter, or digit, except the
// last character, which cannot be a dash.
@@ -21324,7 +21453,7 @@ type TargetTcpProxy struct {
// Name: Name of the resource. Provided by the client when the resource
// is created. The name must be 1-63 characters long, and comply with
// RFC1035. Specifically, the name must be 1-63 characters long and
// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
// match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means
// the first character must be a lowercase letter, and all following
// characters must be a dash, lowercase letter, or digit, except the
// last character, which cannot be a dash.
@@ -21556,7 +21685,7 @@ type TargetVpnGateway struct {
// Name: Name of the resource. Provided by the client when the resource
// is created. The name must be 1-63 characters long, and comply with
// RFC1035. Specifically, the name must be 1-63 characters long and
// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
// match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means
// the first character must be a lowercase letter, and all following
// characters must be a dash, lowercase letter, or digit, except the
// last character, which cannot be a dash.
@@ -22130,7 +22259,7 @@ type UrlMap struct {
// Name: Name of the resource. Provided by the client when the resource
// is created. The name must be 1-63 characters long, and comply with
// RFC1035. Specifically, the name must be 1-63 characters long and
// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
// match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means
// the first character must be a lowercase letter, and all following
// characters must be a dash, lowercase letter, or digit, except the
// last character, which cannot be a dash.
@@ -22569,7 +22698,7 @@ type VpnTunnel struct {
// Name: Name of the resource. Provided by the client when the resource
// is created. The name must be 1-63 characters long, and comply with
// RFC1035. Specifically, the name must be 1-63 characters long and
// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
// match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means
// the first character must be a lowercase letter, and all following
// characters must be a dash, lowercase letter, or digit, except the
// last character, which cannot be a dash.
@@ -50457,6 +50586,196 @@ func (c *InstancesUpdateAccessConfigCall) Do(opts ...googleapi.CallOption) (*Ope
}
// method id "compute.instances.updateNetworkInterface":
type InstancesUpdateNetworkInterfaceCall struct {
s *Service
project string
zone string
instance string
networkinterface *NetworkInterface
urlParams_ gensupport.URLParams
ctx_ context.Context
header_ http.Header
}
// UpdateNetworkInterface: Updates an instance's network interface. This
// method follows PATCH semantics.
func (r *InstancesService) UpdateNetworkInterface(project string, zone string, instance string, networkInterface string, networkinterface *NetworkInterface) *InstancesUpdateNetworkInterfaceCall {
c := &InstancesUpdateNetworkInterfaceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.project = project
c.zone = zone
c.instance = instance
c.urlParams_.Set("networkInterface", networkInterface)
c.networkinterface = networkinterface
return c
}
// RequestId sets the optional parameter "requestId": An optional
// request ID to identify requests. Specify a unique request ID so that
// if you must retry your request, the server will know to ignore the
// request if it has already been completed.
//
// For example, consider a situation where you make an initial request
// and the request times out. If you make the request again with the
// same request ID, the server can check if original operation with the
// same request ID was received, and if so, will ignore the second
// request. This prevents clients from accidentally creating duplicate
// commitments.
//
// The request ID must be a valid UUID with the exception that zero UUID
// is not supported (00000000-0000-0000-0000-000000000000).
func (c *InstancesUpdateNetworkInterfaceCall) RequestId(requestId string) *InstancesUpdateNetworkInterfaceCall {
c.urlParams_.Set("requestId", requestId)
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *InstancesUpdateNetworkInterfaceCall) Fields(s ...googleapi.Field) *InstancesUpdateNetworkInterfaceCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *InstancesUpdateNetworkInterfaceCall) Context(ctx context.Context) *InstancesUpdateNetworkInterfaceCall {
c.ctx_ = ctx
return c
}
// Header returns an http.Header that can be modified by the caller to
// add HTTP headers to the request.
func (c *InstancesUpdateNetworkInterfaceCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *InstancesUpdateNetworkInterfaceCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.networkinterface)
if err != nil {
return nil, err
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/updateNetworkInterface")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("PATCH", urls, body)
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
"zone": c.zone,
"instance": c.instance,
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.instances.updateNetworkInterface" call.
// Exactly one of *Operation or error will be non-nil. Any non-2xx
// status code is an error. Response headers are in either
// *Operation.ServerResponse.Header or (if a response was returned at
// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
// to check whether the returned error was because
// http.StatusNotModified was returned.
func (c *InstancesUpdateNetworkInterfaceCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {
if res.Body != nil {
res.Body.Close()
}
return nil, &googleapi.Error{
Code: res.StatusCode,
Header: res.Header,
}
}
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
ret := &Operation{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
target := &ret
if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Updates an instance's network interface. This method follows PATCH semantics.",
// "httpMethod": "PATCH",
// "id": "compute.instances.updateNetworkInterface",
// "parameterOrder": [
// "project",
// "zone",
// "instance",
// "networkInterface"
// ],
// "parameters": {
// "instance": {
// "description": "The instance name for this request.",
// "location": "path",
// "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
// "required": true,
// "type": "string"
// },
// "networkInterface": {
// "description": "The name of the network interface to update.",
// "location": "query",
// "required": true,
// "type": "string"
// },
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
// "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// },
// "requestId": {
// "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
// "location": "query",
// "type": "string"
// },
// "zone": {
// "description": "The name of the zone for this request.",
// "location": "path",
// "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
// "required": true,
// "type": "string"
// }
// },
// "path": "{project}/zones/{zone}/instances/{instance}/updateNetworkInterface",
// "request": {
// "$ref": "NetworkInterface"
// },
// "response": {
// "$ref": "Operation"
// },
// "scopes": [
// "https://www.googleapis.com/auth/cloud-platform",
// "https://www.googleapis.com/auth/compute"
// ]
// }
}
// method id "compute.interconnectAttachments.aggregatedList":
type InterconnectAttachmentsAggregatedListCall struct {
@@ -69247,6 +69566,191 @@ func (c *SubnetworksListCall) Pages(ctx context.Context, f func(*SubnetworkList)
}
}
// method id "compute.subnetworks.patch":
type SubnetworksPatchCall struct {
s *Service
project string
region string
subnetwork string
subnetwork2 *Subnetwork
urlParams_ gensupport.URLParams
ctx_ context.Context
header_ http.Header
}
// Patch: Patches the specified subnetwork with the data included in the
// request. Only the following fields within the subnetwork resource can
// be specified in the request: secondary_ip_range and
// allow_subnet_cidr_routes_overlap. It is also mandatory to specify the
// current fingeprint of the subnetwork resource being patched.
func (r *SubnetworksService) Patch(project string, region string, subnetwork string, subnetwork2 *Subnetwork) *SubnetworksPatchCall {
c := &SubnetworksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.project = project
c.region = region
c.subnetwork = subnetwork
c.subnetwork2 = subnetwork2
return c
}
// RequestId sets the optional parameter "requestId": An optional
// request ID to identify requests. Specify a unique request ID so that
// if you must retry your request, the server will know to ignore the
// request if it has already been completed.
//
// For example, consider a situation where you make an initial request
// and the request times out. If you make the request again with the
// same request ID, the server can check if original operation with the
// same request ID was received, and if so, will ignore the second
// request. This prevents clients from accidentally creating duplicate
// commitments.
//
// The request ID must be a valid UUID with the exception that zero UUID
// is not supported (00000000-0000-0000-0000-000000000000).
func (c *SubnetworksPatchCall) RequestId(requestId string) *SubnetworksPatchCall {
c.urlParams_.Set("requestId", requestId)
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *SubnetworksPatchCall) Fields(s ...googleapi.Field) *SubnetworksPatchCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *SubnetworksPatchCall) Context(ctx context.Context) *SubnetworksPatchCall {
c.ctx_ = ctx
return c
}
// Header returns an http.Header that can be modified by the caller to
// add HTTP headers to the request.
func (c *SubnetworksPatchCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *SubnetworksPatchCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.subnetwork2)
if err != nil {
return nil, err
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks/{subnetwork}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("PATCH", urls, body)
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"project": c.project,
"region": c.region,
"subnetwork": c.subnetwork,
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "compute.subnetworks.patch" call.
// Exactly one of *Operation or error will be non-nil. Any non-2xx
// status code is an error. Response headers are in either
// *Operation.ServerResponse.Header or (if a response was returned at
// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
// to check whether the returned error was because
// http.StatusNotModified was returned.
func (c *SubnetworksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {
if res.Body != nil {
res.Body.Close()
}
return nil, &googleapi.Error{
Code: res.StatusCode,
Header: res.Header,
}
}
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
ret := &Operation{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
target := &ret
if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Patches the specified subnetwork with the data included in the request. Only the following fields within the subnetwork resource can be specified in the request: secondary_ip_range and allow_subnet_cidr_routes_overlap. It is also mandatory to specify the current fingeprint of the subnetwork resource being patched.",
// "httpMethod": "PATCH",
// "id": "compute.subnetworks.patch",
// "parameterOrder": [
// "project",
// "region",
// "subnetwork"
// ],
// "parameters": {
// "project": {
// "description": "Project ID for this request.",
// "location": "path",
// "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
// "required": true,
// "type": "string"
// },
// "region": {
// "description": "Name of the region scoping this request.",
// "location": "path",
// "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
// "required": true,
// "type": "string"
// },
// "requestId": {
// "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
// "location": "query",
// "type": "string"
// },
// "subnetwork": {
// "description": "Name of the Subnetwork resource to patch.",
// "location": "path",
// "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
// "required": true,
// "type": "string"
// }
// },
// "path": "{project}/regions/{region}/subnetworks/{subnetwork}",
// "request": {
// "$ref": "Subnetwork"
// },
// "response": {
// "$ref": "Operation"
// },
// "scopes": [
// "https://www.googleapis.com/auth/cloud-platform",
// "https://www.googleapis.com/auth/compute"
// ]
// }
}
// method id "compute.subnetworks.setPrivateIpGoogleAccess":
type SubnetworksSetPrivateIpGoogleAccessCall struct {