Unverified Commit 2ec792a2 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #57520 from nicksardo/update-gce

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Update vendor of google.golang.org/api repo Update vendor of GCE **Release note**: ```release-note NONE ```
parents 1f182ae1 f220a170
...@@ -2870,47 +2870,47 @@ ...@@ -2870,47 +2870,47 @@
}, },
{ {
"ImportPath": "google.golang.org/api/cloudmonitoring/v2beta2", "ImportPath": "google.golang.org/api/cloudmonitoring/v2beta2",
"Rev": "654f863362977d69086620b5f72f13e911da2410" "Rev": "c0dae069ee96c9261a04c81efd9e0f1e55f565ac"
}, },
{ {
"ImportPath": "google.golang.org/api/compute/v0.alpha", "ImportPath": "google.golang.org/api/compute/v0.alpha",
"Rev": "654f863362977d69086620b5f72f13e911da2410" "Rev": "c0dae069ee96c9261a04c81efd9e0f1e55f565ac"
}, },
{ {
"ImportPath": "google.golang.org/api/compute/v0.beta", "ImportPath": "google.golang.org/api/compute/v0.beta",
"Rev": "654f863362977d69086620b5f72f13e911da2410" "Rev": "c0dae069ee96c9261a04c81efd9e0f1e55f565ac"
}, },
{ {
"ImportPath": "google.golang.org/api/compute/v1", "ImportPath": "google.golang.org/api/compute/v1",
"Rev": "654f863362977d69086620b5f72f13e911da2410" "Rev": "c0dae069ee96c9261a04c81efd9e0f1e55f565ac"
}, },
{ {
"ImportPath": "google.golang.org/api/container/v1", "ImportPath": "google.golang.org/api/container/v1",
"Rev": "654f863362977d69086620b5f72f13e911da2410" "Rev": "c0dae069ee96c9261a04c81efd9e0f1e55f565ac"
}, },
{ {
"ImportPath": "google.golang.org/api/gensupport", "ImportPath": "google.golang.org/api/gensupport",
"Rev": "654f863362977d69086620b5f72f13e911da2410" "Rev": "c0dae069ee96c9261a04c81efd9e0f1e55f565ac"
}, },
{ {
"ImportPath": "google.golang.org/api/googleapi", "ImportPath": "google.golang.org/api/googleapi",
"Rev": "654f863362977d69086620b5f72f13e911da2410" "Rev": "c0dae069ee96c9261a04c81efd9e0f1e55f565ac"
}, },
{ {
"ImportPath": "google.golang.org/api/googleapi/internal/uritemplates", "ImportPath": "google.golang.org/api/googleapi/internal/uritemplates",
"Rev": "654f863362977d69086620b5f72f13e911da2410" "Rev": "c0dae069ee96c9261a04c81efd9e0f1e55f565ac"
}, },
{ {
"ImportPath": "google.golang.org/api/logging/v2beta1", "ImportPath": "google.golang.org/api/logging/v2beta1",
"Rev": "654f863362977d69086620b5f72f13e911da2410" "Rev": "c0dae069ee96c9261a04c81efd9e0f1e55f565ac"
}, },
{ {
"ImportPath": "google.golang.org/api/monitoring/v3", "ImportPath": "google.golang.org/api/monitoring/v3",
"Rev": "654f863362977d69086620b5f72f13e911da2410" "Rev": "c0dae069ee96c9261a04c81efd9e0f1e55f565ac"
}, },
{ {
"ImportPath": "google.golang.org/api/pubsub/v1", "ImportPath": "google.golang.org/api/pubsub/v1",
"Rev": "654f863362977d69086620b5f72f13e911da2410" "Rev": "c0dae069ee96c9261a04c81efd9e0f1e55f565ac"
}, },
{ {
"ImportPath": "google.golang.org/genproto/googleapis/rpc/status", "ImportPath": "google.golang.org/genproto/googleapis/rpc/status",
......
...@@ -44,6 +44,7 @@ Ivan Krasin <krasin@golang.org> ...@@ -44,6 +44,7 @@ Ivan Krasin <krasin@golang.org>
Jason Hall <jasonhall@google.com> Jason Hall <jasonhall@google.com>
Johan Euphrosine <proppy@google.com> Johan Euphrosine <proppy@google.com>
Kostik Shtoyk <kostik@google.com> Kostik Shtoyk <kostik@google.com>
Matthew Whisenhunt <matt.whisenhunt@gmail.com>
Michael McGreevy <mcgreevy@golang.org> Michael McGreevy <mcgreevy@golang.org>
Nick Craig-Wood <nickcw@gmail.com> Nick Craig-Wood <nickcw@gmail.com>
Ross Light <light@google.com> Ross Light <light@google.com>
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
"basePath": "/cloudmonitoring/v2beta2/projects/", "basePath": "/cloudmonitoring/v2beta2/projects/",
"rootUrl": "https://www.googleapis.com/", "rootUrl": "https://www.googleapis.com/",
"servicePath": "cloudmonitoring/v2beta2/projects/", "servicePath": "cloudmonitoring/v2beta2/projects/",
"batchPath": "batch", "batchPath": "batch/cloudmonitoring/v2beta2",
"parameters": { "parameters": {
"alt": { "alt": {
"type": "string", "type": "string",
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -163,8 +163,8 @@ type AcceleratorConfig struct { ...@@ -163,8 +163,8 @@ type AcceleratorConfig struct {
} }
func (s *AcceleratorConfig) MarshalJSON() ([]byte, error) { func (s *AcceleratorConfig) MarshalJSON() ([]byte, error) {
type noMethod AcceleratorConfig type NoMethod AcceleratorConfig
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -188,6 +188,13 @@ type AddonsConfig struct { ...@@ -188,6 +188,13 @@ type AddonsConfig struct {
// KubernetesDashboard: Configuration for the Kubernetes Dashboard. // KubernetesDashboard: Configuration for the Kubernetes Dashboard.
KubernetesDashboard *KubernetesDashboard `json:"kubernetesDashboard,omitempty"` KubernetesDashboard *KubernetesDashboard `json:"kubernetesDashboard,omitempty"`
// NetworkPolicyConfig: Configuration for NetworkPolicy. This only
// tracks whether the addon
// is enabled or not on the Master, it does not track whether network
// policy
// is enabled for the nodes.
NetworkPolicyConfig *NetworkPolicyConfig `json:"networkPolicyConfig,omitempty"`
// ForceSendFields is a list of field names (e.g. // ForceSendFields is a list of field names (e.g.
// "HorizontalPodAutoscaling") to unconditionally include in API // "HorizontalPodAutoscaling") to unconditionally include in API
// requests. By default, fields with empty values are omitted from API // requests. By default, fields with empty values are omitted from API
...@@ -208,8 +215,8 @@ type AddonsConfig struct { ...@@ -208,8 +215,8 @@ type AddonsConfig struct {
} }
func (s *AddonsConfig) MarshalJSON() ([]byte, error) { func (s *AddonsConfig) MarshalJSON() ([]byte, error) {
type noMethod AddonsConfig type NoMethod AddonsConfig
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -249,8 +256,8 @@ type AutoUpgradeOptions struct { ...@@ -249,8 +256,8 @@ type AutoUpgradeOptions struct {
} }
func (s *AutoUpgradeOptions) MarshalJSON() ([]byte, error) { func (s *AutoUpgradeOptions) MarshalJSON() ([]byte, error) {
type noMethod AutoUpgradeOptions type NoMethod AutoUpgradeOptions
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -286,8 +293,8 @@ type CidrBlock struct { ...@@ -286,8 +293,8 @@ type CidrBlock struct {
} }
func (s *CidrBlock) MarshalJSON() ([]byte, error) { func (s *CidrBlock) MarshalJSON() ([]byte, error) {
type noMethod CidrBlock type NoMethod CidrBlock
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -317,12 +324,12 @@ type ClientCertificateConfig struct { ...@@ -317,12 +324,12 @@ type ClientCertificateConfig struct {
} }
func (s *ClientCertificateConfig) MarshalJSON() ([]byte, error) { func (s *ClientCertificateConfig) MarshalJSON() ([]byte, error) {
type noMethod ClientCertificateConfig type NoMethod ClientCertificateConfig
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
// Cluster: A Google Container Engine cluster. // Cluster: A Google Kubernetes Engine cluster.
type Cluster struct { type Cluster struct {
// AddonsConfig: Configurations for the various addons available to run // AddonsConfig: Configurations for the various addons available to run
// in the cluster. // in the cluster.
...@@ -414,10 +421,7 @@ type Cluster struct { ...@@ -414,10 +421,7 @@ type Cluster struct {
// time. // time.
InitialNodeCount int64 `json:"initialNodeCount,omitempty"` InitialNodeCount int64 `json:"initialNodeCount,omitempty"`
// InstanceGroupUrls: [Output only] The resource URLs of // InstanceGroupUrls: Deprecated. Use node_pools.instance_group_urls.
// [instance
// groups](/compute/docs/instance-groups/) associated with this
// cluster.
InstanceGroupUrls []string `json:"instanceGroupUrls,omitempty"` InstanceGroupUrls []string `json:"instanceGroupUrls,omitempty"`
// IpAllocationPolicy: Configuration for cluster IP allocation. // IpAllocationPolicy: Configuration for cluster IP allocation.
...@@ -446,6 +450,9 @@ type Cluster struct { ...@@ -446,6 +450,9 @@ type Cluster struct {
// * if left as an empty string,`logging.googleapis.com` will be used. // * if left as an empty string,`logging.googleapis.com` will be used.
LoggingService string `json:"loggingService,omitempty"` LoggingService string `json:"loggingService,omitempty"`
// MaintenancePolicy: Configure the maintenance policy for this cluster.
MaintenancePolicy *MaintenancePolicy `json:"maintenancePolicy,omitempty"`
// MasterAuth: The authentication information for accessing the master // MasterAuth: The authentication information for accessing the master
// endpoint. // endpoint.
MasterAuth *MasterAuth `json:"masterAuth,omitempty"` MasterAuth *MasterAuth `json:"masterAuth,omitempty"`
...@@ -594,8 +601,8 @@ type Cluster struct { ...@@ -594,8 +601,8 @@ type Cluster struct {
} }
func (s *Cluster) MarshalJSON() ([]byte, error) { func (s *Cluster) MarshalJSON() ([]byte, error) {
type noMethod Cluster type NoMethod Cluster
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -688,8 +695,8 @@ type ClusterUpdate struct { ...@@ -688,8 +695,8 @@ type ClusterUpdate struct {
} }
func (s *ClusterUpdate) MarshalJSON() ([]byte, error) { func (s *ClusterUpdate) MarshalJSON() ([]byte, error) {
type noMethod ClusterUpdate type NoMethod ClusterUpdate
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -724,8 +731,8 @@ type CreateClusterRequest struct { ...@@ -724,8 +731,8 @@ type CreateClusterRequest struct {
} }
func (s *CreateClusterRequest) MarshalJSON() ([]byte, error) { func (s *CreateClusterRequest) MarshalJSON() ([]byte, error) {
type noMethod CreateClusterRequest type NoMethod CreateClusterRequest
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -753,8 +760,49 @@ type CreateNodePoolRequest struct { ...@@ -753,8 +760,49 @@ type CreateNodePoolRequest struct {
} }
func (s *CreateNodePoolRequest) MarshalJSON() ([]byte, error) { func (s *CreateNodePoolRequest) MarshalJSON() ([]byte, error) {
type noMethod CreateNodePoolRequest type NoMethod CreateNodePoolRequest
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// DailyMaintenanceWindow: Time window specified for daily maintenance
// operations.
type DailyMaintenanceWindow struct {
// Duration: [Output only] Duration of the time window, automatically
// chosen to be
// smallest possible in the given scenario.
// Duration will be in
// [RFC3339](https://www.ietf.org/rfc/rfc3339.txt)
// format "PTnHnMnS".
Duration string `json:"duration,omitempty"`
// StartTime: Time within the maintenance window to start the
// maintenance operations.
// Time format should be in
// [RFC3339](https://www.ietf.org/rfc/rfc3339.txt)
// format "HH:MM”, where HH : [00-23] and MM : [00-59] GMT.
StartTime string `json:"startTime,omitempty"`
// ForceSendFields is a list of field names (e.g. "Duration") 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. "Duration") 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 *DailyMaintenanceWindow) MarshalJSON() ([]byte, error) {
type NoMethod DailyMaintenanceWindow
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -807,8 +855,8 @@ type HorizontalPodAutoscaling struct { ...@@ -807,8 +855,8 @@ type HorizontalPodAutoscaling struct {
} }
func (s *HorizontalPodAutoscaling) MarshalJSON() ([]byte, error) { func (s *HorizontalPodAutoscaling) MarshalJSON() ([]byte, error) {
type noMethod HorizontalPodAutoscaling type NoMethod HorizontalPodAutoscaling
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -842,8 +890,8 @@ type HttpLoadBalancing struct { ...@@ -842,8 +890,8 @@ type HttpLoadBalancing struct {
} }
func (s *HttpLoadBalancing) MarshalJSON() ([]byte, error) { func (s *HttpLoadBalancing) MarshalJSON() ([]byte, error) {
type noMethod HttpLoadBalancing type NoMethod HttpLoadBalancing
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -987,8 +1035,8 @@ type IPAllocationPolicy struct { ...@@ -987,8 +1035,8 @@ type IPAllocationPolicy struct {
} }
func (s *IPAllocationPolicy) MarshalJSON() ([]byte, error) { func (s *IPAllocationPolicy) MarshalJSON() ([]byte, error) {
type noMethod IPAllocationPolicy type NoMethod IPAllocationPolicy
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -1016,8 +1064,8 @@ type KubernetesDashboard struct { ...@@ -1016,8 +1064,8 @@ type KubernetesDashboard struct {
} }
func (s *KubernetesDashboard) MarshalJSON() ([]byte, error) { func (s *KubernetesDashboard) MarshalJSON() ([]byte, error) {
type noMethod KubernetesDashboard type NoMethod KubernetesDashboard
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -1052,8 +1100,8 @@ type LegacyAbac struct { ...@@ -1052,8 +1100,8 @@ type LegacyAbac struct {
} }
func (s *LegacyAbac) MarshalJSON() ([]byte, error) { func (s *LegacyAbac) MarshalJSON() ([]byte, error) {
type noMethod LegacyAbac type NoMethod LegacyAbac
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -1092,8 +1140,8 @@ type ListClustersResponse struct { ...@@ -1092,8 +1140,8 @@ type ListClustersResponse struct {
} }
func (s *ListClustersResponse) MarshalJSON() ([]byte, error) { func (s *ListClustersResponse) MarshalJSON() ([]byte, error) {
type noMethod ListClustersResponse type NoMethod ListClustersResponse
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -1125,8 +1173,8 @@ type ListNodePoolsResponse struct { ...@@ -1125,8 +1173,8 @@ type ListNodePoolsResponse struct {
} }
func (s *ListNodePoolsResponse) MarshalJSON() ([]byte, error) { func (s *ListNodePoolsResponse) MarshalJSON() ([]byte, error) {
type noMethod ListNodePoolsResponse type NoMethod ListNodePoolsResponse
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -1164,8 +1212,70 @@ type ListOperationsResponse struct { ...@@ -1164,8 +1212,70 @@ type ListOperationsResponse struct {
} }
func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
type noMethod ListOperationsResponse type NoMethod ListOperationsResponse
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// MaintenancePolicy: MaintenancePolicy defines the maintenance policy
// to be used for the cluster.
type MaintenancePolicy struct {
// Window: Specifies the maintenance window in which maintenance may be
// performed.
Window *MaintenanceWindow `json:"window,omitempty"`
// ForceSendFields is a list of field names (e.g. "Window") 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. "Window") 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 *MaintenancePolicy) MarshalJSON() ([]byte, error) {
type NoMethod MaintenancePolicy
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// MaintenanceWindow: MaintenanceWindow defines the maintenance window
// to be used for the cluster.
type MaintenanceWindow struct {
// DailyMaintenanceWindow: DailyMaintenanceWindow specifies a daily
// maintenance operation window.
DailyMaintenanceWindow *DailyMaintenanceWindow `json:"dailyMaintenanceWindow,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "DailyMaintenanceWindow") 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. "DailyMaintenanceWindow")
// 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 *MaintenanceWindow) MarshalJSON() ([]byte, error) {
type NoMethod MaintenanceWindow
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -1230,8 +1340,8 @@ type MasterAuth struct { ...@@ -1230,8 +1340,8 @@ type MasterAuth struct {
} }
func (s *MasterAuth) MarshalJSON() ([]byte, error) { func (s *MasterAuth) MarshalJSON() ([]byte, error) {
type noMethod MasterAuth type NoMethod MasterAuth
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -1271,8 +1381,8 @@ type MasterAuthorizedNetworksConfig struct { ...@@ -1271,8 +1381,8 @@ type MasterAuthorizedNetworksConfig struct {
} }
func (s *MasterAuthorizedNetworksConfig) MarshalJSON() ([]byte, error) { func (s *MasterAuthorizedNetworksConfig) MarshalJSON() ([]byte, error) {
type noMethod MasterAuthorizedNetworksConfig type NoMethod MasterAuthorizedNetworksConfig
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -1309,8 +1419,40 @@ type NetworkPolicy struct { ...@@ -1309,8 +1419,40 @@ type NetworkPolicy struct {
} }
func (s *NetworkPolicy) MarshalJSON() ([]byte, error) { func (s *NetworkPolicy) MarshalJSON() ([]byte, error) {
type noMethod NetworkPolicy type NoMethod NetworkPolicy
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// NetworkPolicyConfig: Configuration for NetworkPolicy. This only
// tracks whether the addon
// is enabled or not on the Master, it does not track whether network
// policy
// is enabled for the nodes.
type NetworkPolicyConfig struct {
// Disabled: Whether NetworkPolicy is enabled for this cluster.
Disabled bool `json:"disabled,omitempty"`
// ForceSendFields is a list of field names (e.g. "Disabled") 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. "Disabled") 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 *NetworkPolicyConfig) MarshalJSON() ([]byte, error) {
type NoMethod NetworkPolicyConfig
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -1394,6 +1536,20 @@ type NodeConfig struct { ...@@ -1394,6 +1536,20 @@ type NodeConfig struct {
// The total size of all keys and values must be less than 512 KB. // The total size of all keys and values must be less than 512 KB.
Metadata map[string]string `json:"metadata,omitempty"` Metadata map[string]string `json:"metadata,omitempty"`
// MinCpuPlatform: Minimum CPU platform to be used by this instance. The
// instance may be
// scheduled on the specified or newer CPU platform. Applicable values
// are the
// friendly names of CPU platforms, such as
// <code>minCpuPlatform: &quot;Intel Haswell&quot;</code>
// or
// <code>minCpuPlatform: &quot;Intel Sandy Bridge&quot;</code>. For
// more
// information, read [how to specify min CPU
// platform](https://cloud.google.com/compute/docs/instances/specify-min-
// cpu-platform)
MinCpuPlatform string `json:"minCpuPlatform,omitempty"`
// OauthScopes: The set of Google API scopes to be made available on all // OauthScopes: The set of Google API scopes to be made available on all
// of the // of the
// node VMs under the "default" service account. // node VMs under the "default" service account.
...@@ -1457,8 +1613,8 @@ type NodeConfig struct { ...@@ -1457,8 +1613,8 @@ type NodeConfig struct {
} }
func (s *NodeConfig) MarshalJSON() ([]byte, error) { func (s *NodeConfig) MarshalJSON() ([]byte, error) {
type noMethod NodeConfig type NoMethod NodeConfig
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -1503,8 +1659,8 @@ type NodeManagement struct { ...@@ -1503,8 +1659,8 @@ type NodeManagement struct {
} }
func (s *NodeManagement) MarshalJSON() ([]byte, error) { func (s *NodeManagement) MarshalJSON() ([]byte, error) {
type noMethod NodeManagement type NoMethod NodeManagement
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -1537,10 +1693,11 @@ type NodePool struct { ...@@ -1537,10 +1693,11 @@ type NodePool struct {
// firewall and routes quota. // firewall and routes quota.
InitialNodeCount int64 `json:"initialNodeCount,omitempty"` InitialNodeCount int64 `json:"initialNodeCount,omitempty"`
// InstanceGroupUrls: [Output only] The resource URLs of // InstanceGroupUrls: [Output only] The resource URLs of the [managed
// [instance // instance
// groups](/compute/docs/instance-groups/) associated with this // groups](/compute/docs/instance-groups/creating-groups-of-mana
// node pool. // ged-instances)
// associated with this node pool.
InstanceGroupUrls []string `json:"instanceGroupUrls,omitempty"` InstanceGroupUrls []string `json:"instanceGroupUrls,omitempty"`
// Management: NodeManagement configuration for this NodePool. // Management: NodeManagement configuration for this NodePool.
...@@ -1584,7 +1741,7 @@ type NodePool struct { ...@@ -1584,7 +1741,7 @@ type NodePool struct {
// node pool instance, if available. // node pool instance, if available.
StatusMessage string `json:"statusMessage,omitempty"` StatusMessage string `json:"statusMessage,omitempty"`
// Version: [Output only] The version of the Kubernetes of this node. // Version: The version of the Kubernetes of this node.
Version string `json:"version,omitempty"` Version string `json:"version,omitempty"`
// ServerResponse contains the HTTP response code and headers from the // ServerResponse contains the HTTP response code and headers from the
...@@ -1609,8 +1766,8 @@ type NodePool struct { ...@@ -1609,8 +1766,8 @@ type NodePool struct {
} }
func (s *NodePool) MarshalJSON() ([]byte, error) { func (s *NodePool) MarshalJSON() ([]byte, error) {
type noMethod NodePool type NoMethod NodePool
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -1649,8 +1806,8 @@ type NodePoolAutoscaling struct { ...@@ -1649,8 +1806,8 @@ type NodePoolAutoscaling struct {
} }
func (s *NodePoolAutoscaling) MarshalJSON() ([]byte, error) { func (s *NodePoolAutoscaling) MarshalJSON() ([]byte, error) {
type noMethod NodePoolAutoscaling type NoMethod NodePoolAutoscaling
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -1688,6 +1845,7 @@ type Operation struct { ...@@ -1688,6 +1845,7 @@ type Operation struct {
// "SET_MASTER_AUTH" - Set/generate master auth materials // "SET_MASTER_AUTH" - Set/generate master auth materials
// "SET_NODE_POOL_SIZE" - Set node pool size. // "SET_NODE_POOL_SIZE" - Set node pool size.
// "SET_NETWORK_POLICY" - Updates network policy for a cluster. // "SET_NETWORK_POLICY" - Updates network policy for a cluster.
// "SET_MAINTENANCE_POLICY" - Set the maintenance policy.
OperationType string `json:"operationType,omitempty"` OperationType string `json:"operationType,omitempty"`
// SelfLink: Server-defined URL for the resource. // SelfLink: Server-defined URL for the resource.
...@@ -1743,8 +1901,8 @@ type Operation struct { ...@@ -1743,8 +1901,8 @@ type Operation struct {
} }
func (s *Operation) MarshalJSON() ([]byte, error) { func (s *Operation) MarshalJSON() ([]byte, error) {
type noMethod Operation type NoMethod Operation
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -1756,7 +1914,7 @@ func (s *Operation) MarshalJSON() ([]byte, error) { ...@@ -1756,7 +1914,7 @@ func (s *Operation) MarshalJSON() ([]byte, error) {
type RollbackNodePoolUpgradeRequest struct { type RollbackNodePoolUpgradeRequest struct {
} }
// ServerConfig: Container Engine service configuration. // ServerConfig: Kubernetes Engine service configuration.
type ServerConfig struct { type ServerConfig struct {
// DefaultClusterVersion: Version of Kubernetes the service deploys by // DefaultClusterVersion: Version of Kubernetes the service deploys by
// default. // default.
...@@ -1798,8 +1956,8 @@ type ServerConfig struct { ...@@ -1798,8 +1956,8 @@ type ServerConfig struct {
} }
func (s *ServerConfig) MarshalJSON() ([]byte, error) { func (s *ServerConfig) MarshalJSON() ([]byte, error) {
type noMethod ServerConfig type NoMethod ServerConfig
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -1829,8 +1987,8 @@ type SetAddonsConfigRequest struct { ...@@ -1829,8 +1987,8 @@ type SetAddonsConfigRequest struct {
} }
func (s *SetAddonsConfigRequest) MarshalJSON() ([]byte, error) { func (s *SetAddonsConfigRequest) MarshalJSON() ([]byte, error) {
type noMethod SetAddonsConfigRequest type NoMethod SetAddonsConfigRequest
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -1844,7 +2002,7 @@ type SetLabelsRequest struct { ...@@ -1844,7 +2002,7 @@ type SetLabelsRequest struct {
// this resource, // this resource,
// used to detect conflicts. The fingerprint is initially generated // used to detect conflicts. The fingerprint is initially generated
// by // by
// Container Engine and changes after every request to modify or // Kubernetes Engine and changes after every request to modify or
// update // update
// labels. You must always provide an up-to-date fingerprint hash // labels. You must always provide an up-to-date fingerprint hash
// when // when
...@@ -1875,8 +2033,8 @@ type SetLabelsRequest struct { ...@@ -1875,8 +2033,8 @@ type SetLabelsRequest struct {
} }
func (s *SetLabelsRequest) MarshalJSON() ([]byte, error) { func (s *SetLabelsRequest) MarshalJSON() ([]byte, error) {
type noMethod SetLabelsRequest type NoMethod SetLabelsRequest
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -1905,8 +2063,8 @@ type SetLegacyAbacRequest struct { ...@@ -1905,8 +2063,8 @@ type SetLegacyAbacRequest struct {
} }
func (s *SetLegacyAbacRequest) MarshalJSON() ([]byte, error) { func (s *SetLegacyAbacRequest) MarshalJSON() ([]byte, error) {
type noMethod SetLegacyAbacRequest type NoMethod SetLegacyAbacRequest
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -1944,8 +2102,8 @@ type SetLocationsRequest struct { ...@@ -1944,8 +2102,8 @@ type SetLocationsRequest struct {
} }
func (s *SetLocationsRequest) MarshalJSON() ([]byte, error) { func (s *SetLocationsRequest) MarshalJSON() ([]byte, error) {
type noMethod SetLocationsRequest type NoMethod SetLocationsRequest
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -1979,20 +2137,59 @@ type SetLoggingServiceRequest struct { ...@@ -1979,20 +2137,59 @@ type SetLoggingServiceRequest struct {
} }
func (s *SetLoggingServiceRequest) MarshalJSON() ([]byte, error) { func (s *SetLoggingServiceRequest) MarshalJSON() ([]byte, error) {
type noMethod SetLoggingServiceRequest type NoMethod SetLoggingServiceRequest
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// SetMaintenancePolicyRequest: SetMaintenancePolicyRequest sets the
// maintenance policy for a cluster.
type SetMaintenancePolicyRequest struct {
// MaintenancePolicy: The maintenance policy to be set for the cluster.
// An empty field
// clears the existing maintenance policy.
MaintenancePolicy *MaintenancePolicy `json:"maintenancePolicy,omitempty"`
// ForceSendFields is a list of field names (e.g. "MaintenancePolicy")
// 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. "MaintenancePolicy") 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 *SetMaintenancePolicyRequest) MarshalJSON() ([]byte, error) {
type NoMethod SetMaintenancePolicyRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
// SetMasterAuthRequest: SetMasterAuthRequest updates the admin password // SetMasterAuthRequest: SetMasterAuthRequest updates the admin password
// of a cluster. // of a cluster.
type SetMasterAuthRequest struct { type SetMasterAuthRequest struct {
// Action: The exact form of action to be taken on the master auth // Action: The exact form of action to be taken on the master auth.
// //
// Possible values: // Possible values:
// "UNKNOWN" - Operation is unknown and will error out // "UNKNOWN" - Operation is unknown and will error out.
// "SET_PASSWORD" - Set the password to a user generated value. // "SET_PASSWORD" - Set the password to a user generated value.
// "GENERATE_PASSWORD" - Generate a new password and set it to that. // "GENERATE_PASSWORD" - Generate a new password and set it to that.
// "SET_USERNAME" - Set the username. If an empty username is
// provided, basic authentication
// is disabled for the cluster. If a non-empty username is provided,
// basic
// authentication is enabled, with either a provided password or a
// generated
// one.
Action string `json:"action,omitempty"` Action string `json:"action,omitempty"`
// Update: A description of the update. // Update: A description of the update.
...@@ -2016,8 +2213,8 @@ type SetMasterAuthRequest struct { ...@@ -2016,8 +2213,8 @@ type SetMasterAuthRequest struct {
} }
func (s *SetMasterAuthRequest) MarshalJSON() ([]byte, error) { func (s *SetMasterAuthRequest) MarshalJSON() ([]byte, error) {
type noMethod SetMasterAuthRequest type NoMethod SetMasterAuthRequest
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -2051,8 +2248,8 @@ type SetMonitoringServiceRequest struct { ...@@ -2051,8 +2248,8 @@ type SetMonitoringServiceRequest struct {
} }
func (s *SetMonitoringServiceRequest) MarshalJSON() ([]byte, error) { func (s *SetMonitoringServiceRequest) MarshalJSON() ([]byte, error) {
type noMethod SetMonitoringServiceRequest type NoMethod SetMonitoringServiceRequest
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -2080,8 +2277,8 @@ type SetNetworkPolicyRequest struct { ...@@ -2080,8 +2277,8 @@ type SetNetworkPolicyRequest struct {
} }
func (s *SetNetworkPolicyRequest) MarshalJSON() ([]byte, error) { func (s *SetNetworkPolicyRequest) MarshalJSON() ([]byte, error) {
type noMethod SetNetworkPolicyRequest type NoMethod SetNetworkPolicyRequest
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -2109,8 +2306,8 @@ type SetNodePoolAutoscalingRequest struct { ...@@ -2109,8 +2306,8 @@ type SetNodePoolAutoscalingRequest struct {
} }
func (s *SetNodePoolAutoscalingRequest) MarshalJSON() ([]byte, error) { func (s *SetNodePoolAutoscalingRequest) MarshalJSON() ([]byte, error) {
type noMethod SetNodePoolAutoscalingRequest type NoMethod SetNodePoolAutoscalingRequest
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -2139,8 +2336,8 @@ type SetNodePoolManagementRequest struct { ...@@ -2139,8 +2336,8 @@ type SetNodePoolManagementRequest struct {
} }
func (s *SetNodePoolManagementRequest) MarshalJSON() ([]byte, error) { func (s *SetNodePoolManagementRequest) MarshalJSON() ([]byte, error) {
type noMethod SetNodePoolManagementRequest type NoMethod SetNodePoolManagementRequest
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -2169,8 +2366,8 @@ type SetNodePoolSizeRequest struct { ...@@ -2169,8 +2366,8 @@ type SetNodePoolSizeRequest struct {
} }
func (s *SetNodePoolSizeRequest) MarshalJSON() ([]byte, error) { func (s *SetNodePoolSizeRequest) MarshalJSON() ([]byte, error) {
type noMethod SetNodePoolSizeRequest type NoMethod SetNodePoolSizeRequest
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -2204,19 +2401,17 @@ type UpdateClusterRequest struct { ...@@ -2204,19 +2401,17 @@ type UpdateClusterRequest struct {
} }
func (s *UpdateClusterRequest) MarshalJSON() ([]byte, error) { func (s *UpdateClusterRequest) MarshalJSON() ([]byte, error) {
type noMethod UpdateClusterRequest type NoMethod UpdateClusterRequest
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
// UpdateMasterRequest: UpdateMasterRequest updates the master of the // UpdateMasterRequest: UpdateMasterRequest updates the master of the
// cluster. // cluster.
type UpdateMasterRequest struct { type UpdateMasterRequest struct {
// MasterVersion: The Kubernetes version to change the master to. The // MasterVersion: The Kubernetes version to change the master to. Use
// only valid value is the // "-" to have the server
// latest supported version. Use "-" to have the server automatically // automatically select the default version.
// select
// the latest version.
MasterVersion string `json:"masterVersion,omitempty"` MasterVersion string `json:"masterVersion,omitempty"`
// ForceSendFields is a list of field names (e.g. "MasterVersion") to // ForceSendFields is a list of field names (e.g. "MasterVersion") to
...@@ -2237,8 +2432,8 @@ type UpdateMasterRequest struct { ...@@ -2237,8 +2432,8 @@ type UpdateMasterRequest struct {
} }
func (s *UpdateMasterRequest) MarshalJSON() ([]byte, error) { func (s *UpdateMasterRequest) MarshalJSON() ([]byte, error) {
type noMethod UpdateMasterRequest type NoMethod UpdateMasterRequest
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -2272,8 +2467,8 @@ type UpdateNodePoolRequest struct { ...@@ -2272,8 +2467,8 @@ type UpdateNodePoolRequest struct {
} }
func (s *UpdateNodePoolRequest) MarshalJSON() ([]byte, error) { func (s *UpdateNodePoolRequest) MarshalJSON() ([]byte, error) {
type noMethod UpdateNodePoolRequest type NoMethod UpdateNodePoolRequest
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -2289,7 +2484,7 @@ type ProjectsZonesGetServerconfigCall struct { ...@@ -2289,7 +2484,7 @@ type ProjectsZonesGetServerconfigCall struct {
header_ http.Header header_ http.Header
} }
// GetServerconfig: Returns configuration info about the Container // GetServerconfig: Returns configuration info about the Kubernetes
// Engine service. // Engine service.
func (r *ProjectsZonesService) GetServerconfig(projectId string, zone string) *ProjectsZonesGetServerconfigCall { func (r *ProjectsZonesService) GetServerconfig(projectId string, zone string) *ProjectsZonesGetServerconfigCall {
c := &ProjectsZonesGetServerconfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} c := &ProjectsZonesGetServerconfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
...@@ -2388,12 +2583,12 @@ func (c *ProjectsZonesGetServerconfigCall) Do(opts ...googleapi.CallOption) (*Se ...@@ -2388,12 +2583,12 @@ func (c *ProjectsZonesGetServerconfigCall) Do(opts ...googleapi.CallOption) (*Se
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
// { // {
// "description": "Returns configuration info about the Container Engine service.", // "description": "Returns configuration info about the Kubernetes Engine service.",
// "flatPath": "v1/projects/{projectId}/zones/{zone}/serverconfig", // "flatPath": "v1/projects/{projectId}/zones/{zone}/serverconfig",
// "httpMethod": "GET", // "httpMethod": "GET",
// "id": "container.projects.zones.getServerconfig", // "id": "container.projects.zones.getServerconfig",
...@@ -2532,7 +2727,7 @@ func (c *ProjectsZonesClustersAddonsCall) Do(opts ...googleapi.CallOption) (*Ope ...@@ -2532,7 +2727,7 @@ func (c *ProjectsZonesClustersAddonsCall) Do(opts ...googleapi.CallOption) (*Ope
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -2686,7 +2881,7 @@ func (c *ProjectsZonesClustersCompleteIpRotationCall) Do(opts ...googleapi.CallO ...@@ -2686,7 +2881,7 @@ func (c *ProjectsZonesClustersCompleteIpRotationCall) Do(opts ...googleapi.CallO
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -2853,7 +3048,7 @@ func (c *ProjectsZonesClustersCreateCall) Do(opts ...googleapi.CallOption) (*Ope ...@@ -2853,7 +3048,7 @@ func (c *ProjectsZonesClustersCreateCall) Do(opts ...googleapi.CallOption) (*Ope
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -3004,7 +3199,7 @@ func (c *ProjectsZonesClustersDeleteCall) Do(opts ...googleapi.CallOption) (*Ope ...@@ -3004,7 +3199,7 @@ func (c *ProjectsZonesClustersDeleteCall) Do(opts ...googleapi.CallOption) (*Ope
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -3162,7 +3357,7 @@ func (c *ProjectsZonesClustersGetCall) Do(opts ...googleapi.CallOption) (*Cluste ...@@ -3162,7 +3357,7 @@ func (c *ProjectsZonesClustersGetCall) Do(opts ...googleapi.CallOption) (*Cluste
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -3314,7 +3509,7 @@ func (c *ProjectsZonesClustersLegacyAbacCall) Do(opts ...googleapi.CallOption) ( ...@@ -3314,7 +3509,7 @@ func (c *ProjectsZonesClustersLegacyAbacCall) Do(opts ...googleapi.CallOption) (
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -3474,7 +3669,7 @@ func (c *ProjectsZonesClustersListCall) Do(opts ...googleapi.CallOption) (*ListC ...@@ -3474,7 +3669,7 @@ func (c *ProjectsZonesClustersListCall) Do(opts ...googleapi.CallOption) (*ListC
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -3618,7 +3813,7 @@ func (c *ProjectsZonesClustersLocationsCall) Do(opts ...googleapi.CallOption) (* ...@@ -3618,7 +3813,7 @@ func (c *ProjectsZonesClustersLocationsCall) Do(opts ...googleapi.CallOption) (*
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -3772,7 +3967,7 @@ func (c *ProjectsZonesClustersLoggingCall) Do(opts ...googleapi.CallOption) (*Op ...@@ -3772,7 +3967,7 @@ func (c *ProjectsZonesClustersLoggingCall) Do(opts ...googleapi.CallOption) (*Op
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -3926,7 +4121,7 @@ func (c *ProjectsZonesClustersMasterCall) Do(opts ...googleapi.CallOption) (*Ope ...@@ -3926,7 +4121,7 @@ func (c *ProjectsZonesClustersMasterCall) Do(opts ...googleapi.CallOption) (*Ope
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -4080,7 +4275,7 @@ func (c *ProjectsZonesClustersMonitoringCall) Do(opts ...googleapi.CallOption) ( ...@@ -4080,7 +4275,7 @@ func (c *ProjectsZonesClustersMonitoringCall) Do(opts ...googleapi.CallOption) (
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -4234,7 +4429,7 @@ func (c *ProjectsZonesClustersResourceLabelsCall) Do(opts ...googleapi.CallOptio ...@@ -4234,7 +4429,7 @@ func (c *ProjectsZonesClustersResourceLabelsCall) Do(opts ...googleapi.CallOptio
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -4282,6 +4477,160 @@ func (c *ProjectsZonesClustersResourceLabelsCall) Do(opts ...googleapi.CallOptio ...@@ -4282,6 +4477,160 @@ func (c *ProjectsZonesClustersResourceLabelsCall) Do(opts ...googleapi.CallOptio
} }
// method id "container.projects.zones.clusters.setMaintenancePolicy":
type ProjectsZonesClustersSetMaintenancePolicyCall struct {
s *Service
projectId string
zone string
clusterId string
setmaintenancepolicyrequest *SetMaintenancePolicyRequest
urlParams_ gensupport.URLParams
ctx_ context.Context
header_ http.Header
}
// SetMaintenancePolicy: Sets the maintenance policy for a cluster.
func (r *ProjectsZonesClustersService) SetMaintenancePolicy(projectId string, zone string, clusterId string, setmaintenancepolicyrequest *SetMaintenancePolicyRequest) *ProjectsZonesClustersSetMaintenancePolicyCall {
c := &ProjectsZonesClustersSetMaintenancePolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.projectId = projectId
c.zone = zone
c.clusterId = clusterId
c.setmaintenancepolicyrequest = setmaintenancepolicyrequest
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 *ProjectsZonesClustersSetMaintenancePolicyCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersSetMaintenancePolicyCall {
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 *ProjectsZonesClustersSetMaintenancePolicyCall) Context(ctx context.Context) *ProjectsZonesClustersSetMaintenancePolicyCall {
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 *ProjectsZonesClustersSetMaintenancePolicyCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *ProjectsZonesClustersSetMaintenancePolicyCall) 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.setmaintenancepolicyrequest)
if err != nil {
return nil, err
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMaintenancePolicy")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"projectId": c.projectId,
"zone": c.zone,
"clusterId": c.clusterId,
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "container.projects.zones.clusters.setMaintenancePolicy" 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 *ProjectsZonesClustersSetMaintenancePolicyCall) 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": "Sets the maintenance policy for a cluster.",
// "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMaintenancePolicy",
// "httpMethod": "POST",
// "id": "container.projects.zones.clusters.setMaintenancePolicy",
// "parameterOrder": [
// "projectId",
// "zone",
// "clusterId"
// ],
// "parameters": {
// "clusterId": {
// "description": "The name of the cluster to update.",
// "location": "path",
// "required": true,
// "type": "string"
// },
// "projectId": {
// "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).",
// "location": "path",
// "required": true,
// "type": "string"
// },
// "zone": {
// "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.",
// "location": "path",
// "required": true,
// "type": "string"
// }
// },
// "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMaintenancePolicy",
// "request": {
// "$ref": "SetMaintenancePolicyRequest"
// },
// "response": {
// "$ref": "Operation"
// },
// "scopes": [
// "https://www.googleapis.com/auth/cloud-platform"
// ]
// }
}
// method id "container.projects.zones.clusters.setMasterAuth": // method id "container.projects.zones.clusters.setMasterAuth":
type ProjectsZonesClustersSetMasterAuthCall struct { type ProjectsZonesClustersSetMasterAuthCall struct {
...@@ -4392,7 +4741,7 @@ func (c *ProjectsZonesClustersSetMasterAuthCall) Do(opts ...googleapi.CallOption ...@@ -4392,7 +4741,7 @@ func (c *ProjectsZonesClustersSetMasterAuthCall) Do(opts ...googleapi.CallOption
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -4546,7 +4895,7 @@ func (c *ProjectsZonesClustersSetNetworkPolicyCall) Do(opts ...googleapi.CallOpt ...@@ -4546,7 +4895,7 @@ func (c *ProjectsZonesClustersSetNetworkPolicyCall) Do(opts ...googleapi.CallOpt
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -4700,7 +5049,7 @@ func (c *ProjectsZonesClustersStartIpRotationCall) Do(opts ...googleapi.CallOpti ...@@ -4700,7 +5049,7 @@ func (c *ProjectsZonesClustersStartIpRotationCall) Do(opts ...googleapi.CallOpti
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -4854,7 +5203,7 @@ func (c *ProjectsZonesClustersUpdateCall) Do(opts ...googleapi.CallOption) (*Ope ...@@ -4854,7 +5203,7 @@ func (c *ProjectsZonesClustersUpdateCall) Do(opts ...googleapi.CallOption) (*Ope
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -5011,7 +5360,7 @@ func (c *ProjectsZonesClustersNodePoolsAutoscalingCall) Do(opts ...googleapi.Cal ...@@ -5011,7 +5360,7 @@ func (c *ProjectsZonesClustersNodePoolsAutoscalingCall) Do(opts ...googleapi.Cal
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -5172,7 +5521,7 @@ func (c *ProjectsZonesClustersNodePoolsCreateCall) Do(opts ...googleapi.CallOpti ...@@ -5172,7 +5521,7 @@ func (c *ProjectsZonesClustersNodePoolsCreateCall) Do(opts ...googleapi.CallOpti
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -5322,7 +5671,7 @@ func (c *ProjectsZonesClustersNodePoolsDeleteCall) Do(opts ...googleapi.CallOpti ...@@ -5322,7 +5671,7 @@ func (c *ProjectsZonesClustersNodePoolsDeleteCall) Do(opts ...googleapi.CallOpti
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -5490,7 +5839,7 @@ func (c *ProjectsZonesClustersNodePoolsGetCall) Do(opts ...googleapi.CallOption) ...@@ -5490,7 +5839,7 @@ func (c *ProjectsZonesClustersNodePoolsGetCall) Do(opts ...googleapi.CallOption)
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -5655,7 +6004,7 @@ func (c *ProjectsZonesClustersNodePoolsListCall) Do(opts ...googleapi.CallOption ...@@ -5655,7 +6004,7 @@ func (c *ProjectsZonesClustersNodePoolsListCall) Do(opts ...googleapi.CallOption
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -5811,7 +6160,7 @@ func (c *ProjectsZonesClustersNodePoolsRollbackCall) Do(opts ...googleapi.CallOp ...@@ -5811,7 +6160,7 @@ func (c *ProjectsZonesClustersNodePoolsRollbackCall) Do(opts ...googleapi.CallOp
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -5975,7 +6324,7 @@ func (c *ProjectsZonesClustersNodePoolsSetManagementCall) Do(opts ...googleapi.C ...@@ -5975,7 +6324,7 @@ func (c *ProjectsZonesClustersNodePoolsSetManagementCall) Do(opts ...googleapi.C
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -6139,7 +6488,7 @@ func (c *ProjectsZonesClustersNodePoolsSetSizeCall) Do(opts ...googleapi.CallOpt ...@@ -6139,7 +6488,7 @@ func (c *ProjectsZonesClustersNodePoolsSetSizeCall) Do(opts ...googleapi.CallOpt
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -6304,7 +6653,7 @@ func (c *ProjectsZonesClustersNodePoolsUpdateCall) Do(opts ...googleapi.CallOpti ...@@ -6304,7 +6653,7 @@ func (c *ProjectsZonesClustersNodePoolsUpdateCall) Do(opts ...googleapi.CallOpti
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -6465,7 +6814,7 @@ func (c *ProjectsZonesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*E ...@@ -6465,7 +6814,7 @@ func (c *ProjectsZonesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*E
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -6626,7 +6975,7 @@ func (c *ProjectsZonesOperationsGetCall) Do(opts ...googleapi.CallOption) (*Oper ...@@ -6626,7 +6975,7 @@ func (c *ProjectsZonesOperationsGetCall) Do(opts ...googleapi.CallOption) (*Oper
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -6782,7 +7131,7 @@ func (c *ProjectsZonesOperationsListCall) Do(opts ...googleapi.CallOption) (*Lis ...@@ -6782,7 +7131,7 @@ func (c *ProjectsZonesOperationsListCall) Do(opts ...googleapi.CallOption) (*Lis
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
package gensupport package gensupport
import ( import (
"encoding/json"
"errors" "errors"
"net/http" "net/http"
...@@ -59,3 +60,12 @@ func SendRequest(ctx context.Context, client *http.Client, req *http.Request) (* ...@@ -59,3 +60,12 @@ func SendRequest(ctx context.Context, client *http.Client, req *http.Request) (*
} }
return resp, err return resp, err
} }
// DecodeResponse decodes the body of res into target. If there is no body,
// target is unchanged.
func DecodeResponse(target interface{}, res *http.Response) error {
if res.StatusCode == http.StatusNoContent {
return nil
}
return json.NewDecoder(res.Body).Decode(target)
}
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -248,8 +248,8 @@ type BucketOptions struct { ...@@ -248,8 +248,8 @@ type BucketOptions struct {
} }
func (s *BucketOptions) MarshalJSON() ([]byte, error) { func (s *BucketOptions) MarshalJSON() ([]byte, error) {
type noMethod BucketOptions type NoMethod BucketOptions
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -297,8 +297,8 @@ type Explicit struct { ...@@ -297,8 +297,8 @@ type Explicit struct {
} }
func (s *Explicit) MarshalJSON() ([]byte, error) { func (s *Explicit) MarshalJSON() ([]byte, error) {
type noMethod Explicit type NoMethod Explicit
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -337,19 +337,19 @@ type Exponential struct { ...@@ -337,19 +337,19 @@ type Exponential struct {
} }
func (s *Exponential) MarshalJSON() ([]byte, error) { func (s *Exponential) MarshalJSON() ([]byte, error) {
type noMethod Exponential type NoMethod Exponential
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
func (s *Exponential) UnmarshalJSON(data []byte) error { func (s *Exponential) UnmarshalJSON(data []byte) error {
type noMethod Exponential type NoMethod Exponential
var s1 struct { var s1 struct {
GrowthFactor gensupport.JSONFloat64 `json:"growthFactor"` GrowthFactor gensupport.JSONFloat64 `json:"growthFactor"`
Scale gensupport.JSONFloat64 `json:"scale"` Scale gensupport.JSONFloat64 `json:"scale"`
*noMethod *NoMethod
} }
s1.noMethod = (*noMethod)(s) s1.NoMethod = (*NoMethod)(s)
if err := json.Unmarshal(data, &s1); err != nil { if err := json.Unmarshal(data, &s1); err != nil {
return err return err
} }
...@@ -444,8 +444,8 @@ type HttpRequest struct { ...@@ -444,8 +444,8 @@ type HttpRequest struct {
} }
func (s *HttpRequest) MarshalJSON() ([]byte, error) { func (s *HttpRequest) MarshalJSON() ([]byte, error) {
type noMethod HttpRequest type NoMethod HttpRequest
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -483,8 +483,8 @@ type LabelDescriptor struct { ...@@ -483,8 +483,8 @@ type LabelDescriptor struct {
} }
func (s *LabelDescriptor) MarshalJSON() ([]byte, error) { func (s *LabelDescriptor) MarshalJSON() ([]byte, error) {
type noMethod LabelDescriptor type NoMethod LabelDescriptor
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -523,19 +523,19 @@ type Linear struct { ...@@ -523,19 +523,19 @@ type Linear struct {
} }
func (s *Linear) MarshalJSON() ([]byte, error) { func (s *Linear) MarshalJSON() ([]byte, error) {
type noMethod Linear type NoMethod Linear
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
func (s *Linear) UnmarshalJSON(data []byte) error { func (s *Linear) UnmarshalJSON(data []byte) error {
type noMethod Linear type NoMethod Linear
var s1 struct { var s1 struct {
Offset gensupport.JSONFloat64 `json:"offset"` Offset gensupport.JSONFloat64 `json:"offset"`
Width gensupport.JSONFloat64 `json:"width"` Width gensupport.JSONFloat64 `json:"width"`
*noMethod *NoMethod
} }
s1.noMethod = (*noMethod)(s) s1.NoMethod = (*NoMethod)(s)
if err := json.Unmarshal(data, &s1); err != nil { if err := json.Unmarshal(data, &s1); err != nil {
return err return err
} }
...@@ -612,8 +612,8 @@ type ListLogEntriesRequest struct { ...@@ -612,8 +612,8 @@ type ListLogEntriesRequest struct {
} }
func (s *ListLogEntriesRequest) MarshalJSON() ([]byte, error) { func (s *ListLogEntriesRequest) MarshalJSON() ([]byte, error) {
type noMethod ListLogEntriesRequest type NoMethod ListLogEntriesRequest
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -658,8 +658,8 @@ type ListLogEntriesResponse struct { ...@@ -658,8 +658,8 @@ type ListLogEntriesResponse struct {
} }
func (s *ListLogEntriesResponse) MarshalJSON() ([]byte, error) { func (s *ListLogEntriesResponse) MarshalJSON() ([]byte, error) {
type noMethod ListLogEntriesResponse type NoMethod ListLogEntriesResponse
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -696,8 +696,8 @@ type ListLogMetricsResponse struct { ...@@ -696,8 +696,8 @@ type ListLogMetricsResponse struct {
} }
func (s *ListLogMetricsResponse) MarshalJSON() ([]byte, error) { func (s *ListLogMetricsResponse) MarshalJSON() ([]byte, error) {
type noMethod ListLogMetricsResponse type NoMethod ListLogMetricsResponse
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -736,8 +736,8 @@ type ListLogsResponse struct { ...@@ -736,8 +736,8 @@ type ListLogsResponse struct {
} }
func (s *ListLogsResponse) MarshalJSON() ([]byte, error) { func (s *ListLogsResponse) MarshalJSON() ([]byte, error) {
type noMethod ListLogsResponse type NoMethod ListLogsResponse
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -775,8 +775,8 @@ type ListMonitoredResourceDescriptorsResponse struct { ...@@ -775,8 +775,8 @@ type ListMonitoredResourceDescriptorsResponse struct {
} }
func (s *ListMonitoredResourceDescriptorsResponse) MarshalJSON() ([]byte, error) { func (s *ListMonitoredResourceDescriptorsResponse) MarshalJSON() ([]byte, error) {
type noMethod ListMonitoredResourceDescriptorsResponse type NoMethod ListMonitoredResourceDescriptorsResponse
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -813,8 +813,8 @@ type ListSinksResponse struct { ...@@ -813,8 +813,8 @@ type ListSinksResponse struct {
} }
func (s *ListSinksResponse) MarshalJSON() ([]byte, error) { func (s *ListSinksResponse) MarshalJSON() ([]byte, error) {
type noMethod ListSinksResponse type NoMethod ListSinksResponse
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -850,7 +850,10 @@ type LogEntry struct { ...@@ -850,7 +850,10 @@ type LogEntry struct {
// "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[L // "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[L
// OG_ID]" // OG_ID]"
// "folders/[FOLDER_ID]/logs/[LOG_ID]" // "folders/[FOLDER_ID]/logs/[LOG_ID]"
// [LOG_ID] must be URL-encoded within log_name. Example: // A project number may optionally be used in place of PROJECT_ID. The
// project number is translated to its corresponding PROJECT_ID
// internally and the log_name field will contain PROJECT_ID in queries
// and exports.[LOG_ID] must be URL-encoded within log_name. Example:
// "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Fa // "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Fa
// ctivity". [LOG_ID] must be less than 512 characters long and can only // ctivity". [LOG_ID] must be less than 512 characters long and can only
// include the following characters: upper and lower case alphanumeric // include the following characters: upper and lower case alphanumeric
...@@ -903,6 +906,12 @@ type LogEntry struct { ...@@ -903,6 +906,12 @@ type LogEntry struct {
// with the log entry, if any. // with the log entry, if any.
SourceLocation *LogEntrySourceLocation `json:"sourceLocation,omitempty"` SourceLocation *LogEntrySourceLocation `json:"sourceLocation,omitempty"`
// SpanId: Optional. The span ID within the trace associated with the
// log entry. For Stackdriver Trace spans, this is the same format that
// the Stackdriver Trace API v2 uses: a 16-character hexadecimal
// encoding of an 8-byte array, such as <code>"000000000000004a"</code>.
SpanId string `json:"spanId,omitempty"`
// TextPayload: The log entry payload, represented as a Unicode string // TextPayload: The log entry payload, represented as a Unicode string
// (UTF-8). // (UTF-8).
TextPayload string `json:"textPayload,omitempty"` TextPayload string `json:"textPayload,omitempty"`
...@@ -913,7 +922,9 @@ type LogEntry struct { ...@@ -913,7 +922,9 @@ type LogEntry struct {
// log entry, then Stackdriver Logging assigns it the current // log entry, then Stackdriver Logging assigns it the current
// time.Incoming log entries should have timestamps that are no more // time.Incoming log entries should have timestamps that are no more
// than the logs retention period in the past, and no more than 24 hours // than the logs retention period in the past, and no more than 24 hours
// in the future. See the entries.write API method for more information. // in the future. Log entries outside those time boundaries will not be
// available when calling entries.list, but those log entries can still
// be exported with LogSinks.
Timestamp string `json:"timestamp,omitempty"` Timestamp string `json:"timestamp,omitempty"`
// Trace: Optional. Resource name of the trace associated with the log // Trace: Optional. Resource name of the trace associated with the log
...@@ -940,8 +951,8 @@ type LogEntry struct { ...@@ -940,8 +951,8 @@ type LogEntry struct {
} }
func (s *LogEntry) MarshalJSON() ([]byte, error) { func (s *LogEntry) MarshalJSON() ([]byte, error) {
type noMethod LogEntry type NoMethod LogEntry
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -983,8 +994,8 @@ type LogEntryOperation struct { ...@@ -983,8 +994,8 @@ type LogEntryOperation struct {
} }
func (s *LogEntryOperation) MarshalJSON() ([]byte, error) { func (s *LogEntryOperation) MarshalJSON() ([]byte, error) {
type noMethod LogEntryOperation type NoMethod LogEntryOperation
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -1025,8 +1036,8 @@ type LogEntrySourceLocation struct { ...@@ -1025,8 +1036,8 @@ type LogEntrySourceLocation struct {
} }
func (s *LogEntrySourceLocation) MarshalJSON() ([]byte, error) { func (s *LogEntrySourceLocation) MarshalJSON() ([]byte, error) {
type noMethod LogEntrySourceLocation type NoMethod LogEntrySourceLocation
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -1077,8 +1088,8 @@ type LogLine struct { ...@@ -1077,8 +1088,8 @@ type LogLine struct {
} }
func (s *LogLine) MarshalJSON() ([]byte, error) { func (s *LogLine) MarshalJSON() ([]byte, error) {
type noMethod LogLine type NoMethod LogLine
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -1198,8 +1209,8 @@ type LogMetric struct { ...@@ -1198,8 +1209,8 @@ type LogMetric struct {
} }
func (s *LogMetric) MarshalJSON() ([]byte, error) { func (s *LogMetric) MarshalJSON() ([]byte, error) {
type noMethod LogMetric type NoMethod LogMetric
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -1306,8 +1317,8 @@ type LogSink struct { ...@@ -1306,8 +1317,8 @@ type LogSink struct {
} }
func (s *LogSink) MarshalJSON() ([]byte, error) { func (s *LogSink) MarshalJSON() ([]byte, error) {
type noMethod LogSink type NoMethod LogSink
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -1321,7 +1332,9 @@ type MetricDescriptor struct { ...@@ -1321,7 +1332,9 @@ type MetricDescriptor struct {
// DisplayName: A concise name for the metric, which can be displayed in // DisplayName: A concise name for the metric, which can be displayed in
// user interfaces. Use sentence case without an ending period, for // user interfaces. Use sentence case without an ending period, for
// example "Request count". // example "Request count". This field is optional but it is recommended
// to be set for any metrics associated with user-visible concepts, such
// as Quota.
DisplayName string `json:"displayName,omitempty"` DisplayName string `json:"displayName,omitempty"`
// Labels: The set of labels that can be used to describe a specific // Labels: The set of labels that can be used to describe a specific
...@@ -1346,16 +1359,7 @@ type MetricDescriptor struct { ...@@ -1346,16 +1359,7 @@ type MetricDescriptor struct {
// zero and sets a new start time for the following points. // zero and sets a new start time for the following points.
MetricKind string `json:"metricKind,omitempty"` MetricKind string `json:"metricKind,omitempty"`
// Name: The resource name of the metric descriptor. Depending on the // Name: The resource name of the metric descriptor.
// implementation, the name typically includes: (1) the parent resource
// name that defines the scope of the metric type or of its data; and
// (2) the metric's URL-encoded type, which also appears in the type
// field of this descriptor. For example, following is the resource name
// of a custom metric within the GCP project
// my-project-id:
// "projects/my-project-id/metricDescriptors/custom.google
// apis.com%2Finvoice%2Fpaid%2Famount"
//
Name string `json:"name,omitempty"` Name string `json:"name,omitempty"`
// Type: The metric type, including its DNS name prefix. The type is not // Type: The metric type, including its DNS name prefix. The type is not
...@@ -1454,8 +1458,8 @@ type MetricDescriptor struct { ...@@ -1454,8 +1458,8 @@ type MetricDescriptor struct {
} }
func (s *MetricDescriptor) MarshalJSON() ([]byte, error) { func (s *MetricDescriptor) MarshalJSON() ([]byte, error) {
type noMethod MetricDescriptor type NoMethod MetricDescriptor
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -1502,8 +1506,8 @@ type MonitoredResource struct { ...@@ -1502,8 +1506,8 @@ type MonitoredResource struct {
} }
func (s *MonitoredResource) MarshalJSON() ([]byte, error) { func (s *MonitoredResource) MarshalJSON() ([]byte, error) {
type noMethod MonitoredResource type NoMethod MonitoredResource
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -1564,8 +1568,8 @@ type MonitoredResourceDescriptor struct { ...@@ -1564,8 +1568,8 @@ type MonitoredResourceDescriptor struct {
} }
func (s *MonitoredResourceDescriptor) MarshalJSON() ([]byte, error) { func (s *MonitoredResourceDescriptor) MarshalJSON() ([]byte, error) {
type noMethod MonitoredResourceDescriptor type NoMethod MonitoredResourceDescriptor
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -1711,18 +1715,18 @@ type RequestLog struct { ...@@ -1711,18 +1715,18 @@ type RequestLog struct {
} }
func (s *RequestLog) MarshalJSON() ([]byte, error) { func (s *RequestLog) MarshalJSON() ([]byte, error) {
type noMethod RequestLog type NoMethod RequestLog
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
func (s *RequestLog) UnmarshalJSON(data []byte) error { func (s *RequestLog) UnmarshalJSON(data []byte) error {
type noMethod RequestLog type NoMethod RequestLog
var s1 struct { var s1 struct {
Cost gensupport.JSONFloat64 `json:"cost"` Cost gensupport.JSONFloat64 `json:"cost"`
*noMethod *NoMethod
} }
s1.noMethod = (*noMethod)(s) s1.NoMethod = (*NoMethod)(s)
if err := json.Unmarshal(data, &s1); err != nil { if err := json.Unmarshal(data, &s1); err != nil {
return err return err
} }
...@@ -1765,8 +1769,8 @@ type SourceLocation struct { ...@@ -1765,8 +1769,8 @@ type SourceLocation struct {
} }
func (s *SourceLocation) MarshalJSON() ([]byte, error) { func (s *SourceLocation) MarshalJSON() ([]byte, error) {
type noMethod SourceLocation type NoMethod SourceLocation
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -1799,8 +1803,8 @@ type SourceReference struct { ...@@ -1799,8 +1803,8 @@ type SourceReference struct {
} }
func (s *SourceReference) MarshalJSON() ([]byte, error) { func (s *SourceReference) MarshalJSON() ([]byte, error) {
type noMethod SourceReference type NoMethod SourceReference
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -1818,11 +1822,12 @@ type WriteLogEntriesRequest struct { ...@@ -1818,11 +1822,12 @@ type WriteLogEntriesRequest struct {
// entries earlier in the list will sort before the entries later in the // entries earlier in the list will sort before the entries later in the
// list. See the entries.list method.Log entries with timestamps that // list. See the entries.list method.Log entries with timestamps that
// are more than the logs retention period in the past or more than 24 // are more than the logs retention period in the past or more than 24
// hours in the future might be discarded. Discarding does not return an // hours in the future will not be available when calling entries.list.
// error.To improve throughput and to avoid exceeding the quota limit // However, those log entries can still be exported with LogSinks.To
// for calls to entries.write, you should try to include several log // improve throughput and to avoid exceeding the quota limit for calls
// entries in this list, rather than calling this method for each // to entries.write, you should try to include several log entries in
// individual log entry. // this list, rather than calling this method for each individual log
// entry.
Entries []*LogEntry `json:"entries,omitempty"` Entries []*LogEntry `json:"entries,omitempty"`
// Labels: Optional. Default labels that are added to the labels field // Labels: Optional. Default labels that are added to the labels field
...@@ -1882,8 +1887,8 @@ type WriteLogEntriesRequest struct { ...@@ -1882,8 +1887,8 @@ type WriteLogEntriesRequest struct {
} }
func (s *WriteLogEntriesRequest) MarshalJSON() ([]byte, error) { func (s *WriteLogEntriesRequest) MarshalJSON() ([]byte, error) {
type noMethod WriteLogEntriesRequest type NoMethod WriteLogEntriesRequest
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -1989,7 +1994,7 @@ func (c *BillingAccountsLogsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty ...@@ -1989,7 +1994,7 @@ func (c *BillingAccountsLogsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -2149,7 +2154,7 @@ func (c *BillingAccountsLogsListCall) Do(opts ...googleapi.CallOption) (*ListLog ...@@ -2149,7 +2154,7 @@ func (c *BillingAccountsLogsListCall) Do(opts ...googleapi.CallOption) (*ListLog
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -2313,7 +2318,7 @@ func (c *EntriesListCall) Do(opts ...googleapi.CallOption) (*ListLogEntriesRespo ...@@ -2313,7 +2318,7 @@ func (c *EntriesListCall) Do(opts ...googleapi.CallOption) (*ListLogEntriesRespo
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -2461,7 +2466,7 @@ func (c *EntriesWriteCall) Do(opts ...googleapi.CallOption) (*WriteLogEntriesRes ...@@ -2461,7 +2466,7 @@ func (c *EntriesWriteCall) Do(opts ...googleapi.CallOption) (*WriteLogEntriesRes
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -2612,7 +2617,7 @@ func (c *MonitoredResourceDescriptorsListCall) Do(opts ...googleapi.CallOption) ...@@ -2612,7 +2617,7 @@ func (c *MonitoredResourceDescriptorsListCall) Do(opts ...googleapi.CallOption)
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -2765,7 +2770,7 @@ func (c *OrganizationsLogsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, ...@@ -2765,7 +2770,7 @@ func (c *OrganizationsLogsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty,
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -2925,7 +2930,7 @@ func (c *OrganizationsLogsListCall) Do(opts ...googleapi.CallOption) (*ListLogsR ...@@ -2925,7 +2930,7 @@ func (c *OrganizationsLogsListCall) Do(opts ...googleapi.CallOption) (*ListLogsR
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -3087,7 +3092,7 @@ func (c *ProjectsLogsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error ...@@ -3087,7 +3092,7 @@ func (c *ProjectsLogsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -3247,7 +3252,7 @@ func (c *ProjectsLogsListCall) Do(opts ...googleapi.CallOption) (*ListLogsRespon ...@@ -3247,7 +3252,7 @@ func (c *ProjectsLogsListCall) Do(opts ...googleapi.CallOption) (*ListLogsRespon
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -3414,7 +3419,7 @@ func (c *ProjectsMetricsCreateCall) Do(opts ...googleapi.CallOption) (*LogMetric ...@@ -3414,7 +3419,7 @@ func (c *ProjectsMetricsCreateCall) Do(opts ...googleapi.CallOption) (*LogMetric
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -3544,7 +3549,7 @@ func (c *ProjectsMetricsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, er ...@@ -3544,7 +3549,7 @@ func (c *ProjectsMetricsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, er
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -3685,7 +3690,7 @@ func (c *ProjectsMetricsGetCall) Do(opts ...googleapi.CallOption) (*LogMetric, e ...@@ -3685,7 +3690,7 @@ func (c *ProjectsMetricsGetCall) Do(opts ...googleapi.CallOption) (*LogMetric, e
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -3846,7 +3851,7 @@ func (c *ProjectsMetricsListCall) Do(opts ...googleapi.CallOption) (*ListLogMetr ...@@ -3846,7 +3851,7 @@ func (c *ProjectsMetricsListCall) Do(opts ...googleapi.CallOption) (*ListLogMetr
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -4013,7 +4018,7 @@ func (c *ProjectsMetricsUpdateCall) Do(opts ...googleapi.CallOption) (*LogMetric ...@@ -4013,7 +4018,7 @@ func (c *ProjectsMetricsUpdateCall) Do(opts ...googleapi.CallOption) (*LogMetric
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -4171,7 +4176,7 @@ func (c *ProjectsSinksCreateCall) Do(opts ...googleapi.CallOption) (*LogSink, er ...@@ -4171,7 +4176,7 @@ func (c *ProjectsSinksCreateCall) Do(opts ...googleapi.CallOption) (*LogSink, er
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -4306,7 +4311,7 @@ func (c *ProjectsSinksDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, erro ...@@ -4306,7 +4311,7 @@ func (c *ProjectsSinksDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, erro
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -4446,7 +4451,7 @@ func (c *ProjectsSinksGetCall) Do(opts ...googleapi.CallOption) (*LogSink, error ...@@ -4446,7 +4451,7 @@ func (c *ProjectsSinksGetCall) Do(opts ...googleapi.CallOption) (*LogSink, error
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -4607,7 +4612,7 @@ func (c *ProjectsSinksListCall) Do(opts ...googleapi.CallOption) (*ListSinksResp ...@@ -4607,7 +4612,7 @@ func (c *ProjectsSinksListCall) Do(opts ...googleapi.CallOption) (*ListSinksResp
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -4808,7 +4813,7 @@ func (c *ProjectsSinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogSink, er ...@@ -4808,7 +4813,7 @@ func (c *ProjectsSinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogSink, er
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -68,6 +68,7 @@ func New(client *http.Client) (*Service, error) { ...@@ -68,6 +68,7 @@ func New(client *http.Client) (*Service, error) {
} }
s := &Service{client: client, BasePath: basePath} s := &Service{client: client, BasePath: basePath}
s.Projects = NewProjectsService(s) s.Projects = NewProjectsService(s)
s.UptimeCheckIps = NewUptimeCheckIpsService(s)
return s, nil return s, nil
} }
...@@ -77,6 +78,8 @@ type Service struct { ...@@ -77,6 +78,8 @@ type Service struct {
UserAgent string // optional additional User-Agent fragment UserAgent string // optional additional User-Agent fragment
Projects *ProjectsService Projects *ProjectsService
UptimeCheckIps *UptimeCheckIpsService
} }
func (s *Service) userAgent() string { func (s *Service) userAgent() string {
...@@ -93,6 +96,7 @@ func NewProjectsService(s *Service) *ProjectsService { ...@@ -93,6 +96,7 @@ func NewProjectsService(s *Service) *ProjectsService {
rs.MetricDescriptors = NewProjectsMetricDescriptorsService(s) rs.MetricDescriptors = NewProjectsMetricDescriptorsService(s)
rs.MonitoredResourceDescriptors = NewProjectsMonitoredResourceDescriptorsService(s) rs.MonitoredResourceDescriptors = NewProjectsMonitoredResourceDescriptorsService(s)
rs.TimeSeries = NewProjectsTimeSeriesService(s) rs.TimeSeries = NewProjectsTimeSeriesService(s)
rs.UptimeCheckConfigs = NewProjectsUptimeCheckConfigsService(s)
return rs return rs
} }
...@@ -108,6 +112,8 @@ type ProjectsService struct { ...@@ -108,6 +112,8 @@ type ProjectsService struct {
MonitoredResourceDescriptors *ProjectsMonitoredResourceDescriptorsService MonitoredResourceDescriptors *ProjectsMonitoredResourceDescriptorsService
TimeSeries *ProjectsTimeSeriesService TimeSeries *ProjectsTimeSeriesService
UptimeCheckConfigs *ProjectsUptimeCheckConfigsService
} }
func NewProjectsCollectdTimeSeriesService(s *Service) *ProjectsCollectdTimeSeriesService { func NewProjectsCollectdTimeSeriesService(s *Service) *ProjectsCollectdTimeSeriesService {
...@@ -167,6 +173,57 @@ type ProjectsTimeSeriesService struct { ...@@ -167,6 +173,57 @@ type ProjectsTimeSeriesService struct {
s *Service s *Service
} }
func NewProjectsUptimeCheckConfigsService(s *Service) *ProjectsUptimeCheckConfigsService {
rs := &ProjectsUptimeCheckConfigsService{s: s}
return rs
}
type ProjectsUptimeCheckConfigsService struct {
s *Service
}
func NewUptimeCheckIpsService(s *Service) *UptimeCheckIpsService {
rs := &UptimeCheckIpsService{s: s}
return rs
}
type UptimeCheckIpsService struct {
s *Service
}
// BasicAuthentication: A type of authentication to perform against the
// specified resource or URL that uses username and password. Currently,
// only Basic authentication is supported in Uptime Monitoring.
type BasicAuthentication struct {
// Password: The password to authenticate.
Password string `json:"password,omitempty"`
// Username: The username to authenticate.
Username string `json:"username,omitempty"`
// ForceSendFields is a list of field names (e.g. "Password") 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. "Password") 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 *BasicAuthentication) MarshalJSON() ([]byte, error) {
type NoMethod BasicAuthentication
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// BucketOptions: BucketOptions describes the bucket boundaries used to // BucketOptions: BucketOptions describes the bucket boundaries used to
// create a histogram for the distribution. The buckets can be in a // create a histogram for the distribution. The buckets can be in a
// linear sequence, an exponential sequence, or each bucket can be // linear sequence, an exponential sequence, or each bucket can be
...@@ -211,8 +268,8 @@ type BucketOptions struct { ...@@ -211,8 +268,8 @@ type BucketOptions struct {
} }
func (s *BucketOptions) MarshalJSON() ([]byte, error) { func (s *BucketOptions) MarshalJSON() ([]byte, error) {
type noMethod BucketOptions type NoMethod BucketOptions
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -263,8 +320,8 @@ type CollectdPayload struct { ...@@ -263,8 +320,8 @@ type CollectdPayload struct {
} }
func (s *CollectdPayload) MarshalJSON() ([]byte, error) { func (s *CollectdPayload) MarshalJSON() ([]byte, error) {
type noMethod CollectdPayload type NoMethod CollectdPayload
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -302,8 +359,8 @@ type CollectdPayloadError struct { ...@@ -302,8 +359,8 @@ type CollectdPayloadError struct {
} }
func (s *CollectdPayloadError) MarshalJSON() ([]byte, error) { func (s *CollectdPayloadError) MarshalJSON() ([]byte, error) {
type noMethod CollectdPayloadError type NoMethod CollectdPayloadError
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -351,8 +408,8 @@ type CollectdValue struct { ...@@ -351,8 +408,8 @@ type CollectdValue struct {
} }
func (s *CollectdValue) MarshalJSON() ([]byte, error) { func (s *CollectdValue) MarshalJSON() ([]byte, error) {
type noMethod CollectdValue type NoMethod CollectdValue
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -384,8 +441,38 @@ type CollectdValueError struct { ...@@ -384,8 +441,38 @@ type CollectdValueError struct {
} }
func (s *CollectdValueError) MarshalJSON() ([]byte, error) { func (s *CollectdValueError) MarshalJSON() ([]byte, error) {
type noMethod CollectdValueError type NoMethod CollectdValueError
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ContentMatcher: Used to perform string matching. Currently, this
// matches on the exact content. In the future, it can be expanded to
// allow for regular expressions and more complex matching.
type ContentMatcher struct {
// Content: String content to match
Content string `json:"content,omitempty"`
// ForceSendFields is a list of field names (e.g. "Content") 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. "Content") 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 *ContentMatcher) MarshalJSON() ([]byte, error) {
type NoMethod ContentMatcher
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -424,8 +511,8 @@ type CreateCollectdTimeSeriesRequest struct { ...@@ -424,8 +511,8 @@ type CreateCollectdTimeSeriesRequest struct {
} }
func (s *CreateCollectdTimeSeriesRequest) MarshalJSON() ([]byte, error) { func (s *CreateCollectdTimeSeriesRequest) MarshalJSON() ([]byte, error) {
type noMethod CreateCollectdTimeSeriesRequest type NoMethod CreateCollectdTimeSeriesRequest
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -459,8 +546,8 @@ type CreateCollectdTimeSeriesResponse struct { ...@@ -459,8 +546,8 @@ type CreateCollectdTimeSeriesResponse struct {
} }
func (s *CreateCollectdTimeSeriesResponse) MarshalJSON() ([]byte, error) { func (s *CreateCollectdTimeSeriesResponse) MarshalJSON() ([]byte, error) {
type noMethod CreateCollectdTimeSeriesResponse type NoMethod CreateCollectdTimeSeriesResponse
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -491,8 +578,8 @@ type CreateTimeSeriesRequest struct { ...@@ -491,8 +578,8 @@ type CreateTimeSeriesRequest struct {
} }
func (s *CreateTimeSeriesRequest) MarshalJSON() ([]byte, error) { func (s *CreateTimeSeriesRequest) MarshalJSON() ([]byte, error) {
type noMethod CreateTimeSeriesRequest type NoMethod CreateTimeSeriesRequest
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -565,19 +652,19 @@ type Distribution struct { ...@@ -565,19 +652,19 @@ type Distribution struct {
} }
func (s *Distribution) MarshalJSON() ([]byte, error) { func (s *Distribution) MarshalJSON() ([]byte, error) {
type noMethod Distribution type NoMethod Distribution
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
func (s *Distribution) UnmarshalJSON(data []byte) error { func (s *Distribution) UnmarshalJSON(data []byte) error {
type noMethod Distribution type NoMethod Distribution
var s1 struct { var s1 struct {
Mean gensupport.JSONFloat64 `json:"mean"` Mean gensupport.JSONFloat64 `json:"mean"`
SumOfSquaredDeviation gensupport.JSONFloat64 `json:"sumOfSquaredDeviation"` SumOfSquaredDeviation gensupport.JSONFloat64 `json:"sumOfSquaredDeviation"`
*noMethod *NoMethod
} }
s1.noMethod = (*noMethod)(s) s1.NoMethod = (*NoMethod)(s)
if err := json.Unmarshal(data, &s1); err != nil { if err := json.Unmarshal(data, &s1); err != nil {
return err return err
} }
...@@ -630,8 +717,8 @@ type Explicit struct { ...@@ -630,8 +717,8 @@ type Explicit struct {
} }
func (s *Explicit) MarshalJSON() ([]byte, error) { func (s *Explicit) MarshalJSON() ([]byte, error) {
type noMethod Explicit type NoMethod Explicit
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -670,19 +757,19 @@ type Exponential struct { ...@@ -670,19 +757,19 @@ type Exponential struct {
} }
func (s *Exponential) MarshalJSON() ([]byte, error) { func (s *Exponential) MarshalJSON() ([]byte, error) {
type noMethod Exponential type NoMethod Exponential
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
func (s *Exponential) UnmarshalJSON(data []byte) error { func (s *Exponential) UnmarshalJSON(data []byte) error {
type noMethod Exponential type NoMethod Exponential
var s1 struct { var s1 struct {
GrowthFactor gensupport.JSONFloat64 `json:"growthFactor"` GrowthFactor gensupport.JSONFloat64 `json:"growthFactor"`
Scale gensupport.JSONFloat64 `json:"scale"` Scale gensupport.JSONFloat64 `json:"scale"`
*noMethod *NoMethod
} }
s1.noMethod = (*noMethod)(s) s1.NoMethod = (*NoMethod)(s)
if err := json.Unmarshal(data, &s1); err != nil { if err := json.Unmarshal(data, &s1); err != nil {
return err return err
} }
...@@ -774,8 +861,8 @@ type Field struct { ...@@ -774,8 +861,8 @@ type Field struct {
} }
func (s *Field) MarshalJSON() ([]byte, error) { func (s *Field) MarshalJSON() ([]byte, error) {
type noMethod Field type NoMethod Field
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -850,8 +937,112 @@ type Group struct { ...@@ -850,8 +937,112 @@ type Group struct {
} }
func (s *Group) MarshalJSON() ([]byte, error) { func (s *Group) MarshalJSON() ([]byte, error) {
type noMethod Group type NoMethod Group
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// HttpCheck: Information involved in an HTTP/HTTPS uptime check
// request.
type HttpCheck struct {
// AuthInfo: The authentication information. Optional when creating an
// HTTP check; defaults to empty.
AuthInfo *BasicAuthentication `json:"authInfo,omitempty"`
// Headers: The list of headers to send as part of the uptime check
// request. If two headers have the same key and different values, they
// should be entered as a single header, with the value being a
// comma-separated list of all the desired values as described at
// https://www.w3.org/Protocols/rfc2616/rfc2616.txt (page 31). Entering
// two separate headers with the same key in a Create call will cause
// the first to be overwritten by the second.
Headers map[string]string `json:"headers,omitempty"`
// MaskHeaders: Boolean specifiying whether to encrypt the header
// information. Encryption should be specified for any headers related
// to authentication that you do not wish to be seen when retrieving the
// configuration. The server will be responsible for encrypting the
// headers. On Get/List calls, if mask_headers is set to True then the
// headers will be obscured with ******.
MaskHeaders bool `json:"maskHeaders,omitempty"`
// Path: The path to the page to run the check against. Will be combined
// with the host (specified within the MonitoredResource) and port to
// construct the full URL. Optional (defaults to "/").
Path string `json:"path,omitempty"`
// Port: The port to the page to run the check against. Will be combined
// with host (specified within the MonitoredResource) and path to
// construct the full URL. Optional (defaults to 80 without SSL, or 443
// with SSL).
Port int64 `json:"port,omitempty"`
// UseSsl: If true, use HTTPS instead of HTTP to run the check.
UseSsl bool `json:"useSsl,omitempty"`
// ForceSendFields is a list of field names (e.g. "AuthInfo") 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. "AuthInfo") 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 *HttpCheck) MarshalJSON() ([]byte, error) {
type NoMethod HttpCheck
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// InternalChecker: Nimbus InternalCheckers.
type InternalChecker struct {
// CheckerId: The checker ID.
CheckerId string `json:"checkerId,omitempty"`
// DisplayName: The checker's human-readable name.
DisplayName string `json:"displayName,omitempty"`
// GcpZone: The GCP zone the uptime check should egress from. Only
// respected for internal uptime checks, where internal_network is
// specified.
GcpZone string `json:"gcpZone,omitempty"`
// Network: The internal network to perform this uptime check on.
Network string `json:"network,omitempty"`
// ProjectId: The GCP project ID. Not necessarily the same as the
// project_id for the config.
ProjectId string `json:"projectId,omitempty"`
// ForceSendFields is a list of field names (e.g. "CheckerId") 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. "CheckerId") 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 *InternalChecker) MarshalJSON() ([]byte, error) {
type NoMethod InternalChecker
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -889,8 +1080,8 @@ type LabelDescriptor struct { ...@@ -889,8 +1080,8 @@ type LabelDescriptor struct {
} }
func (s *LabelDescriptor) MarshalJSON() ([]byte, error) { func (s *LabelDescriptor) MarshalJSON() ([]byte, error) {
type noMethod LabelDescriptor type NoMethod LabelDescriptor
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -929,19 +1120,19 @@ type Linear struct { ...@@ -929,19 +1120,19 @@ type Linear struct {
} }
func (s *Linear) MarshalJSON() ([]byte, error) { func (s *Linear) MarshalJSON() ([]byte, error) {
type noMethod Linear type NoMethod Linear
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
func (s *Linear) UnmarshalJSON(data []byte) error { func (s *Linear) UnmarshalJSON(data []byte) error {
type noMethod Linear type NoMethod Linear
var s1 struct { var s1 struct {
Offset gensupport.JSONFloat64 `json:"offset"` Offset gensupport.JSONFloat64 `json:"offset"`
Width gensupport.JSONFloat64 `json:"width"` Width gensupport.JSONFloat64 `json:"width"`
*noMethod *NoMethod
} }
s1.noMethod = (*noMethod)(s) s1.NoMethod = (*NoMethod)(s)
if err := json.Unmarshal(data, &s1); err != nil { if err := json.Unmarshal(data, &s1); err != nil {
return err return err
} }
...@@ -985,8 +1176,8 @@ type ListGroupMembersResponse struct { ...@@ -985,8 +1176,8 @@ type ListGroupMembersResponse struct {
} }
func (s *ListGroupMembersResponse) MarshalJSON() ([]byte, error) { func (s *ListGroupMembersResponse) MarshalJSON() ([]byte, error) {
type noMethod ListGroupMembersResponse type NoMethod ListGroupMembersResponse
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -1022,8 +1213,8 @@ type ListGroupsResponse struct { ...@@ -1022,8 +1213,8 @@ type ListGroupsResponse struct {
} }
func (s *ListGroupsResponse) MarshalJSON() ([]byte, error) { func (s *ListGroupsResponse) MarshalJSON() ([]byte, error) {
type noMethod ListGroupsResponse type NoMethod ListGroupsResponse
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -1061,8 +1252,8 @@ type ListMetricDescriptorsResponse struct { ...@@ -1061,8 +1252,8 @@ type ListMetricDescriptorsResponse struct {
} }
func (s *ListMetricDescriptorsResponse) MarshalJSON() ([]byte, error) { func (s *ListMetricDescriptorsResponse) MarshalJSON() ([]byte, error) {
type noMethod ListMetricDescriptorsResponse type NoMethod ListMetricDescriptorsResponse
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -1100,8 +1291,8 @@ type ListMonitoredResourceDescriptorsResponse struct { ...@@ -1100,8 +1291,8 @@ type ListMonitoredResourceDescriptorsResponse struct {
} }
func (s *ListMonitoredResourceDescriptorsResponse) MarshalJSON() ([]byte, error) { func (s *ListMonitoredResourceDescriptorsResponse) MarshalJSON() ([]byte, error) {
type noMethod ListMonitoredResourceDescriptorsResponse type NoMethod ListMonitoredResourceDescriptorsResponse
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -1138,8 +1329,90 @@ type ListTimeSeriesResponse struct { ...@@ -1138,8 +1329,90 @@ type ListTimeSeriesResponse struct {
} }
func (s *ListTimeSeriesResponse) MarshalJSON() ([]byte, error) { func (s *ListTimeSeriesResponse) MarshalJSON() ([]byte, error) {
type noMethod ListTimeSeriesResponse type NoMethod ListTimeSeriesResponse
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ListUptimeCheckConfigsResponse: The protocol for the
// ListUptimeCheckConfigs response.
type ListUptimeCheckConfigsResponse struct {
// NextPageToken: This field represents the pagination token to retrieve
// the next page of results. If the value is empty, it means no further
// results for the request. To retrieve the next page of results, the
// value of the next_page_token is passed to the subsequent List method
// call (in the request message's page_token field).
NextPageToken string `json:"nextPageToken,omitempty"`
// UptimeCheckConfigs: The returned uptime check configurations.
UptimeCheckConfigs []*UptimeCheckConfig `json:"uptimeCheckConfigs,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "NextPageToken") 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. "NextPageToken") 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 *ListUptimeCheckConfigsResponse) MarshalJSON() ([]byte, error) {
type NoMethod ListUptimeCheckConfigsResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ListUptimeCheckIpsResponse: The protocol for the ListUptimeCheckIps
// response.
type ListUptimeCheckIpsResponse struct {
// NextPageToken: This field represents the pagination token to retrieve
// the next page of results. If the value is empty, it means no further
// results for the request. To retrieve the next page of results, the
// value of the next_page_token is passed to the subsequent List method
// call (in the request message's page_token field). NOTE: this field is
// not yet implemented
NextPageToken string `json:"nextPageToken,omitempty"`
// UptimeCheckIps: The returned list of IP addresses (including region
// and location) that the checkers run from.
UptimeCheckIps []*UptimeCheckIp `json:"uptimeCheckIps,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "NextPageToken") 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. "NextPageToken") 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 *ListUptimeCheckIpsResponse) MarshalJSON() ([]byte, error) {
type NoMethod ListUptimeCheckIpsResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -1172,8 +1445,8 @@ type Metric struct { ...@@ -1172,8 +1445,8 @@ type Metric struct {
} }
func (s *Metric) MarshalJSON() ([]byte, error) { func (s *Metric) MarshalJSON() ([]byte, error) {
type noMethod Metric type NoMethod Metric
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -1187,7 +1460,9 @@ type MetricDescriptor struct { ...@@ -1187,7 +1460,9 @@ type MetricDescriptor struct {
// DisplayName: A concise name for the metric, which can be displayed in // DisplayName: A concise name for the metric, which can be displayed in
// user interfaces. Use sentence case without an ending period, for // user interfaces. Use sentence case without an ending period, for
// example "Request count". // example "Request count". This field is optional but it is recommended
// to be set for any metrics associated with user-visible concepts, such
// as Quota.
DisplayName string `json:"displayName,omitempty"` DisplayName string `json:"displayName,omitempty"`
// Labels: The set of labels that can be used to describe a specific // Labels: The set of labels that can be used to describe a specific
...@@ -1212,16 +1487,7 @@ type MetricDescriptor struct { ...@@ -1212,16 +1487,7 @@ type MetricDescriptor struct {
// zero and sets a new start time for the following points. // zero and sets a new start time for the following points.
MetricKind string `json:"metricKind,omitempty"` MetricKind string `json:"metricKind,omitempty"`
// Name: The resource name of the metric descriptor. Depending on the // Name: The resource name of the metric descriptor.
// implementation, the name typically includes: (1) the parent resource
// name that defines the scope of the metric type or of its data; and
// (2) the metric's URL-encoded type, which also appears in the type
// field of this descriptor. For example, following is the resource name
// of a custom metric within the GCP project
// my-project-id:
// "projects/my-project-id/metricDescriptors/custom.google
// apis.com%2Finvoice%2Fpaid%2Famount"
//
Name string `json:"name,omitempty"` Name string `json:"name,omitempty"`
// Type: The metric type, including its DNS name prefix. The type is not // Type: The metric type, including its DNS name prefix. The type is not
...@@ -1235,55 +1501,12 @@ type MetricDescriptor struct { ...@@ -1235,55 +1501,12 @@ type MetricDescriptor struct {
// //
Type string `json:"type,omitempty"` Type string `json:"type,omitempty"`
// Unit: The unit in which the metric value is reported. It is only // Unit: Optional. The unit in which the metric value is reported. For
// applicable if the value_type is INT64, DOUBLE, or DISTRIBUTION. The // example, kBy/s means kilobytes/sec, and 1 is the dimensionless unit.
// supported units are a subset of The Unified Code for Units of Measure // The supported units are a subset of The Unified Code for Units of
// (http://unitsofmeasure.org/ucum.html) standard:Basic units (UNIT) // Measure standard (http://unitsofmeasure.org/ucum.html).<br><br> This
// bit bit // field is part of the metric's documentation, but it is ignored by
// By byte // Stackdriver.
// s second
// min minute
// h hour
// d dayPrefixes (PREFIX)
// k kilo (10**3)
// M mega (10**6)
// G giga (10**9)
// T tera (10**12)
// P peta (10**15)
// E exa (10**18)
// Z zetta (10**21)
// Y yotta (10**24)
// m milli (10**-3)
// u micro (10**-6)
// n nano (10**-9)
// p pico (10**-12)
// f femto (10**-15)
// a atto (10**-18)
// z zepto (10**-21)
// y yocto (10**-24)
// Ki kibi (2**10)
// Mi mebi (2**20)
// Gi gibi (2**30)
// Ti tebi (2**40)GrammarThe grammar includes the dimensionless unit 1,
// such as 1/s.The grammar also includes these connectors:
// / division (as an infix operator, e.g. 1/s).
// . multiplication (as an infix operator, e.g. GBy.d)The grammar for a
// unit is as follows:
// Expression = Component { "." Component } { "/" Component }
// ;
//
// Component = [ PREFIX ] UNIT [ Annotation ]
// | Annotation
// | "1"
// ;
//
// Annotation = "{" NAME "}" ;
// Notes:
// Annotation is just a comment if it follows a UNIT and is equivalent
// to 1 if it is used alone. For examples, {requests}/s == 1/s,
// By{transmitted}/s == By/s.
// NAME is a sequence of non-blank printable ASCII characters not
// containing '{' or '}'.
Unit string `json:"unit,omitempty"` Unit string `json:"unit,omitempty"`
// ValueType: Whether the measurement is an integer, a floating-point // ValueType: Whether the measurement is an integer, a floating-point
...@@ -1324,8 +1547,8 @@ type MetricDescriptor struct { ...@@ -1324,8 +1547,8 @@ type MetricDescriptor struct {
} }
func (s *MetricDescriptor) MarshalJSON() ([]byte, error) { func (s *MetricDescriptor) MarshalJSON() ([]byte, error) {
type noMethod MetricDescriptor type NoMethod MetricDescriptor
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -1372,8 +1595,8 @@ type MonitoredResource struct { ...@@ -1372,8 +1595,8 @@ type MonitoredResource struct {
} }
func (s *MonitoredResource) MarshalJSON() ([]byte, error) { func (s *MonitoredResource) MarshalJSON() ([]byte, error) {
type noMethod MonitoredResource type NoMethod MonitoredResource
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -1438,8 +1661,54 @@ type MonitoredResourceDescriptor struct { ...@@ -1438,8 +1661,54 @@ type MonitoredResourceDescriptor struct {
} }
func (s *MonitoredResourceDescriptor) MarshalJSON() ([]byte, error) { func (s *MonitoredResourceDescriptor) MarshalJSON() ([]byte, error) {
type noMethod MonitoredResourceDescriptor type NoMethod MonitoredResourceDescriptor
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// MonitoredResourceMetadata: Auxiliary metadata for a MonitoredResource
// object. MonitoredResource objects contain the minimum set of
// information to uniquely identify a monitored resource instance. There
// is some other useful auxiliary metadata. Google Stackdriver
// Monitoring & Logging uses an ingestion pipeline to extract metadata
// for cloud resources of all types , and stores the metadata in this
// message.
type MonitoredResourceMetadata struct {
// SystemLabels: Output only. Values for predefined system metadata
// labels. System labels are a kind of metadata extracted by Google
// Stackdriver. Stackdriver determines what system labels are useful and
// how to obtain their values. Some examples: "machine_image", "vpc",
// "subnet_id", "security_group", "name", etc. System label values can
// be only strings, Boolean values, or a list of strings. For example:
// { "name": "my-test-instance",
// "security_group": ["a", "b", "c"],
// "spot_instance": false }
//
SystemLabels googleapi.RawMessage `json:"systemLabels,omitempty"`
// UserLabels: Output only. A map of user-defined metadata labels.
UserLabels map[string]string `json:"userLabels,omitempty"`
// ForceSendFields is a list of field names (e.g. "SystemLabels") 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. "SystemLabels") 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 *MonitoredResourceMetadata) MarshalJSON() ([]byte, error) {
type NoMethod MonitoredResourceMetadata
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -1477,8 +1746,8 @@ type Option struct { ...@@ -1477,8 +1746,8 @@ type Option struct {
} }
func (s *Option) MarshalJSON() ([]byte, error) { func (s *Option) MarshalJSON() ([]byte, error) {
type noMethod Option type NoMethod Option
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -1516,8 +1785,8 @@ type Point struct { ...@@ -1516,8 +1785,8 @@ type Point struct {
} }
func (s *Point) MarshalJSON() ([]byte, error) { func (s *Point) MarshalJSON() ([]byte, error) {
type noMethod Point type NoMethod Point
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -1547,19 +1816,19 @@ type Range struct { ...@@ -1547,19 +1816,19 @@ type Range struct {
} }
func (s *Range) MarshalJSON() ([]byte, error) { func (s *Range) MarshalJSON() ([]byte, error) {
type noMethod Range type NoMethod Range
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
func (s *Range) UnmarshalJSON(data []byte) error { func (s *Range) UnmarshalJSON(data []byte) error {
type noMethod Range type NoMethod Range
var s1 struct { var s1 struct {
Max gensupport.JSONFloat64 `json:"max"` Max gensupport.JSONFloat64 `json:"max"`
Min gensupport.JSONFloat64 `json:"min"` Min gensupport.JSONFloat64 `json:"min"`
*noMethod *NoMethod
} }
s1.noMethod = (*noMethod)(s) s1.NoMethod = (*NoMethod)(s)
if err := json.Unmarshal(data, &s1); err != nil { if err := json.Unmarshal(data, &s1); err != nil {
return err return err
} }
...@@ -1568,6 +1837,46 @@ func (s *Range) UnmarshalJSON(data []byte) error { ...@@ -1568,6 +1837,46 @@ func (s *Range) UnmarshalJSON(data []byte) error {
return nil return nil
} }
// ResourceGroup: The resource submessage for group checks. It can be
// used instead of a monitored resource, when multiple resources are
// being monitored.
type ResourceGroup struct {
// GroupId: The group of resources being monitored. Should be only the
// group_id, not projects/<project_id>/groups/<group_id>.
GroupId string `json:"groupId,omitempty"`
// ResourceType: The resource type of the group members.
//
// Possible values:
// "RESOURCE_TYPE_UNSPECIFIED" - Default value (not valid).
// "INSTANCE" - A group of instances from Google Cloud Platform (GCP)
// or Amazon Web Services (AWS).
// "AWS_ELB_LOAD_BALANCER" - A group of AWS load balancers.
ResourceType string `json:"resourceType,omitempty"`
// ForceSendFields is a list of field names (e.g. "GroupId") 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. "GroupId") 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 *ResourceGroup) MarshalJSON() ([]byte, error) {
type NoMethod ResourceGroup
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// SourceContext: SourceContext represents information about the source // SourceContext: SourceContext represents information about the source
// of a protobuf element, like the file in which it is defined. // of a protobuf element, like the file in which it is defined.
type SourceContext struct { type SourceContext struct {
...@@ -1594,8 +1903,8 @@ type SourceContext struct { ...@@ -1594,8 +1903,8 @@ type SourceContext struct {
} }
func (s *SourceContext) MarshalJSON() ([]byte, error) { func (s *SourceContext) MarshalJSON() ([]byte, error) {
type noMethod SourceContext type NoMethod SourceContext
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -1670,8 +1979,38 @@ type Status struct { ...@@ -1670,8 +1979,38 @@ type Status struct {
} }
func (s *Status) MarshalJSON() ([]byte, error) { func (s *Status) MarshalJSON() ([]byte, error) {
type noMethod Status type NoMethod Status
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// TcpCheck: Information required for a TCP uptime check request.
type TcpCheck struct {
// Port: The port to the page to run the check against. Will be combined
// with host (specified within the MonitoredResource) to construct the
// full URL. Required.
Port int64 `json:"port,omitempty"`
// ForceSendFields is a list of field names (e.g. "Port") 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. "Port") 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 *TcpCheck) MarshalJSON() ([]byte, error) {
type NoMethod TcpCheck
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -1705,8 +2044,8 @@ type TimeInterval struct { ...@@ -1705,8 +2044,8 @@ type TimeInterval struct {
} }
func (s *TimeInterval) MarshalJSON() ([]byte, error) { func (s *TimeInterval) MarshalJSON() ([]byte, error) {
type noMethod TimeInterval type NoMethod TimeInterval
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -1716,6 +2055,12 @@ func (s *TimeInterval) MarshalJSON() ([]byte, error) { ...@@ -1716,6 +2055,12 @@ func (s *TimeInterval) MarshalJSON() ([]byte, error) {
// fully-specified metric. This type is used for both listing and // fully-specified metric. This type is used for both listing and
// creating time series. // creating time series.
type TimeSeries struct { type TimeSeries struct {
// Metadata: Output only. The associated monitored resource metadata.
// When reading a a timeseries, this field will include metadata labels
// that are explicitly named in the reduction. When creating a
// timeseries, this field is ignored.
Metadata *MonitoredResourceMetadata `json:"metadata,omitempty"`
// Metric: The associated metric. A fully-specified metric used to // Metric: The associated metric. A fully-specified metric used to
// identify the time series. // identify the time series.
Metric *Metric `json:"metric,omitempty"` Metric *Metric `json:"metric,omitempty"`
...@@ -1771,7 +2116,7 @@ type TimeSeries struct { ...@@ -1771,7 +2116,7 @@ type TimeSeries struct {
// "MONEY" - The value is money. // "MONEY" - The value is money.
ValueType string `json:"valueType,omitempty"` ValueType string `json:"valueType,omitempty"`
// ForceSendFields is a list of field names (e.g. "Metric") to // ForceSendFields is a list of field names (e.g. "Metadata") to
// unconditionally include in API requests. By default, fields with // unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer, // empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the // non-interface field appearing in ForceSendFields will be sent to the
...@@ -1779,8 +2124,8 @@ type TimeSeries struct { ...@@ -1779,8 +2124,8 @@ type TimeSeries struct {
// used to include empty fields in Patch requests. // used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"` ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Metric") to include in API // NullFields is a list of field names (e.g. "Metadata") to include in
// requests with the JSON null value. By default, fields with empty // API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an // values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as // 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. // null. It is an error if a field in this list has a non-empty value.
...@@ -1789,8 +2134,8 @@ type TimeSeries struct { ...@@ -1789,8 +2134,8 @@ type TimeSeries struct {
} }
func (s *TimeSeries) MarshalJSON() ([]byte, error) { func (s *TimeSeries) MarshalJSON() ([]byte, error) {
type noMethod TimeSeries type NoMethod TimeSeries
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -1837,8 +2182,8 @@ type Type struct { ...@@ -1837,8 +2182,8 @@ type Type struct {
} }
func (s *Type) MarshalJSON() ([]byte, error) { func (s *Type) MarshalJSON() ([]byte, error) {
type noMethod Type type NoMethod Type
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
...@@ -1880,18 +2225,18 @@ type TypedValue struct { ...@@ -1880,18 +2225,18 @@ type TypedValue struct {
} }
func (s *TypedValue) MarshalJSON() ([]byte, error) { func (s *TypedValue) MarshalJSON() ([]byte, error) {
type noMethod TypedValue type NoMethod TypedValue
raw := noMethod(*s) raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
func (s *TypedValue) UnmarshalJSON(data []byte) error { func (s *TypedValue) UnmarshalJSON(data []byte) error {
type noMethod TypedValue type NoMethod TypedValue
var s1 struct { var s1 struct {
DoubleValue *gensupport.JSONFloat64 `json:"doubleValue"` DoubleValue *gensupport.JSONFloat64 `json:"doubleValue"`
*noMethod *NoMethod
} }
s1.noMethod = (*noMethod)(s) s1.NoMethod = (*NoMethod)(s)
if err := json.Unmarshal(data, &s1); err != nil { if err := json.Unmarshal(data, &s1); err != nil {
return err return err
} }
...@@ -1901,43 +2246,200 @@ func (s *TypedValue) UnmarshalJSON(data []byte) error { ...@@ -1901,43 +2246,200 @@ func (s *TypedValue) UnmarshalJSON(data []byte) error {
return nil return nil
} }
// method id "monitoring.projects.collectdTimeSeries.create": // UptimeCheckConfig: This message configures which resources and
// services to monitor for availability.
type UptimeCheckConfig struct {
// ContentMatchers: The expected content on the page the check is run
// against. Currently, only the first entry in the list is supported,
// and other entries will be ignored. The server will look for an exact
// match of the string in the page response's content. This field is
// optional and should only be specified if a content match is required.
ContentMatchers []*ContentMatcher `json:"contentMatchers,omitempty"`
// DisplayName: A human-friendly name for the uptime check
// configuration. The display name should be unique within a Stackdriver
// Account in order to make it easier to identify; however, uniqueness
// is not enforced. Required.
DisplayName string `json:"displayName,omitempty"`
type ProjectsCollectdTimeSeriesCreateCall struct { // HttpCheck: Contains information needed to make an HTTP or HTTPS
s *Service // check.
name string HttpCheck *HttpCheck `json:"httpCheck,omitempty"`
createcollectdtimeseriesrequest *CreateCollectdTimeSeriesRequest
urlParams_ gensupport.URLParams // InternalCheckers: The internal checkers that this check will egress
ctx_ context.Context // from. If is_internal is true and this list is empty, the check will
header_ http.Header // egress from all InternalCheckers configured for the project that owns
} // this CheckConfig.
InternalCheckers []*InternalChecker `json:"internalCheckers,omitempty"`
// IsInternal: Denotes whether this is a check that egresses from
// InternalCheckers.
IsInternal bool `json:"isInternal,omitempty"`
// MonitoredResource: The monitored resource associated with the
// configuration.
MonitoredResource *MonitoredResource `json:"monitoredResource,omitempty"`
// Name: A unique resource name for this UptimeCheckConfig. The format
// is:projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID].This
// field should be omitted when creating the uptime check configuration;
// on create, the resource name is assigned by the server and included
// in the response.
Name string `json:"name,omitempty"`
// Create: Stackdriver Monitoring Agent only: Creates a new time // Period: How often the uptime check is performed. Currently, only 1,
// series.<aside class="caution">This method is only for use by the // 5, 10, and 15 minutes are supported. Required.
// Stackdriver Monitoring Agent. Use projects.timeSeries.create Period string `json:"period,omitempty"`
// instead.</aside>
func (r *ProjectsCollectdTimeSeriesService) Create(name string, createcollectdtimeseriesrequest *CreateCollectdTimeSeriesRequest) *ProjectsCollectdTimeSeriesCreateCall {
c := &ProjectsCollectdTimeSeriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.name = name
c.createcollectdtimeseriesrequest = createcollectdtimeseriesrequest
return c
}
// Fields allows partial responses to be retrieved. See // ResourceGroup: The group resource associated with the configuration.
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse ResourceGroup *ResourceGroup `json:"resourceGroup,omitempty"`
// for more information.
func (c *ProjectsCollectdTimeSeriesCreateCall) Fields(s ...googleapi.Field) *ProjectsCollectdTimeSeriesCreateCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// Context sets the context to be used in this call's Do method. Any // SelectedRegions: The list of regions from which the check will be
// pending HTTP request will be aborted if the provided context is // run. If this field is specified, enough regions to include a minimum
// canceled. // of 3 locations must be provided, or an error message is returned. Not
func (c *ProjectsCollectdTimeSeriesCreateCall) Context(ctx context.Context) *ProjectsCollectdTimeSeriesCreateCall { // specifying this field will result in uptime checks running from all
c.ctx_ = ctx // regions.
return c //
} // Possible values:
// "REGION_UNSPECIFIED" - Default value if no region is specified.
// Will result in uptime checks running from all regions.
// "USA" - Allows checks to run from locations within the United
// States of America.
// "EUROPE" - Allows checks to run from locations within the continent
// of Europe.
// "SOUTH_AMERICA" - Allows checks to run from locations within the
// continent of South America.
// "ASIA_PACIFIC" - Allows checks to run from locations within the
// Asia Pacific area (ex: Singapore).
SelectedRegions []string `json:"selectedRegions,omitempty"`
// TcpCheck: Contains information needed to make a TCP check.
TcpCheck *TcpCheck `json:"tcpCheck,omitempty"`
// Timeout: The maximum amount of time to wait for the request to
// complete (must be between 1 and 60 seconds). Required.
Timeout string `json:"timeout,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "ContentMatchers") 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. "ContentMatchers") 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 *UptimeCheckConfig) MarshalJSON() ([]byte, error) {
type NoMethod UptimeCheckConfig
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// UptimeCheckIp: Contains the region, location, and list of IP
// addresses where checkers in the location run from.
type UptimeCheckIp struct {
// IpAddress: The IP address from which the uptime check originates.
// This is a full IP address (not an IP address range). Most IP
// addresses, as of this publication, are in IPv4 format; however, one
// should not rely on the IP addresses being in IPv4 format indefinitely
// and should support interpreting this field in either IPv4 or IPv6
// format.
IpAddress string `json:"ipAddress,omitempty"`
// Location: A more specific location within the region that typically
// encodes a particular city/town/metro (and its containing
// state/province or country) within the broader umbrella region
// category.
Location string `json:"location,omitempty"`
// Region: A broad region category in which the IP address is located.
//
// Possible values:
// "REGION_UNSPECIFIED" - Default value if no region is specified.
// Will result in uptime checks running from all regions.
// "USA" - Allows checks to run from locations within the United
// States of America.
// "EUROPE" - Allows checks to run from locations within the continent
// of Europe.
// "SOUTH_AMERICA" - Allows checks to run from locations within the
// continent of South America.
// "ASIA_PACIFIC" - Allows checks to run from locations within the
// Asia Pacific area (ex: Singapore).
Region string `json:"region,omitempty"`
// ForceSendFields is a list of field names (e.g. "IpAddress") 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. "IpAddress") 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 *UptimeCheckIp) MarshalJSON() ([]byte, error) {
type NoMethod UptimeCheckIp
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// method id "monitoring.projects.collectdTimeSeries.create":
type ProjectsCollectdTimeSeriesCreateCall struct {
s *Service
name string
createcollectdtimeseriesrequest *CreateCollectdTimeSeriesRequest
urlParams_ gensupport.URLParams
ctx_ context.Context
header_ http.Header
}
// Create: Stackdriver Monitoring Agent only: Creates a new time
// series.<aside class="caution">This method is only for use by the
// Stackdriver Monitoring Agent. Use projects.timeSeries.create
// instead.</aside>
func (r *ProjectsCollectdTimeSeriesService) Create(name string, createcollectdtimeseriesrequest *CreateCollectdTimeSeriesRequest) *ProjectsCollectdTimeSeriesCreateCall {
c := &ProjectsCollectdTimeSeriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.name = name
c.createcollectdtimeseriesrequest = createcollectdtimeseriesrequest
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 *ProjectsCollectdTimeSeriesCreateCall) Fields(s ...googleapi.Field) *ProjectsCollectdTimeSeriesCreateCall {
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 *ProjectsCollectdTimeSeriesCreateCall) Context(ctx context.Context) *ProjectsCollectdTimeSeriesCreateCall {
c.ctx_ = ctx
return c
}
// Header returns an http.Header that can be modified by the caller to // Header returns an http.Header that can be modified by the caller to
// add HTTP headers to the request. // add HTTP headers to the request.
...@@ -2004,7 +2506,7 @@ func (c *ProjectsCollectdTimeSeriesCreateCall) Do(opts ...googleapi.CallOption) ...@@ -2004,7 +2506,7 @@ func (c *ProjectsCollectdTimeSeriesCreateCall) Do(opts ...googleapi.CallOption)
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -2148,7 +2650,7 @@ func (c *ProjectsGroupsCreateCall) Do(opts ...googleapi.CallOption) (*Group, err ...@@ -2148,7 +2650,7 @@ func (c *ProjectsGroupsCreateCall) Do(opts ...googleapi.CallOption) (*Group, err
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -2282,7 +2784,7 @@ func (c *ProjectsGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, err ...@@ -2282,7 +2784,7 @@ func (c *ProjectsGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, err
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -2422,7 +2924,7 @@ func (c *ProjectsGroupsGetCall) Do(opts ...googleapi.CallOption) (*Group, error) ...@@ -2422,7 +2924,7 @@ func (c *ProjectsGroupsGetCall) Do(opts ...googleapi.CallOption) (*Group, error)
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -2609,7 +3111,7 @@ func (c *ProjectsGroupsListCall) Do(opts ...googleapi.CallOption) (*ListGroupsRe ...@@ -2609,7 +3111,7 @@ func (c *ProjectsGroupsListCall) Do(opts ...googleapi.CallOption) (*ListGroupsRe
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -2798,7 +3300,7 @@ func (c *ProjectsGroupsUpdateCall) Do(opts ...googleapi.CallOption) (*Group, err ...@@ -2798,7 +3300,7 @@ func (c *ProjectsGroupsUpdateCall) Do(opts ...googleapi.CallOption) (*Group, err
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -2989,7 +3491,7 @@ func (c *ProjectsGroupsMembersListCall) Do(opts ...googleapi.CallOption) (*ListG ...@@ -2989,7 +3491,7 @@ func (c *ProjectsGroupsMembersListCall) Do(opts ...googleapi.CallOption) (*ListG
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -3173,7 +3675,7 @@ func (c *ProjectsMetricDescriptorsCreateCall) Do(opts ...googleapi.CallOption) ( ...@@ -3173,7 +3675,7 @@ func (c *ProjectsMetricDescriptorsCreateCall) Do(opts ...googleapi.CallOption) (
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -3304,7 +3806,7 @@ func (c *ProjectsMetricDescriptorsDeleteCall) Do(opts ...googleapi.CallOption) ( ...@@ -3304,7 +3806,7 @@ func (c *ProjectsMetricDescriptorsDeleteCall) Do(opts ...googleapi.CallOption) (
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -3445,7 +3947,7 @@ func (c *ProjectsMetricDescriptorsGetCall) Do(opts ...googleapi.CallOption) (*Me ...@@ -3445,7 +3947,7 @@ func (c *ProjectsMetricDescriptorsGetCall) Do(opts ...googleapi.CallOption) (*Me
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -3615,7 +4117,7 @@ func (c *ProjectsMetricDescriptorsListCall) Do(opts ...googleapi.CallOption) (*L ...@@ -3615,7 +4117,7 @@ func (c *ProjectsMetricDescriptorsListCall) Do(opts ...googleapi.CallOption) (*L
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -3795,7 +4297,7 @@ func (c *ProjectsMonitoredResourceDescriptorsGetCall) Do(opts ...googleapi.CallO ...@@ -3795,7 +4297,7 @@ func (c *ProjectsMonitoredResourceDescriptorsGetCall) Do(opts ...googleapi.CallO
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -3967,7 +4469,7 @@ func (c *ProjectsMonitoredResourceDescriptorsListCall) Do(opts ...googleapi.Call ...@@ -3967,7 +4469,7 @@ func (c *ProjectsMonitoredResourceDescriptorsListCall) Do(opts ...googleapi.Call
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -4142,7 +4644,7 @@ func (c *ProjectsTimeSeriesCreateCall) Do(opts ...googleapi.CallOption) (*Empty, ...@@ -4142,7 +4644,7 @@ func (c *ProjectsTimeSeriesCreateCall) Do(opts ...googleapi.CallOption) (*Empty,
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -4449,7 +4951,7 @@ func (c *ProjectsTimeSeriesListCall) Do(opts ...googleapi.CallOption) (*ListTime ...@@ -4449,7 +4951,7 @@ func (c *ProjectsTimeSeriesListCall) Do(opts ...googleapi.CallOption) (*ListTime
}, },
} }
target := &ret target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil { if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err return nil, err
} }
return ret, nil return ret, nil
...@@ -4601,3 +5103,936 @@ func (c *ProjectsTimeSeriesListCall) Pages(ctx context.Context, f func(*ListTime ...@@ -4601,3 +5103,936 @@ func (c *ProjectsTimeSeriesListCall) Pages(ctx context.Context, f func(*ListTime
c.PageToken(x.NextPageToken) c.PageToken(x.NextPageToken)
} }
} }
// method id "monitoring.projects.uptimeCheckConfigs.create":
type ProjectsUptimeCheckConfigsCreateCall struct {
s *Service
parent string
uptimecheckconfig *UptimeCheckConfig
urlParams_ gensupport.URLParams
ctx_ context.Context
header_ http.Header
}
// Create: Creates a new uptime check configuration.
func (r *ProjectsUptimeCheckConfigsService) Create(parent string, uptimecheckconfig *UptimeCheckConfig) *ProjectsUptimeCheckConfigsCreateCall {
c := &ProjectsUptimeCheckConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.parent = parent
c.uptimecheckconfig = uptimecheckconfig
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 *ProjectsUptimeCheckConfigsCreateCall) Fields(s ...googleapi.Field) *ProjectsUptimeCheckConfigsCreateCall {
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 *ProjectsUptimeCheckConfigsCreateCall) Context(ctx context.Context) *ProjectsUptimeCheckConfigsCreateCall {
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 *ProjectsUptimeCheckConfigsCreateCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *ProjectsUptimeCheckConfigsCreateCall) 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.uptimecheckconfig)
if err != nil {
return nil, err
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+parent}/uptimeCheckConfigs")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"parent": c.parent,
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "monitoring.projects.uptimeCheckConfigs.create" call.
// Exactly one of *UptimeCheckConfig or error will be non-nil. Any
// non-2xx status code is an error. Response headers are in either
// *UptimeCheckConfig.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 *ProjectsUptimeCheckConfigsCreateCall) Do(opts ...googleapi.CallOption) (*UptimeCheckConfig, 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 := &UptimeCheckConfig{
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": "Creates a new uptime check configuration.",
// "flatPath": "v3/projects/{projectsId}/uptimeCheckConfigs",
// "httpMethod": "POST",
// "id": "monitoring.projects.uptimeCheckConfigs.create",
// "parameterOrder": [
// "parent"
// ],
// "parameters": {
// "parent": {
// "description": "The project in which to create the uptime check. The format is:projects/[PROJECT_ID].",
// "location": "path",
// "pattern": "^projects/[^/]+$",
// "required": true,
// "type": "string"
// }
// },
// "path": "v3/{+parent}/uptimeCheckConfigs",
// "request": {
// "$ref": "UptimeCheckConfig"
// },
// "response": {
// "$ref": "UptimeCheckConfig"
// },
// "scopes": [
// "https://www.googleapis.com/auth/cloud-platform",
// "https://www.googleapis.com/auth/monitoring"
// ]
// }
}
// method id "monitoring.projects.uptimeCheckConfigs.delete":
type ProjectsUptimeCheckConfigsDeleteCall struct {
s *Service
name string
urlParams_ gensupport.URLParams
ctx_ context.Context
header_ http.Header
}
// Delete: Deletes an uptime check configuration. Note that this method
// will fail if the uptime check configuration is referenced by an alert
// policy or other dependent configs that would be rendered invalid by
// the deletion.
func (r *ProjectsUptimeCheckConfigsService) Delete(name string) *ProjectsUptimeCheckConfigsDeleteCall {
c := &ProjectsUptimeCheckConfigsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.name = name
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 *ProjectsUptimeCheckConfigsDeleteCall) Fields(s ...googleapi.Field) *ProjectsUptimeCheckConfigsDeleteCall {
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 *ProjectsUptimeCheckConfigsDeleteCall) Context(ctx context.Context) *ProjectsUptimeCheckConfigsDeleteCall {
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 *ProjectsUptimeCheckConfigsDeleteCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *ProjectsUptimeCheckConfigsDeleteCall) 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
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("DELETE", urls, body)
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"name": c.name,
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "monitoring.projects.uptimeCheckConfigs.delete" call.
// Exactly one of *Empty or error will be non-nil. Any non-2xx status
// code is an error. Response headers are in either
// *Empty.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 *ProjectsUptimeCheckConfigsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, 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 := &Empty{
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": "Deletes an uptime check configuration. Note that this method will fail if the uptime check configuration is referenced by an alert policy or other dependent configs that would be rendered invalid by the deletion.",
// "flatPath": "v3/projects/{projectsId}/uptimeCheckConfigs/{uptimeCheckConfigsId}",
// "httpMethod": "DELETE",
// "id": "monitoring.projects.uptimeCheckConfigs.delete",
// "parameterOrder": [
// "name"
// ],
// "parameters": {
// "name": {
// "description": "The uptime check configuration to delete. The format isprojects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID].",
// "location": "path",
// "pattern": "^projects/[^/]+/uptimeCheckConfigs/[^/]+$",
// "required": true,
// "type": "string"
// }
// },
// "path": "v3/{+name}",
// "response": {
// "$ref": "Empty"
// },
// "scopes": [
// "https://www.googleapis.com/auth/cloud-platform",
// "https://www.googleapis.com/auth/monitoring"
// ]
// }
}
// method id "monitoring.projects.uptimeCheckConfigs.get":
type ProjectsUptimeCheckConfigsGetCall struct {
s *Service
name string
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
header_ http.Header
}
// Get: Gets a single uptime check configuration.
func (r *ProjectsUptimeCheckConfigsService) Get(name string) *ProjectsUptimeCheckConfigsGetCall {
c := &ProjectsUptimeCheckConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.name = name
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 *ProjectsUptimeCheckConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsUptimeCheckConfigsGetCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// IfNoneMatch sets the optional parameter which makes the operation
// fail if the object's ETag matches the given value. This is useful for
// getting updates only after the object has changed since the last
// request. Use googleapi.IsNotModified to check whether the response
// error from Do is the result of In-None-Match.
func (c *ProjectsUptimeCheckConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsUptimeCheckConfigsGetCall {
c.ifNoneMatch_ = entityTag
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 *ProjectsUptimeCheckConfigsGetCall) Context(ctx context.Context) *ProjectsUptimeCheckConfigsGetCall {
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 *ProjectsUptimeCheckConfigsGetCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *ProjectsUptimeCheckConfigsGetCall) 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())
if c.ifNoneMatch_ != "" {
reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"name": c.name,
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "monitoring.projects.uptimeCheckConfigs.get" call.
// Exactly one of *UptimeCheckConfig or error will be non-nil. Any
// non-2xx status code is an error. Response headers are in either
// *UptimeCheckConfig.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 *ProjectsUptimeCheckConfigsGetCall) Do(opts ...googleapi.CallOption) (*UptimeCheckConfig, 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 := &UptimeCheckConfig{
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": "Gets a single uptime check configuration.",
// "flatPath": "v3/projects/{projectsId}/uptimeCheckConfigs/{uptimeCheckConfigsId}",
// "httpMethod": "GET",
// "id": "monitoring.projects.uptimeCheckConfigs.get",
// "parameterOrder": [
// "name"
// ],
// "parameters": {
// "name": {
// "description": "The uptime check configuration to retrieve. The format isprojects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID].",
// "location": "path",
// "pattern": "^projects/[^/]+/uptimeCheckConfigs/[^/]+$",
// "required": true,
// "type": "string"
// }
// },
// "path": "v3/{+name}",
// "response": {
// "$ref": "UptimeCheckConfig"
// },
// "scopes": [
// "https://www.googleapis.com/auth/cloud-platform",
// "https://www.googleapis.com/auth/monitoring",
// "https://www.googleapis.com/auth/monitoring.read"
// ]
// }
}
// method id "monitoring.projects.uptimeCheckConfigs.list":
type ProjectsUptimeCheckConfigsListCall struct {
s *Service
parent string
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
header_ http.Header
}
// List: Lists the existing valid uptime check configurations for the
// project, leaving out any invalid configurations.
func (r *ProjectsUptimeCheckConfigsService) List(parent string) *ProjectsUptimeCheckConfigsListCall {
c := &ProjectsUptimeCheckConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.parent = parent
return c
}
// PageSize sets the optional parameter "pageSize": The maximum number
// of results to return in a single response. The server may further
// constrain the maximum number of results returned in a single page. If
// the page_size is <=0, the server will decide the number of results to
// be returned.
func (c *ProjectsUptimeCheckConfigsListCall) PageSize(pageSize int64) *ProjectsUptimeCheckConfigsListCall {
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
return c
}
// PageToken sets the optional parameter "pageToken": If this field is
// not empty then it must contain the nextPageToken value returned by a
// previous call to this method. Using this field causes the method to
// return more results from the previous method call.
func (c *ProjectsUptimeCheckConfigsListCall) PageToken(pageToken string) *ProjectsUptimeCheckConfigsListCall {
c.urlParams_.Set("pageToken", pageToken)
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 *ProjectsUptimeCheckConfigsListCall) Fields(s ...googleapi.Field) *ProjectsUptimeCheckConfigsListCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// IfNoneMatch sets the optional parameter which makes the operation
// fail if the object's ETag matches the given value. This is useful for
// getting updates only after the object has changed since the last
// request. Use googleapi.IsNotModified to check whether the response
// error from Do is the result of In-None-Match.
func (c *ProjectsUptimeCheckConfigsListCall) IfNoneMatch(entityTag string) *ProjectsUptimeCheckConfigsListCall {
c.ifNoneMatch_ = entityTag
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 *ProjectsUptimeCheckConfigsListCall) Context(ctx context.Context) *ProjectsUptimeCheckConfigsListCall {
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 *ProjectsUptimeCheckConfigsListCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *ProjectsUptimeCheckConfigsListCall) 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())
if c.ifNoneMatch_ != "" {
reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+parent}/uptimeCheckConfigs")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"parent": c.parent,
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "monitoring.projects.uptimeCheckConfigs.list" call.
// Exactly one of *ListUptimeCheckConfigsResponse or error will be
// non-nil. Any non-2xx status code is an error. Response headers are in
// either *ListUptimeCheckConfigsResponse.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 *ProjectsUptimeCheckConfigsListCall) Do(opts ...googleapi.CallOption) (*ListUptimeCheckConfigsResponse, 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 := &ListUptimeCheckConfigsResponse{
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": "Lists the existing valid uptime check configurations for the project, leaving out any invalid configurations.",
// "flatPath": "v3/projects/{projectsId}/uptimeCheckConfigs",
// "httpMethod": "GET",
// "id": "monitoring.projects.uptimeCheckConfigs.list",
// "parameterOrder": [
// "parent"
// ],
// "parameters": {
// "pageSize": {
// "description": "The maximum number of results to return in a single response. The server may further constrain the maximum number of results returned in a single page. If the page_size is \u003c=0, the server will decide the number of results to be returned.",
// "format": "int32",
// "location": "query",
// "type": "integer"
// },
// "pageToken": {
// "description": "If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return more results from the previous method call.",
// "location": "query",
// "type": "string"
// },
// "parent": {
// "description": "The project whose uptime check configurations are listed. The format isprojects/[PROJECT_ID].",
// "location": "path",
// "pattern": "^projects/[^/]+$",
// "required": true,
// "type": "string"
// }
// },
// "path": "v3/{+parent}/uptimeCheckConfigs",
// "response": {
// "$ref": "ListUptimeCheckConfigsResponse"
// },
// "scopes": [
// "https://www.googleapis.com/auth/cloud-platform",
// "https://www.googleapis.com/auth/monitoring",
// "https://www.googleapis.com/auth/monitoring.read"
// ]
// }
}
// Pages invokes f for each page of results.
// A non-nil error returned from f will halt the iteration.
// The provided context supersedes any context provided to the Context method.
func (c *ProjectsUptimeCheckConfigsListCall) Pages(ctx context.Context, f func(*ListUptimeCheckConfigsResponse) error) error {
c.ctx_ = ctx
defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
for {
x, err := c.Do()
if err != nil {
return err
}
if err := f(x); err != nil {
return err
}
if x.NextPageToken == "" {
return nil
}
c.PageToken(x.NextPageToken)
}
}
// method id "monitoring.projects.uptimeCheckConfigs.patch":
type ProjectsUptimeCheckConfigsPatchCall struct {
s *Service
name string
uptimecheckconfig *UptimeCheckConfig
urlParams_ gensupport.URLParams
ctx_ context.Context
header_ http.Header
}
// Patch: Updates an uptime check configuration. You can either replace
// the entire configuration with a new one or replace only certain
// fields in the current configuration by specifying the fields to be
// updated via "updateMask". Returns the updated configuration.
func (r *ProjectsUptimeCheckConfigsService) Patch(name string, uptimecheckconfig *UptimeCheckConfig) *ProjectsUptimeCheckConfigsPatchCall {
c := &ProjectsUptimeCheckConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.name = name
c.uptimecheckconfig = uptimecheckconfig
return c
}
// UpdateMask sets the optional parameter "updateMask": If present, only
// the listed fields in the current uptime check configuration are
// updated with values from the new configuration. If this field is
// empty, then the current configuration is completely replaced with the
// new configuration.
func (c *ProjectsUptimeCheckConfigsPatchCall) UpdateMask(updateMask string) *ProjectsUptimeCheckConfigsPatchCall {
c.urlParams_.Set("updateMask", updateMask)
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 *ProjectsUptimeCheckConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsUptimeCheckConfigsPatchCall {
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 *ProjectsUptimeCheckConfigsPatchCall) Context(ctx context.Context) *ProjectsUptimeCheckConfigsPatchCall {
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 *ProjectsUptimeCheckConfigsPatchCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *ProjectsUptimeCheckConfigsPatchCall) 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.uptimecheckconfig)
if err != nil {
return nil, err
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("PATCH", urls, body)
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"name": c.name,
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "monitoring.projects.uptimeCheckConfigs.patch" call.
// Exactly one of *UptimeCheckConfig or error will be non-nil. Any
// non-2xx status code is an error. Response headers are in either
// *UptimeCheckConfig.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 *ProjectsUptimeCheckConfigsPatchCall) Do(opts ...googleapi.CallOption) (*UptimeCheckConfig, 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 := &UptimeCheckConfig{
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 uptime check configuration. You can either replace the entire configuration with a new one or replace only certain fields in the current configuration by specifying the fields to be updated via \"updateMask\". Returns the updated configuration.",
// "flatPath": "v3/projects/{projectsId}/uptimeCheckConfigs/{uptimeCheckConfigsId}",
// "httpMethod": "PATCH",
// "id": "monitoring.projects.uptimeCheckConfigs.patch",
// "parameterOrder": [
// "name"
// ],
// "parameters": {
// "name": {
// "description": "A unique resource name for this UptimeCheckConfig. The format is:projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID].This field should be omitted when creating the uptime check configuration; on create, the resource name is assigned by the server and included in the response.",
// "location": "path",
// "pattern": "^projects/[^/]+/uptimeCheckConfigs/[^/]+$",
// "required": true,
// "type": "string"
// },
// "updateMask": {
// "description": "Optional. If present, only the listed fields in the current uptime check configuration are updated with values from the new configuration. If this field is empty, then the current configuration is completely replaced with the new configuration.",
// "format": "google-fieldmask",
// "location": "query",
// "type": "string"
// }
// },
// "path": "v3/{+name}",
// "request": {
// "$ref": "UptimeCheckConfig"
// },
// "response": {
// "$ref": "UptimeCheckConfig"
// },
// "scopes": [
// "https://www.googleapis.com/auth/cloud-platform",
// "https://www.googleapis.com/auth/monitoring"
// ]
// }
}
// method id "monitoring.uptimeCheckIps.list":
type UptimeCheckIpsListCall struct {
s *Service
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
header_ http.Header
}
// List: Returns the list of IPs that checkers run from
func (r *UptimeCheckIpsService) List() *UptimeCheckIpsListCall {
c := &UptimeCheckIpsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
return c
}
// PageSize sets the optional parameter "pageSize": The maximum number
// of results to return in a single response. The server may further
// constrain the maximum number of results returned in a single page. If
// the page_size is <=0, the server will decide the number of results to
// be returned. NOTE: this field is not yet implemented
func (c *UptimeCheckIpsListCall) PageSize(pageSize int64) *UptimeCheckIpsListCall {
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
return c
}
// PageToken sets the optional parameter "pageToken": If this field is
// not empty then it must contain the nextPageToken value returned by a
// previous call to this method. Using this field causes the method to
// return more results from the previous method call. NOTE: this field
// is not yet implemented
func (c *UptimeCheckIpsListCall) PageToken(pageToken string) *UptimeCheckIpsListCall {
c.urlParams_.Set("pageToken", pageToken)
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 *UptimeCheckIpsListCall) Fields(s ...googleapi.Field) *UptimeCheckIpsListCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// IfNoneMatch sets the optional parameter which makes the operation
// fail if the object's ETag matches the given value. This is useful for
// getting updates only after the object has changed since the last
// request. Use googleapi.IsNotModified to check whether the response
// error from Do is the result of In-None-Match.
func (c *UptimeCheckIpsListCall) IfNoneMatch(entityTag string) *UptimeCheckIpsListCall {
c.ifNoneMatch_ = entityTag
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 *UptimeCheckIpsListCall) Context(ctx context.Context) *UptimeCheckIpsListCall {
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 *UptimeCheckIpsListCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *UptimeCheckIpsListCall) 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())
if c.ifNoneMatch_ != "" {
reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "v3/uptimeCheckIps")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
req.Header = reqHeaders
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "monitoring.uptimeCheckIps.list" call.
// Exactly one of *ListUptimeCheckIpsResponse or error will be non-nil.
// Any non-2xx status code is an error. Response headers are in either
// *ListUptimeCheckIpsResponse.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 *UptimeCheckIpsListCall) Do(opts ...googleapi.CallOption) (*ListUptimeCheckIpsResponse, 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 := &ListUptimeCheckIpsResponse{
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": "Returns the list of IPs that checkers run from",
// "flatPath": "v3/uptimeCheckIps",
// "httpMethod": "GET",
// "id": "monitoring.uptimeCheckIps.list",
// "parameterOrder": [],
// "parameters": {
// "pageSize": {
// "description": "The maximum number of results to return in a single response. The server may further constrain the maximum number of results returned in a single page. If the page_size is \u003c=0, the server will decide the number of results to be returned. NOTE: this field is not yet implemented",
// "format": "int32",
// "location": "query",
// "type": "integer"
// },
// "pageToken": {
// "description": "If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return more results from the previous method call. NOTE: this field is not yet implemented",
// "location": "query",
// "type": "string"
// }
// },
// "path": "v3/uptimeCheckIps",
// "response": {
// "$ref": "ListUptimeCheckIpsResponse"
// },
// "scopes": [
// "https://www.googleapis.com/auth/cloud-platform",
// "https://www.googleapis.com/auth/monitoring",
// "https://www.googleapis.com/auth/monitoring.read"
// ]
// }
}
// Pages invokes f for each page of results.
// A non-nil error returned from f will halt the iteration.
// The provided context supersedes any context provided to the Context method.
func (c *UptimeCheckIpsListCall) Pages(ctx context.Context, f func(*ListUptimeCheckIpsResponse) error) error {
c.ctx_ = ctx
defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
for {
x, err := c.Do()
if err != nil {
return err
}
if err := f(x); err != nil {
return err
}
if x.NextPageToken == "" {
return nil
}
c.PageToken(x.NextPageToken)
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment