From 54521a59b743c6c79a0ed1490eb12944f34575d7 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sat, 26 Feb 2022 08:12:28 +0000 Subject: [PATCH] feat(all): auto-regenerate discovery clients --- api-list.json | 4 +- bigtableadmin/v2/bigtableadmin-api.json | 4 +- bigtableadmin/v2/bigtableadmin-gen.go | 6 +- cloudfunctions/v1/cloudfunctions-api.json | 8 +- cloudfunctions/v1/cloudfunctions-gen.go | 8 +- .../v2alpha/cloudfunctions-api.json | 4 +- cloudfunctions/v2alpha/cloudfunctions-gen.go | 2 +- cloudfunctions/v2beta/cloudfunctions-api.json | 4 +- cloudfunctions/v2beta/cloudfunctions-gen.go | 2 +- dataflow/v1b3/dataflow-api.json | 4 +- dataflow/v1b3/dataflow-gen.go | 3 +- dns/v2/dns-api.json | 3377 ++++++ dns/v2/dns-gen.go | 9589 +++++++++++++++++ file/v1/file-api.json | 15 +- file/v1/file-gen.go | 24 +- file/v1beta1/file-api.json | 21 +- file/v1beta1/file-gen.go | 27 +- firebase/v1beta1/firebase-api.json | 14 +- firebase/v1beta1/firebase-gen.go | 42 +- firestore/v1/firestore-api.json | 6 +- firestore/v1/firestore-gen.go | 5 +- firestore/v1beta1/firestore-api.json | 6 +- firestore/v1beta1/firestore-gen.go | 5 +- .../v1/managedidentities-api.json | 403 +- managedidentities/v1/managedidentities-gen.go | 1606 ++- monitoring/v3/monitoring-api.json | 10 +- monitoring/v3/monitoring-gen.go | 12 +- sasportal/v1alpha1/sasportal-api.json | 32 +- sasportal/v1alpha1/sasportal-gen.go | 59 + .../v1/servicemanagement-api.json | 10 +- servicemanagement/v1/servicemanagement-gen.go | 7 +- spanner/v1/spanner-api.json | 6 +- spanner/v1/spanner-gen.go | 37 +- vault/v1/vault-api.json | 6 +- vault/v1/vault-gen.go | 3 + 35 files changed, 15255 insertions(+), 116 deletions(-) create mode 100644 dns/v2/dns-api.json create mode 100644 dns/v2/dns-gen.go diff --git a/api-list.json b/api-list.json index 3bd249fd579..d92365b68e5 100644 --- a/api-list.json +++ b/api-list.json @@ -5247,8 +5247,8 @@ "id": "vault:v1", "name": "vault", "version": "v1", - "title": "G Suite Vault API", - "description": "Archiving and eDiscovery for G Suite.", + "title": "Google Vault API", + "description": "Retention and eDiscovery for Google Workspace. To work with Vault resources, the account must have the [required Vault privileges](https://support.google.com/vault/answer/2799699) and access to the matter. To access a matter, the account must have created the matter, have the matter shared with them, or have the **View All Matters** privilege. For example, to download an export, an account needs the **Manage Exports** privilege and the matter shared with them.", "discoveryRestUrl": "https://vault.googleapis.com/$discovery/rest?version=v1", "icons": { "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", diff --git a/bigtableadmin/v2/bigtableadmin-api.json b/bigtableadmin/v2/bigtableadmin-api.json index 6156d8e824a..f7be36cd4d4 100644 --- a/bigtableadmin/v2/bigtableadmin-api.json +++ b/bigtableadmin/v2/bigtableadmin-api.json @@ -1552,7 +1552,7 @@ "type": "string" }, "view": { - "description": "The view to be applied to the returned tables' fields. Only NAME_ONLY view (default) and REPLICATION_VIEW are supported.", + "description": "The view to be applied to the returned tables' fields. Only NAME_ONLY view (default), REPLICATION_VIEW and ENCRYPTION_VIEW are supported.", "enum": [ "VIEW_UNSPECIFIED", "NAME_ONLY", @@ -1803,7 +1803,7 @@ } } }, - "revision": "20220114", + "revision": "20220211", "rootUrl": "https://bigtableadmin.googleapis.com/", "schemas": { "AppProfile": { diff --git a/bigtableadmin/v2/bigtableadmin-gen.go b/bigtableadmin/v2/bigtableadmin-gen.go index 5258ca9b1b0..2546e75dcaf 100644 --- a/bigtableadmin/v2/bigtableadmin-gen.go +++ b/bigtableadmin/v2/bigtableadmin-gen.go @@ -9400,8 +9400,8 @@ func (c *ProjectsInstancesTablesListCall) PageToken(pageToken string) *ProjectsI } // View sets the optional parameter "view": The view to be applied to -// the returned tables' fields. Only NAME_ONLY view (default) and -// REPLICATION_VIEW are supported. +// the returned tables' fields. Only NAME_ONLY view (default), +// REPLICATION_VIEW and ENCRYPTION_VIEW are supported. // // Possible values: // "VIEW_UNSPECIFIED" - Uses the default view for each method as @@ -9545,7 +9545,7 @@ func (c *ProjectsInstancesTablesListCall) Do(opts ...googleapi.CallOption) (*Lis // "type": "string" // }, // "view": { - // "description": "The view to be applied to the returned tables' fields. Only NAME_ONLY view (default) and REPLICATION_VIEW are supported.", + // "description": "The view to be applied to the returned tables' fields. Only NAME_ONLY view (default), REPLICATION_VIEW and ENCRYPTION_VIEW are supported.", // "enum": [ // "VIEW_UNSPECIFIED", // "NAME_ONLY", diff --git a/cloudfunctions/v1/cloudfunctions-api.json b/cloudfunctions/v1/cloudfunctions-api.json index 3b2a808dc35..16a3f0c2476 100644 --- a/cloudfunctions/v1/cloudfunctions-api.json +++ b/cloudfunctions/v1/cloudfunctions-api.json @@ -546,7 +546,7 @@ } } }, - "revision": "20220203", + "revision": "20220218", "rootUrl": "https://cloudfunctions.googleapis.com/", "schemas": { "AuditConfig": { @@ -650,7 +650,7 @@ "type": "object" }, "CloudFunction": { - "description": "Describes a Cloud Function that contains user computation executed in response to an event. It encapsulate function and triggers configurations. Next tag: 36", + "description": "Describes a Cloud Function that contains user computation executed in response to an event. It encapsulate function and triggers configurations.", "id": "CloudFunction", "properties": { "availableMemoryMb": { @@ -1504,7 +1504,7 @@ "type": "object" }, "SecretEnvVar": { - "description": "Configuration for a secret environment variable. It has the information necessary to fetch the secret value from secret manager and expose it as an environment variable. Secret value is not a part of the configuration. Secret values are only fetched when a new clone starts.", + "description": "Configuration for a secret environment variable. It has the information necessary to fetch the secret value from secret manager and expose it as an environment variable.", "id": "SecretEnvVar", "properties": { "key": { @@ -1520,7 +1520,7 @@ "type": "string" }, "version": { - "description": "Version of the secret (version number or the string 'latest'). It is recommended to use a numeric version for secret environment variables as any updates to the secret value is not reflected until new clones start.", + "description": "Version of the secret (version number or the string 'latest'). It is recommended to use a numeric version for secret environment variables as any updates to the secret value is not reflected until new instances start.", "type": "string" } }, diff --git a/cloudfunctions/v1/cloudfunctions-gen.go b/cloudfunctions/v1/cloudfunctions-gen.go index e703e805246..5e583b2c328 100644 --- a/cloudfunctions/v1/cloudfunctions-gen.go +++ b/cloudfunctions/v1/cloudfunctions-gen.go @@ -423,7 +423,7 @@ func (s *CallFunctionResponse) MarshalJSON() ([]byte, error) { // CloudFunction: Describes a Cloud Function that contains user // computation executed in response to an event. It encapsulate function -// and triggers configurations. Next tag: 36 +// and triggers configurations. type CloudFunction struct { // AvailableMemoryMb: The amount of memory in MB available for a // function. Defaults to 256MB. @@ -1707,9 +1707,7 @@ type Retry struct { // SecretEnvVar: Configuration for a secret environment variable. It has // the information necessary to fetch the secret value from secret -// manager and expose it as an environment variable. Secret value is not -// a part of the configuration. Secret values are only fetched when a -// new clone starts. +// manager and expose it as an environment variable. type SecretEnvVar struct { // Key: Name of the environment variable. Key string `json:"key,omitempty"` @@ -1727,7 +1725,7 @@ type SecretEnvVar struct { // Version: Version of the secret (version number or the string // 'latest'). It is recommended to use a numeric version for secret // environment variables as any updates to the secret value is not - // reflected until new clones start. + // reflected until new instances start. Version string `json:"version,omitempty"` // ForceSendFields is a list of field names (e.g. "Key") to diff --git a/cloudfunctions/v2alpha/cloudfunctions-api.json b/cloudfunctions/v2alpha/cloudfunctions-api.json index 2f6ea16c793..9878b99e314 100644 --- a/cloudfunctions/v2alpha/cloudfunctions-api.json +++ b/cloudfunctions/v2alpha/cloudfunctions-api.json @@ -571,7 +571,7 @@ } } }, - "revision": "20220203", + "revision": "20220218", "rootUrl": "https://cloudfunctions.googleapis.com/", "schemas": { "AuditConfig": { @@ -833,7 +833,7 @@ "enumDescriptions": [ "Not specified. Invalid state.", "Function has been successfully deployed and is serving.", - "Function deployment failed and the function isn’t serving.", + "Function deployment failed and the function is not serving.", "Function is being created or updated.", "Function is being deleted.", "Function deployment failed and the function serving state is undefined. The function should be updated or deleted to move it out of this state." diff --git a/cloudfunctions/v2alpha/cloudfunctions-gen.go b/cloudfunctions/v2alpha/cloudfunctions-gen.go index a30cb3b672e..350b091b542 100644 --- a/cloudfunctions/v2alpha/cloudfunctions-gen.go +++ b/cloudfunctions/v2alpha/cloudfunctions-gen.go @@ -646,7 +646,7 @@ type Function struct { // Possible values: // "STATE_UNSPECIFIED" - Not specified. Invalid state. // "ACTIVE" - Function has been successfully deployed and is serving. - // "FAILED" - Function deployment failed and the function isn’t + // "FAILED" - Function deployment failed and the function is not // serving. // "DEPLOYING" - Function is being created or updated. // "DELETING" - Function is being deleted. diff --git a/cloudfunctions/v2beta/cloudfunctions-api.json b/cloudfunctions/v2beta/cloudfunctions-api.json index 299c7207c20..cbcff9b4a86 100644 --- a/cloudfunctions/v2beta/cloudfunctions-api.json +++ b/cloudfunctions/v2beta/cloudfunctions-api.json @@ -571,7 +571,7 @@ } } }, - "revision": "20220203", + "revision": "20220218", "rootUrl": "https://cloudfunctions.googleapis.com/", "schemas": { "AuditConfig": { @@ -833,7 +833,7 @@ "enumDescriptions": [ "Not specified. Invalid state.", "Function has been successfully deployed and is serving.", - "Function deployment failed and the function isn’t serving.", + "Function deployment failed and the function is not serving.", "Function is being created or updated.", "Function is being deleted.", "Function deployment failed and the function serving state is undefined. The function should be updated or deleted to move it out of this state." diff --git a/cloudfunctions/v2beta/cloudfunctions-gen.go b/cloudfunctions/v2beta/cloudfunctions-gen.go index 7e5c7e99e85..011df7936f6 100644 --- a/cloudfunctions/v2beta/cloudfunctions-gen.go +++ b/cloudfunctions/v2beta/cloudfunctions-gen.go @@ -646,7 +646,7 @@ type Function struct { // Possible values: // "STATE_UNSPECIFIED" - Not specified. Invalid state. // "ACTIVE" - Function has been successfully deployed and is serving. - // "FAILED" - Function deployment failed and the function isn’t + // "FAILED" - Function deployment failed and the function is not // serving. // "DEPLOYING" - Function is being created or updated. // "DELETING" - Function is being deleted. diff --git a/dataflow/v1b3/dataflow-api.json b/dataflow/v1b3/dataflow-api.json index ed0a10ab074..8e1ec2afbe4 100644 --- a/dataflow/v1b3/dataflow-api.json +++ b/dataflow/v1b3/dataflow-api.json @@ -2225,7 +2225,7 @@ } } }, - "revision": "20220215", + "revision": "20220218", "rootUrl": "https://dataflow.googleapis.com/", "schemas": { "ApproximateProgress": { @@ -3666,7 +3666,7 @@ "type": "object" }, "Job": { - "description": "Defines a job to be run by the Cloud Dataflow service. nextID: 26", + "description": "Defines a job to be run by the Cloud Dataflow service.", "id": "Job", "properties": { "clientRequestId": { diff --git a/dataflow/v1b3/dataflow-gen.go b/dataflow/v1b3/dataflow-gen.go index 921dd636f65..cac56067c70 100644 --- a/dataflow/v1b3/dataflow-gen.go +++ b/dataflow/v1b3/dataflow-gen.go @@ -2676,8 +2676,7 @@ func (s *IntegerMean) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Job: Defines a job to be run by the Cloud Dataflow service. nextID: -// 26 +// Job: Defines a job to be run by the Cloud Dataflow service. type Job struct { // ClientRequestId: The client's unique identifier of the job, re-used // across retried attempts. If this field is set, the service will diff --git a/dns/v2/dns-api.json b/dns/v2/dns-api.json new file mode 100644 index 00000000000..a6a3a47e06e --- /dev/null +++ b/dns/v2/dns-api.json @@ -0,0 +1,3377 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." + }, + "https://www.googleapis.com/auth/cloud-platform.read-only": { + "description": "View your data across Google Cloud services and see the email address of your Google Account" + }, + "https://www.googleapis.com/auth/ndev.clouddns.readonly": { + "description": "View your DNS records hosted by Google Cloud DNS" + }, + "https://www.googleapis.com/auth/ndev.clouddns.readwrite": { + "description": "View and manage your DNS records hosted by Google Cloud DNS" + } + } + } + }, + "basePath": "", + "baseUrl": "https://dns.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Dns", + "description": "", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/dns/docs", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "dns:v2", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://dns.mtls.googleapis.com/", + "name": "dns", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "changes": { + "methods": { + "create": { + "description": "Atomically updates the ResourceRecordSet collection.", + "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/changes", + "httpMethod": "POST", + "id": "dns.changes.create", + "parameterOrder": [ + "project", + "location", + "managedZone" + ], + "parameters": { + "clientOperationId": { + "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + "location": "query", + "type": "string" + }, + "location": { + "default": "global", + "location": "path", + "required": true, + "type": "string" + }, + "managedZone": { + "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Identifies the project addressed by this request.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/changes", + "request": { + "$ref": "Change" + }, + "response": { + "$ref": "Change" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + ] + }, + "get": { + "description": "Fetches the representation of an existing Change.", + "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/changes/{changeId}", + "httpMethod": "GET", + "id": "dns.changes.get", + "parameterOrder": [ + "project", + "location", + "managedZone", + "changeId" + ], + "parameters": { + "changeId": { + "description": "The identifier of the requested change, from a previous ResourceRecordSetsChangeResponse.", + "location": "path", + "required": true, + "type": "string" + }, + "clientOperationId": { + "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + "location": "query", + "type": "string" + }, + "location": { + "default": "global", + "location": "path", + "required": true, + "type": "string" + }, + "managedZone": { + "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Identifies the project addressed by this request.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/changes/{changeId}", + "response": { + "$ref": "Change" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/ndev.clouddns.readonly", + "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + ] + }, + "list": { + "description": "Enumerates Changes to a ResourceRecordSet collection.", + "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/changes", + "httpMethod": "GET", + "id": "dns.changes.list", + "parameterOrder": [ + "project", + "location", + "managedZone" + ], + "parameters": { + "location": { + "default": "global", + "location": "path", + "required": true, + "type": "string" + }, + "managedZone": { + "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.", + "location": "path", + "required": true, + "type": "string" + }, + "maxResults": { + "description": "Optional. Maximum number of results to be returned. If unspecified, the server decides how many results to return.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Identifies the project addressed by this request.", + "location": "path", + "required": true, + "type": "string" + }, + "sortBy": { + "default": "CHANGE_SEQUENCE", + "description": "Sorting criterion. The only supported value is change sequence.", + "enum": [ + "CHANGE_SEQUENCE" + ], + "enumDescriptions": [ + "" + ], + "location": "query", + "type": "string" + }, + "sortOrder": { + "description": "Sorting order direction: 'ascending' or 'descending'.", + "location": "query", + "type": "string" + } + }, + "path": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/changes", + "response": { + "$ref": "ChangesListResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/ndev.clouddns.readonly", + "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + ] + } + } + }, + "dnsKeys": { + "methods": { + "get": { + "description": "Fetches the representation of an existing DnsKey.", + "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/dnsKeys/{dnsKeyId}", + "httpMethod": "GET", + "id": "dns.dnsKeys.get", + "parameterOrder": [ + "project", + "location", + "managedZone", + "dnsKeyId" + ], + "parameters": { + "clientOperationId": { + "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + "location": "query", + "type": "string" + }, + "digestType": { + "description": "An optional comma-separated list of digest types to compute and display for key signing keys. If omitted, the recommended digest type is computed and displayed.", + "location": "query", + "type": "string" + }, + "dnsKeyId": { + "description": "The identifier of the requested DnsKey.", + "location": "path", + "required": true, + "type": "string" + }, + "location": { + "default": "global", + "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + "location": "path", + "required": true, + "type": "string" + }, + "managedZone": { + "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Identifies the project addressed by this request.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/dnsKeys/{dnsKeyId}", + "response": { + "$ref": "DnsKey" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/ndev.clouddns.readonly", + "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + ] + }, + "list": { + "description": "Enumerates DnsKeys to a ResourceRecordSet collection.", + "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/dnsKeys", + "httpMethod": "GET", + "id": "dns.dnsKeys.list", + "parameterOrder": [ + "project", + "location", + "managedZone" + ], + "parameters": { + "digestType": { + "description": "An optional comma-separated list of digest types to compute and display for key signing keys. If omitted, the recommended digest type is computed and displayed.", + "location": "query", + "type": "string" + }, + "location": { + "default": "global", + "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + "location": "path", + "required": true, + "type": "string" + }, + "managedZone": { + "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.", + "location": "path", + "required": true, + "type": "string" + }, + "maxResults": { + "description": "Optional. Maximum number of results to be returned. If unspecified, the server decides how many results to return.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Identifies the project addressed by this request.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/dnsKeys", + "response": { + "$ref": "DnsKeysListResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/ndev.clouddns.readonly", + "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + ] + } + } + }, + "managedZoneOperations": { + "methods": { + "get": { + "description": "Fetches the representation of an existing Operation.", + "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/operations/{operation}", + "httpMethod": "GET", + "id": "dns.managedZoneOperations.get", + "parameterOrder": [ + "project", + "location", + "managedZone", + "operation" + ], + "parameters": { + "clientOperationId": { + "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + "location": "query", + "type": "string" + }, + "location": { + "default": "global", + "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + "location": "path", + "required": true, + "type": "string" + }, + "managedZone": { + "description": "Identifies the managed zone addressed by this request.", + "location": "path", + "required": true, + "type": "string" + }, + "operation": { + "description": "Identifies the operation addressed by this request (ID of the operation).", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Identifies the project addressed by this request.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/operations/{operation}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/ndev.clouddns.readonly", + "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + ] + }, + "list": { + "description": "Enumerates Operations for the given ManagedZone.", + "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/operations", + "httpMethod": "GET", + "id": "dns.managedZoneOperations.list", + "parameterOrder": [ + "project", + "location", + "managedZone" + ], + "parameters": { + "location": { + "default": "global", + "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + "location": "path", + "required": true, + "type": "string" + }, + "managedZone": { + "description": "Identifies the managed zone addressed by this request.", + "location": "path", + "required": true, + "type": "string" + }, + "maxResults": { + "description": "Optional. Maximum number of results to be returned. If unspecified, the server decides how many results to return.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Identifies the project addressed by this request.", + "location": "path", + "required": true, + "type": "string" + }, + "sortBy": { + "default": "START_TIME", + "description": "Sorting criterion. The only supported values are START_TIME and ID.", + "enum": [ + "START_TIME", + "ID" + ], + "enumDescriptions": [ + "", + "" + ], + "location": "query", + "type": "string" + } + }, + "path": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/operations", + "response": { + "$ref": "ManagedZoneOperationsListResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/ndev.clouddns.readonly", + "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + ] + } + } + }, + "managedZones": { + "methods": { + "create": { + "description": "Creates a new ManagedZone.", + "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones", + "httpMethod": "POST", + "id": "dns.managedZones.create", + "parameterOrder": [ + "project", + "location" + ], + "parameters": { + "clientOperationId": { + "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + "location": "query", + "type": "string" + }, + "location": { + "default": "global", + "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Identifies the project addressed by this request.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "dns/v2/projects/{project}/locations/{location}/managedZones", + "request": { + "$ref": "ManagedZone" + }, + "response": { + "$ref": "ManagedZone" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + ] + }, + "delete": { + "description": "Deletes a previously created ManagedZone.", + "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}", + "httpMethod": "DELETE", + "id": "dns.managedZones.delete", + "parameterOrder": [ + "project", + "location", + "managedZone" + ], + "parameters": { + "clientOperationId": { + "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + "location": "query", + "type": "string" + }, + "location": { + "default": "global", + "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + "location": "path", + "required": true, + "type": "string" + }, + "managedZone": { + "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Identifies the project addressed by this request.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + ] + }, + "get": { + "description": "Fetches the representation of an existing ManagedZone.", + "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}", + "httpMethod": "GET", + "id": "dns.managedZones.get", + "parameterOrder": [ + "project", + "location", + "managedZone" + ], + "parameters": { + "clientOperationId": { + "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + "location": "query", + "type": "string" + }, + "location": { + "default": "global", + "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + "location": "path", + "required": true, + "type": "string" + }, + "managedZone": { + "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Identifies the project addressed by this request.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}", + "response": { + "$ref": "ManagedZone" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/ndev.clouddns.readonly", + "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + ] + }, + "list": { + "description": "Enumerates ManagedZones that have been created but not yet deleted.", + "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones", + "httpMethod": "GET", + "id": "dns.managedZones.list", + "parameterOrder": [ + "project", + "location" + ], + "parameters": { + "dnsName": { + "description": "Restricts the list to return only zones with this domain name.", + "location": "query", + "type": "string" + }, + "location": { + "default": "global", + "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + "location": "path", + "required": true, + "type": "string" + }, + "maxResults": { + "description": "Optional. Maximum number of results to be returned. If unspecified, the server decides how many results to return.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Identifies the project addressed by this request.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "dns/v2/projects/{project}/locations/{location}/managedZones", + "response": { + "$ref": "ManagedZonesListResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/ndev.clouddns.readonly", + "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + ] + }, + "patch": { + "description": "Applies a partial update to an existing ManagedZone.", + "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}", + "httpMethod": "PATCH", + "id": "dns.managedZones.patch", + "parameterOrder": [ + "project", + "location", + "managedZone" + ], + "parameters": { + "clientOperationId": { + "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + "location": "query", + "type": "string" + }, + "location": { + "default": "global", + "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + "location": "path", + "required": true, + "type": "string" + }, + "managedZone": { + "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Identifies the project addressed by this request.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}", + "request": { + "$ref": "ManagedZone" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + ] + }, + "update": { + "description": "Updates an existing ManagedZone.", + "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}", + "httpMethod": "PUT", + "id": "dns.managedZones.update", + "parameterOrder": [ + "project", + "location", + "managedZone" + ], + "parameters": { + "clientOperationId": { + "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + "location": "query", + "type": "string" + }, + "location": { + "default": "global", + "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + "location": "path", + "required": true, + "type": "string" + }, + "managedZone": { + "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Identifies the project addressed by this request.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}", + "request": { + "$ref": "ManagedZone" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + ] + } + } + }, + "policies": { + "methods": { + "create": { + "description": "Creates a new Policy.", + "flatPath": "dns/v2/projects/{project}/locations/{location}/policies", + "httpMethod": "POST", + "id": "dns.policies.create", + "parameterOrder": [ + "project", + "location" + ], + "parameters": { + "clientOperationId": { + "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + "location": "query", + "type": "string" + }, + "location": { + "default": "global", + "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Identifies the project addressed by this request.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "dns/v2/projects/{project}/locations/{location}/policies", + "request": { + "$ref": "Policy" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + ] + }, + "delete": { + "description": "Deletes a previously created Policy. Fails if the policy is still being referenced by a network.", + "flatPath": "dns/v2/projects/{project}/locations/{location}/policies/{policy}", + "httpMethod": "DELETE", + "id": "dns.policies.delete", + "parameterOrder": [ + "project", + "location", + "policy" + ], + "parameters": { + "clientOperationId": { + "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + "location": "query", + "type": "string" + }, + "location": { + "default": "global", + "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + "location": "path", + "required": true, + "type": "string" + }, + "policy": { + "description": "User given friendly name of the policy addressed by this request.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Identifies the project addressed by this request.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "dns/v2/projects/{project}/locations/{location}/policies/{policy}", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + ] + }, + "get": { + "description": "Fetches the representation of an existing Policy.", + "flatPath": "dns/v2/projects/{project}/locations/{location}/policies/{policy}", + "httpMethod": "GET", + "id": "dns.policies.get", + "parameterOrder": [ + "project", + "location", + "policy" + ], + "parameters": { + "clientOperationId": { + "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + "location": "query", + "type": "string" + }, + "location": { + "default": "global", + "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + "location": "path", + "required": true, + "type": "string" + }, + "policy": { + "description": "User given friendly name of the policy addressed by this request.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Identifies the project addressed by this request.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "dns/v2/projects/{project}/locations/{location}/policies/{policy}", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/ndev.clouddns.readonly", + "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + ] + }, + "list": { + "description": "Enumerates all Policies associated with a project.", + "flatPath": "dns/v2/projects/{project}/locations/{location}/policies", + "httpMethod": "GET", + "id": "dns.policies.list", + "parameterOrder": [ + "project", + "location" + ], + "parameters": { + "location": { + "default": "global", + "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + "location": "path", + "required": true, + "type": "string" + }, + "maxResults": { + "description": "Optional. Maximum number of results to be returned. If unspecified, the server decides how many results to return.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Identifies the project addressed by this request.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "dns/v2/projects/{project}/locations/{location}/policies", + "response": { + "$ref": "PoliciesListResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/ndev.clouddns.readonly", + "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + ] + }, + "patch": { + "description": "Applies a partial update to an existing Policy.", + "flatPath": "dns/v2/projects/{project}/locations/{location}/policies/{policy}", + "httpMethod": "PATCH", + "id": "dns.policies.patch", + "parameterOrder": [ + "project", + "location", + "policy" + ], + "parameters": { + "clientOperationId": { + "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + "location": "query", + "type": "string" + }, + "location": { + "default": "global", + "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + "location": "path", + "required": true, + "type": "string" + }, + "policy": { + "description": "User given friendly name of the policy addressed by this request.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Identifies the project addressed by this request.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "dns/v2/projects/{project}/locations/{location}/policies/{policy}", + "request": { + "$ref": "Policy" + }, + "response": { + "$ref": "PoliciesPatchResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + ] + }, + "update": { + "description": "Updates an existing Policy.", + "flatPath": "dns/v2/projects/{project}/locations/{location}/policies/{policy}", + "httpMethod": "PUT", + "id": "dns.policies.update", + "parameterOrder": [ + "project", + "location", + "policy" + ], + "parameters": { + "clientOperationId": { + "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + "location": "query", + "type": "string" + }, + "location": { + "default": "global", + "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + "location": "path", + "required": true, + "type": "string" + }, + "policy": { + "description": "User given friendly name of the policy addressed by this request.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Identifies the project addressed by this request.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "dns/v2/projects/{project}/locations/{location}/policies/{policy}", + "request": { + "$ref": "Policy" + }, + "response": { + "$ref": "PoliciesUpdateResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + ] + } + } + }, + "projects": { + "methods": { + "get": { + "description": "Fetches the representation of an existing Project.", + "flatPath": "dns/v2/projects/{project}/locations/{location}", + "httpMethod": "GET", + "id": "dns.projects.get", + "parameterOrder": [ + "project", + "location" + ], + "parameters": { + "clientOperationId": { + "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + "location": "query", + "type": "string" + }, + "location": { + "default": "global", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Identifies the project addressed by this request.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "dns/v2/projects/{project}/locations/{location}", + "response": { + "$ref": "Project" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/ndev.clouddns.readonly", + "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + ] + } + } + }, + "resourceRecordSets": { + "methods": { + "create": { + "description": "Creates a new ResourceRecordSet.", + "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/rrsets", + "httpMethod": "POST", + "id": "dns.resourceRecordSets.create", + "parameterOrder": [ + "project", + "location", + "managedZone" + ], + "parameters": { + "clientOperationId": { + "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + "location": "query", + "type": "string" + }, + "location": { + "default": "global", + "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + "location": "path", + "required": true, + "type": "string" + }, + "managedZone": { + "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Identifies the project addressed by this request.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/rrsets", + "request": { + "$ref": "ResourceRecordSet" + }, + "response": { + "$ref": "ResourceRecordSet" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + ] + }, + "delete": { + "description": "Deletes a previously created ResourceRecordSet.", + "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/rrsets/{name}/{type}", + "httpMethod": "DELETE", + "id": "dns.resourceRecordSets.delete", + "parameterOrder": [ + "project", + "location", + "managedZone", + "name", + "type" + ], + "parameters": { + "clientOperationId": { + "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + "location": "query", + "type": "string" + }, + "location": { + "default": "global", + "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + "location": "path", + "required": true, + "type": "string" + }, + "managedZone": { + "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.", + "location": "path", + "required": true, + "type": "string" + }, + "name": { + "description": "Fully qualified domain name.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Identifies the project addressed by this request.", + "location": "path", + "required": true, + "type": "string" + }, + "type": { + "description": "RRSet type.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/rrsets/{name}/{type}", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + ] + }, + "get": { + "description": "Fetches the representation of an existing ResourceRecordSet.", + "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/rrsets/{name}/{type}", + "httpMethod": "GET", + "id": "dns.resourceRecordSets.get", + "parameterOrder": [ + "project", + "location", + "managedZone", + "name", + "type" + ], + "parameters": { + "clientOperationId": { + "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + "location": "query", + "type": "string" + }, + "location": { + "default": "global", + "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + "location": "path", + "required": true, + "type": "string" + }, + "managedZone": { + "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.", + "location": "path", + "required": true, + "type": "string" + }, + "name": { + "description": "Fully qualified domain name.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Identifies the project addressed by this request.", + "location": "path", + "required": true, + "type": "string" + }, + "type": { + "description": "RRSet type.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/rrsets/{name}/{type}", + "response": { + "$ref": "ResourceRecordSet" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/ndev.clouddns.readonly", + "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + ] + }, + "list": { + "description": "Enumerates ResourceRecordSets that you have created but not yet deleted.", + "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/rrsets", + "httpMethod": "GET", + "id": "dns.resourceRecordSets.list", + "parameterOrder": [ + "project", + "location", + "managedZone" + ], + "parameters": { + "location": { + "default": "global", + "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + "location": "path", + "required": true, + "type": "string" + }, + "managedZone": { + "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.", + "location": "path", + "required": true, + "type": "string" + }, + "maxResults": { + "description": "Optional. Maximum number of results to be returned. If unspecified, the server decides how many results to return.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "name": { + "description": "Restricts the list to return only records with this fully qualified domain name.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Identifies the project addressed by this request.", + "location": "path", + "required": true, + "type": "string" + }, + "type": { + "description": "Restricts the list to return only records of this type. If present, the \"name\" parameter must also be present.", + "location": "query", + "type": "string" + } + }, + "path": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/rrsets", + "response": { + "$ref": "ResourceRecordSetsListResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/ndev.clouddns.readonly", + "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + ] + }, + "patch": { + "description": "Applies a partial update to an existing ResourceRecordSet.", + "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/rrsets/{name}/{type}", + "httpMethod": "PATCH", + "id": "dns.resourceRecordSets.patch", + "parameterOrder": [ + "project", + "location", + "managedZone", + "name", + "type" + ], + "parameters": { + "clientOperationId": { + "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + "location": "query", + "type": "string" + }, + "location": { + "default": "global", + "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + "location": "path", + "required": true, + "type": "string" + }, + "managedZone": { + "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.", + "location": "path", + "required": true, + "type": "string" + }, + "name": { + "description": "Fully qualified domain name.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Identifies the project addressed by this request.", + "location": "path", + "required": true, + "type": "string" + }, + "type": { + "description": "RRSet type.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/rrsets/{name}/{type}", + "request": { + "$ref": "ResourceRecordSet" + }, + "response": { + "$ref": "ResourceRecordSet" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + ] + } + } + }, + "responsePolicies": { + "methods": { + "create": { + "description": "Creates a new Response Policy", + "flatPath": "dns/v2/projects/{project}/locations/{location}/responsePolicies", + "httpMethod": "POST", + "id": "dns.responsePolicies.create", + "parameterOrder": [ + "project", + "location" + ], + "parameters": { + "clientOperationId": { + "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + "location": "query", + "type": "string" + }, + "location": { + "default": "global", + "description": "Specifies the location of the resource, only applicable in the v APIs. This information will be used for routing and will be part of the resource name.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Identifies the project addressed by this request.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "dns/v2/projects/{project}/locations/{location}/responsePolicies", + "request": { + "$ref": "ResponsePolicy" + }, + "response": { + "$ref": "ResponsePolicy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + ] + }, + "delete": { + "description": "Deletes a previously created Response Policy. Fails if the response policy is non-empty or still being referenced by a network.", + "flatPath": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}", + "httpMethod": "DELETE", + "id": "dns.responsePolicies.delete", + "parameterOrder": [ + "project", + "location", + "responsePolicy" + ], + "parameters": { + "clientOperationId": { + "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + "location": "query", + "type": "string" + }, + "location": { + "default": "global", + "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Identifies the project addressed by this request.", + "location": "path", + "required": true, + "type": "string" + }, + "responsePolicy": { + "description": "User assigned name of the Response Policy addressed by this request.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + ] + }, + "get": { + "description": "Fetches the representation of an existing Response Policy.", + "flatPath": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}", + "httpMethod": "GET", + "id": "dns.responsePolicies.get", + "parameterOrder": [ + "project", + "location", + "responsePolicy" + ], + "parameters": { + "clientOperationId": { + "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + "location": "query", + "type": "string" + }, + "location": { + "default": "global", + "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Identifies the project addressed by this request.", + "location": "path", + "required": true, + "type": "string" + }, + "responsePolicy": { + "description": "User assigned name of the Response Policy addressed by this request.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}", + "response": { + "$ref": "ResponsePolicy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/ndev.clouddns.readonly", + "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + ] + }, + "list": { + "description": "Enumerates all Response Policies associated with a project.", + "flatPath": "dns/v2/projects/{project}/locations/{location}/responsePolicies", + "httpMethod": "GET", + "id": "dns.responsePolicies.list", + "parameterOrder": [ + "project", + "location" + ], + "parameters": { + "location": { + "default": "global", + "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + "location": "path", + "required": true, + "type": "string" + }, + "maxResults": { + "description": "Optional. Maximum number of results to be returned. If unspecified, the server decides how many results to return.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Identifies the project addressed by this request.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "dns/v2/projects/{project}/locations/{location}/responsePolicies", + "response": { + "$ref": "ResponsePoliciesListResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/ndev.clouddns.readonly", + "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + ] + }, + "patch": { + "description": "Applies a partial update to an existing Response Policy.", + "flatPath": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}", + "httpMethod": "PATCH", + "id": "dns.responsePolicies.patch", + "parameterOrder": [ + "project", + "location", + "responsePolicy" + ], + "parameters": { + "clientOperationId": { + "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + "location": "query", + "type": "string" + }, + "location": { + "default": "global", + "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Identifies the project addressed by this request.", + "location": "path", + "required": true, + "type": "string" + }, + "responsePolicy": { + "description": "User assigned name of the Respones Policy addressed by this request.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}", + "request": { + "$ref": "ResponsePolicy" + }, + "response": { + "$ref": "ResponsePoliciesPatchResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + ] + }, + "update": { + "description": "Updates an existing Response Policy.", + "flatPath": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}", + "httpMethod": "PUT", + "id": "dns.responsePolicies.update", + "parameterOrder": [ + "project", + "location", + "responsePolicy" + ], + "parameters": { + "clientOperationId": { + "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + "location": "query", + "type": "string" + }, + "location": { + "default": "global", + "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Identifies the project addressed by this request.", + "location": "path", + "required": true, + "type": "string" + }, + "responsePolicy": { + "description": "User assigned name of the Response Policy addressed by this request.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}", + "request": { + "$ref": "ResponsePolicy" + }, + "response": { + "$ref": "ResponsePoliciesUpdateResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + ] + } + } + }, + "responsePolicyRules": { + "methods": { + "create": { + "description": "Creates a new Response Policy Rule.", + "flatPath": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules", + "httpMethod": "POST", + "id": "dns.responsePolicyRules.create", + "parameterOrder": [ + "project", + "location", + "responsePolicy" + ], + "parameters": { + "clientOperationId": { + "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + "location": "query", + "type": "string" + }, + "location": { + "default": "global", + "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Identifies the project addressed by this request.", + "location": "path", + "required": true, + "type": "string" + }, + "responsePolicy": { + "description": "User assigned name of the Response Policy containing the Response Policy Rule.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules", + "request": { + "$ref": "ResponsePolicyRule" + }, + "response": { + "$ref": "ResponsePolicyRule" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + ] + }, + "delete": { + "description": "Deletes a previously created Response Policy Rule.", + "flatPath": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}", + "httpMethod": "DELETE", + "id": "dns.responsePolicyRules.delete", + "parameterOrder": [ + "project", + "location", + "responsePolicy", + "responsePolicyRule" + ], + "parameters": { + "clientOperationId": { + "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + "location": "query", + "type": "string" + }, + "location": { + "default": "global", + "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Identifies the project addressed by this request.", + "location": "path", + "required": true, + "type": "string" + }, + "responsePolicy": { + "description": "User assigned name of the Response Policy containing the Response Policy Rule.", + "location": "path", + "required": true, + "type": "string" + }, + "responsePolicyRule": { + "description": "User assigned name of the Response Policy Rule addressed by this request.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + ] + }, + "get": { + "description": "Fetches the representation of an existing Response Policy Rule.", + "flatPath": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}", + "httpMethod": "GET", + "id": "dns.responsePolicyRules.get", + "parameterOrder": [ + "project", + "location", + "responsePolicy", + "responsePolicyRule" + ], + "parameters": { + "clientOperationId": { + "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + "location": "query", + "type": "string" + }, + "location": { + "default": "global", + "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Identifies the project addressed by this request.", + "location": "path", + "required": true, + "type": "string" + }, + "responsePolicy": { + "description": "User assigned name of the Response Policy containing the Response Policy Rule.", + "location": "path", + "required": true, + "type": "string" + }, + "responsePolicyRule": { + "description": "User assigned name of the Response Policy Rule addressed by this request.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}", + "response": { + "$ref": "ResponsePolicyRule" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/ndev.clouddns.readonly", + "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + ] + }, + "list": { + "description": "Enumerates all Response Policy Rules associated with a project.", + "flatPath": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules", + "httpMethod": "GET", + "id": "dns.responsePolicyRules.list", + "parameterOrder": [ + "project", + "location", + "responsePolicy" + ], + "parameters": { + "location": { + "default": "global", + "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + "location": "path", + "required": true, + "type": "string" + }, + "maxResults": { + "description": "Optional. Maximum number of results to be returned. If unspecified, the server decides how many results to return.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Identifies the project addressed by this request.", + "location": "path", + "required": true, + "type": "string" + }, + "responsePolicy": { + "description": "User assigned name of the Response Policy to list.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules", + "response": { + "$ref": "ResponsePolicyRulesListResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/ndev.clouddns.readonly", + "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + ] + }, + "patch": { + "description": "Applies a partial update to an existing Response Policy Rule.", + "flatPath": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}", + "httpMethod": "PATCH", + "id": "dns.responsePolicyRules.patch", + "parameterOrder": [ + "project", + "location", + "responsePolicy", + "responsePolicyRule" + ], + "parameters": { + "clientOperationId": { + "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + "location": "query", + "type": "string" + }, + "location": { + "default": "global", + "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Identifies the project addressed by this request.", + "location": "path", + "required": true, + "type": "string" + }, + "responsePolicy": { + "description": "User assigned name of the Response Policy containing the Response Policy Rule.", + "location": "path", + "required": true, + "type": "string" + }, + "responsePolicyRule": { + "description": "User assigned name of the Response Policy Rule addressed by this request.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}", + "request": { + "$ref": "ResponsePolicyRule" + }, + "response": { + "$ref": "ResponsePolicyRulesPatchResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + ] + }, + "update": { + "description": "Updates an existing Response Policy Rule.", + "flatPath": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}", + "httpMethod": "PUT", + "id": "dns.responsePolicyRules.update", + "parameterOrder": [ + "project", + "location", + "responsePolicy", + "responsePolicyRule" + ], + "parameters": { + "clientOperationId": { + "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + "location": "query", + "type": "string" + }, + "location": { + "default": "global", + "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Identifies the project addressed by this request.", + "location": "path", + "required": true, + "type": "string" + }, + "responsePolicy": { + "description": "User assigned name of the Response Policy containing the Response Policy Rule.", + "location": "path", + "required": true, + "type": "string" + }, + "responsePolicyRule": { + "description": "User assigned name of the Response Policy Rule addressed by this request.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}", + "request": { + "$ref": "ResponsePolicyRule" + }, + "response": { + "$ref": "ResponsePolicyRulesUpdateResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + ] + } + } + } + }, + "revision": "20220217", + "rootUrl": "https://dns.googleapis.com/", + "schemas": { + "Change": { + "description": "A Change represents a set of ResourceRecordSet additions and deletions applied atomically to a ManagedZone. ResourceRecordSets within a ManagedZone are modified by creating a new Change element in the Changes collection. In turn the Changes collection also records the past modifications to the ResourceRecordSets in a ManagedZone. The current state of the ManagedZone is the sum effect of applying all Change elements in the Changes collection in sequence.", + "id": "Change", + "properties": { + "additions": { + "description": "Which ResourceRecordSets to add?", + "items": { + "$ref": "ResourceRecordSet" + }, + "type": "array" + }, + "deletions": { + "description": "Which ResourceRecordSets to remove? Must match existing data exactly.", + "items": { + "$ref": "ResourceRecordSet" + }, + "type": "array" + }, + "id": { + "description": "Unique identifier for the resource; defined by the server (output only).", + "type": "string" + }, + "isServing": { + "description": "If the DNS queries for the zone will be served.", + "type": "boolean" + }, + "kind": { + "default": "dns#change", + "type": "string" + }, + "startTime": { + "description": "The time that this operation was started by the server (output only). This is in RFC3339 text format.", + "type": "string" + }, + "status": { + "description": "Status of the operation (output only). A status of \"done\" means that the request to update the authoritative servers has been sent, but the servers might not be updated yet.", + "enum": [ + "PENDING", + "DONE" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "ChangesListResponse": { + "description": "The response to a request to enumerate Changes to a ResourceRecordSets collection.", + "id": "ChangesListResponse", + "properties": { + "changes": { + "description": "The requested changes.", + "items": { + "$ref": "Change" + }, + "type": "array" + }, + "header": { + "$ref": "ResponseHeader" + }, + "kind": { + "default": "dns#changesListResponse", + "description": "Type of resource.", + "type": "string" + }, + "nextPageToken": { + "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your pagination token. This lets you retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You cannot retrieve a \"snapshot\" of collections larger than the maximum page size.", + "type": "string" + } + }, + "type": "object" + }, + "DnsKey": { + "description": "A DNSSEC key pair.", + "id": "DnsKey", + "properties": { + "algorithm": { + "description": "String mnemonic specifying the DNSSEC algorithm of this key. Immutable after creation time.", + "enum": [ + "RSASHA1", + "RSASHA256", + "RSASHA512", + "ECDSAP256SHA256", + "ECDSAP384SHA384" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "creationTime": { + "description": "The time that this resource was created in the control plane. This is in RFC3339 text format. Output only.", + "type": "string" + }, + "description": { + "description": "A mutable string of at most 1024 characters associated with this resource for the user's convenience. Has no effect on the resource's function.", + "type": "string" + }, + "digests": { + "description": "Cryptographic hashes of the DNSKEY resource record associated with this DnsKey. These digests are needed to construct a DS record that points at this DNS key. Output only.", + "items": { + "$ref": "DnsKeyDigest" + }, + "type": "array" + }, + "id": { + "description": "Unique identifier for the resource; defined by the server (output only).", + "type": "string" + }, + "isActive": { + "description": "Active keys are used to sign subsequent changes to the ManagedZone. Inactive keys are still present as DNSKEY Resource Records for the use of resolvers validating existing signatures.", + "type": "boolean" + }, + "keyLength": { + "description": "Length of the key in bits. Specified at creation time, and then immutable.", + "format": "uint32", + "type": "integer" + }, + "keyTag": { + "description": "The key tag is a non-cryptographic hash of the a DNSKEY resource record associated with this DnsKey. The key tag can be used to identify a DNSKEY more quickly (but it is not a unique identifier). In particular, the key tag is used in a parent zone's DS record to point at the DNSKEY in this child ManagedZone. The key tag is a number in the range [0, 65535] and the algorithm to calculate it is specified in RFC4034 Appendix B. Output only.", + "format": "int32", + "type": "integer" + }, + "kind": { + "default": "dns#dnsKey", + "type": "string" + }, + "publicKey": { + "description": "Base64 encoded public half of this key. Output only.", + "type": "string" + }, + "type": { + "description": "One of \"KEY_SIGNING\" or \"ZONE_SIGNING\". Keys of type KEY_SIGNING have the Secure Entry Point flag set and, when active, are used to sign only resource record sets of type DNSKEY. Otherwise, the Secure Entry Point flag is cleared, and this key is used to sign only resource record sets of other types. Immutable after creation time.", + "enum": [ + "KEY_SIGNING", + "ZONE_SIGNING" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "DnsKeyDigest": { + "id": "DnsKeyDigest", + "properties": { + "digest": { + "description": "The base-16 encoded bytes of this digest. Suitable for use in a DS resource record.", + "type": "string" + }, + "type": { + "description": "Specifies the algorithm used to calculate this digest.", + "enum": [ + "SHA1", + "SHA256", + "SHA384" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "DnsKeySpec": { + "description": "Parameters for DnsKey key generation. Used for generating initial keys for a new ManagedZone and as default when adding a new DnsKey.", + "id": "DnsKeySpec", + "properties": { + "algorithm": { + "description": "String mnemonic specifying the DNSSEC algorithm of this key.", + "enum": [ + "RSASHA1", + "RSASHA256", + "RSASHA512", + "ECDSAP256SHA256", + "ECDSAP384SHA384" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "keyLength": { + "description": "Length of the keys in bits.", + "format": "uint32", + "type": "integer" + }, + "keyType": { + "description": "Specifies whether this is a key signing key (KSK) or a zone signing key (ZSK). Key signing keys have the Secure Entry Point flag set and, when active, are only used to sign resource record sets of type DNSKEY. Zone signing keys do not have the Secure Entry Point flag set and are used to sign all other types of resource record sets.", + "enum": [ + "KEY_SIGNING", + "ZONE_SIGNING" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "kind": { + "default": "dns#dnsKeySpec", + "type": "string" + } + }, + "type": "object" + }, + "DnsKeysListResponse": { + "description": "The response to a request to enumerate DnsKeys in a ManagedZone.", + "id": "DnsKeysListResponse", + "properties": { + "dnsKeys": { + "description": "The requested resources.", + "items": { + "$ref": "DnsKey" + }, + "type": "array" + }, + "header": { + "$ref": "ResponseHeader" + }, + "kind": { + "default": "dns#dnsKeysListResponse", + "description": "Type of resource.", + "type": "string" + }, + "nextPageToken": { + "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your pagination token. In this way you can retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. There is no way to retrieve a \"snapshot\" of collections larger than the maximum page size.", + "type": "string" + } + }, + "type": "object" + }, + "ManagedZone": { + "description": "A zone is a subtree of the DNS namespace under one administrative responsibility. A ManagedZone is a resource that represents a DNS zone hosted by the Cloud DNS service.", + "id": "ManagedZone", + "properties": { + "cloudLoggingConfig": { + "$ref": "ManagedZoneCloudLoggingConfig" + }, + "creationTime": { + "description": "The time that this resource was created on the server. This is in RFC3339 text format. Output only.", + "type": "string" + }, + "description": { + "description": "A mutable string of at most 1024 characters associated with this resource for the user's convenience. Has no effect on the managed zone's function.", + "type": "string" + }, + "dnsName": { + "description": "The DNS name of this managed zone, for instance \"example.com.\".", + "type": "string" + }, + "dnssecConfig": { + "$ref": "ManagedZoneDnsSecConfig", + "description": "DNSSEC configuration." + }, + "forwardingConfig": { + "$ref": "ManagedZoneForwardingConfig", + "description": "The presence for this field indicates that outbound forwarding is enabled for this zone. The value of this field contains the set of destinations to forward to." + }, + "id": { + "description": "Unique identifier for the resource; defined by the server (output only)", + "format": "uint64", + "type": "string" + }, + "kind": { + "default": "dns#managedZone", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "User labels.", + "type": "object" + }, + "name": { + "description": "User assigned name for this resource. Must be unique within the project. The name must be 1-63 characters long, must begin with a letter, end with a letter or digit, and only contain lowercase letters, digits or dashes.", + "type": "string" + }, + "nameServerSet": { + "description": "Optionally specifies the NameServerSet for this ManagedZone. A NameServerSet is a set of DNS name servers that all host the same ManagedZones. Most users leave this field unset. If you need to use this field, contact your account team.", + "type": "string" + }, + "nameServers": { + "description": "Delegate your managed_zone to these virtual name servers; defined by the server (output only)", + "items": { + "type": "string" + }, + "type": "array" + }, + "peeringConfig": { + "$ref": "ManagedZonePeeringConfig", + "description": "The presence of this field indicates that DNS Peering is enabled for this zone. The value of this field contains the network to peer with." + }, + "privateVisibilityConfig": { + "$ref": "ManagedZonePrivateVisibilityConfig", + "description": "For privately visible zones, the set of Virtual Private Cloud resources that the zone is visible from." + }, + "reverseLookupConfig": { + "$ref": "ManagedZoneReverseLookupConfig", + "description": "The presence of this field indicates that this is a managed reverse lookup zone and Cloud DNS resolves reverse lookup queries using automatically configured records for VPC resources. This only applies to networks listed under private_visibility_config." + }, + "serviceDirectoryConfig": { + "$ref": "ManagedZoneServiceDirectoryConfig", + "description": "This field links to the associated service directory namespace. Do not set this field for public zones or forwarding zones." + }, + "visibility": { + "description": "The zone's visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources.", + "enum": [ + "PUBLIC", + "PRIVATE" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "ManagedZoneCloudLoggingConfig": { + "description": "Cloud Logging configurations for publicly visible zones.", + "id": "ManagedZoneCloudLoggingConfig", + "properties": { + "enableLogging": { + "description": "If set, enable query logging for this ManagedZone. False by default, making logging opt-in.", + "type": "boolean" + }, + "kind": { + "default": "dns#managedZoneCloudLoggingConfig", + "type": "string" + } + }, + "type": "object" + }, + "ManagedZoneDnsSecConfig": { + "id": "ManagedZoneDnsSecConfig", + "properties": { + "defaultKeySpecs": { + "description": "Specifies parameters for generating initial DnsKeys for this ManagedZone. Can only be changed while the state is OFF.", + "items": { + "$ref": "DnsKeySpec" + }, + "type": "array" + }, + "kind": { + "default": "dns#managedZoneDnsSecConfig", + "type": "string" + }, + "nonExistence": { + "description": "Specifies the mechanism for authenticated denial-of-existence responses. Can only be changed while the state is OFF.", + "enum": [ + "NSEC", + "NSEC3" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "state": { + "description": "Specifies whether DNSSEC is enabled, and what mode it is in.", + "enum": [ + "OFF", + "ON", + "TRANSFER" + ], + "enumDescriptions": [ + "DNSSEC is disabled; the zone is not signed.", + "DNSSEC is enabled; the zone is signed and fully managed.", + "DNSSEC is enabled, but in a \"transfer\" mode." + ], + "type": "string" + } + }, + "type": "object" + }, + "ManagedZoneForwardingConfig": { + "id": "ManagedZoneForwardingConfig", + "properties": { + "kind": { + "default": "dns#managedZoneForwardingConfig", + "type": "string" + }, + "targetNameServers": { + "description": "List of target name servers to forward to. Cloud DNS selects the best available name server if more than one target is given.", + "items": { + "$ref": "ManagedZoneForwardingConfigNameServerTarget" + }, + "type": "array" + } + }, + "type": "object" + }, + "ManagedZoneForwardingConfigNameServerTarget": { + "id": "ManagedZoneForwardingConfigNameServerTarget", + "properties": { + "forwardingPath": { + "description": "Forwarding path for this NameServerTarget. If unset or set to DEFAULT, Cloud DNS makes forwarding decisions based on IP address ranges; that is, RFC1918 addresses go to the VPC network, non-RFC1918 addresses go to the internet. When set to PRIVATE, Cloud DNS always sends queries through the VPC network for this target.", + "enum": [ + "DEFAULT", + "PRIVATE" + ], + "enumDescriptions": [ + "Cloud DNS makes forwarding decisions based on address ranges; that is, RFC1918 addresses forward to the target through the VPC and non-RFC1918 addresses forward to the target through the internet", + "Cloud DNS always forwards to this target through the VPC." + ], + "type": "string" + }, + "ipv4Address": { + "description": "IPv4 address of a target name server.", + "type": "string" + }, + "kind": { + "default": "dns#managedZoneForwardingConfigNameServerTarget", + "type": "string" + } + }, + "type": "object" + }, + "ManagedZoneOperationsListResponse": { + "id": "ManagedZoneOperationsListResponse", + "properties": { + "header": { + "$ref": "ResponseHeader" + }, + "kind": { + "default": "dns#managedZoneOperationsListResponse", + "type": "string" + }, + "nextPageToken": { + "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. This lets you retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You cannot retrieve a consistent snapshot of a collection larger than the maximum page size.", + "type": "string" + }, + "operations": { + "description": "The operation resources.", + "items": { + "$ref": "Operation" + }, + "type": "array" + } + }, + "type": "object" + }, + "ManagedZonePeeringConfig": { + "id": "ManagedZonePeeringConfig", + "properties": { + "kind": { + "default": "dns#managedZonePeeringConfig", + "type": "string" + }, + "targetNetwork": { + "$ref": "ManagedZonePeeringConfigTargetNetwork", + "description": "The network with which to peer." + } + }, + "type": "object" + }, + "ManagedZonePeeringConfigTargetNetwork": { + "id": "ManagedZonePeeringConfigTargetNetwork", + "properties": { + "deactivateTime": { + "description": "The time at which the zone was deactivated, in RFC 3339 date-time format. An empty string indicates that the peering connection is active. The producer network can deactivate a zone. The zone is automatically deactivated if the producer network that the zone targeted is deleted. Output only.", + "type": "string" + }, + "kind": { + "default": "dns#managedZonePeeringConfigTargetNetwork", + "type": "string" + }, + "networkUrl": { + "description": "The fully qualified URL of the VPC network to forward queries to. This should be formatted like https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}", + "type": "string" + } + }, + "type": "object" + }, + "ManagedZonePrivateVisibilityConfig": { + "id": "ManagedZonePrivateVisibilityConfig", + "properties": { + "gkeClusters": { + "description": "The list of Google Kubernetes Engine clusters that can see this zone.", + "items": { + "$ref": "ManagedZonePrivateVisibilityConfigGKECluster" + }, + "type": "array" + }, + "kind": { + "default": "dns#managedZonePrivateVisibilityConfig", + "type": "string" + }, + "networks": { + "description": "The list of VPC networks that can see this zone.", + "items": { + "$ref": "ManagedZonePrivateVisibilityConfigNetwork" + }, + "type": "array" + } + }, + "type": "object" + }, + "ManagedZonePrivateVisibilityConfigGKECluster": { + "id": "ManagedZonePrivateVisibilityConfigGKECluster", + "properties": { + "gkeClusterName": { + "description": "The resource name of the cluster to bind this ManagedZone to. This should be specified in the format like: projects/*/locations/*/clusters/*. This is referenced from GKE projects.locations.clusters.get API: https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/get", + "type": "string" + }, + "kind": { + "default": "dns#managedZonePrivateVisibilityConfigGKECluster", + "type": "string" + } + }, + "type": "object" + }, + "ManagedZonePrivateVisibilityConfigNetwork": { + "id": "ManagedZonePrivateVisibilityConfigNetwork", + "properties": { + "kind": { + "default": "dns#managedZonePrivateVisibilityConfigNetwork", + "type": "string" + }, + "networkUrl": { + "description": "The fully qualified URL of the VPC network to bind to. Format this URL like https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}", + "type": "string" + } + }, + "type": "object" + }, + "ManagedZoneReverseLookupConfig": { + "id": "ManagedZoneReverseLookupConfig", + "properties": { + "kind": { + "default": "dns#managedZoneReverseLookupConfig", + "type": "string" + } + }, + "type": "object" + }, + "ManagedZoneServiceDirectoryConfig": { + "description": "Contains information about Service Directory-backed zones.", + "id": "ManagedZoneServiceDirectoryConfig", + "properties": { + "kind": { + "default": "dns#managedZoneServiceDirectoryConfig", + "type": "string" + }, + "namespace": { + "$ref": "ManagedZoneServiceDirectoryConfigNamespace", + "description": "Contains information about the namespace associated with the zone." + } + }, + "type": "object" + }, + "ManagedZoneServiceDirectoryConfigNamespace": { + "id": "ManagedZoneServiceDirectoryConfigNamespace", + "properties": { + "deletionTime": { + "description": "The time that the namespace backing this zone was deleted; an empty string if it still exists. This is in RFC3339 text format. Output only.", + "type": "string" + }, + "kind": { + "default": "dns#managedZoneServiceDirectoryConfigNamespace", + "type": "string" + }, + "namespaceUrl": { + "description": "The fully qualified URL of the namespace associated with the zone. Format must be https://servicedirectory.googleapis.com/v1/projects/{project}/locations/{location}/namespaces/{namespace}", + "type": "string" + } + }, + "type": "object" + }, + "ManagedZonesListResponse": { + "id": "ManagedZonesListResponse", + "properties": { + "header": { + "$ref": "ResponseHeader" + }, + "kind": { + "default": "dns#managedZonesListResponse", + "description": "Type of resource.", + "type": "string" + }, + "managedZones": { + "description": "The managed zone resources.", + "items": { + "$ref": "ManagedZone" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. This lets you the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You cannot retrieve a consistent snapshot of a collection larger than the maximum page size.", + "type": "string" + } + }, + "type": "object" + }, + "Operation": { + "description": "An operation represents a successful mutation performed on a Cloud DNS resource. Operations provide: - An audit log of server resource mutations. - A way to recover/retry API calls in the case where the response is never received by the caller. Use the caller specified client_operation_id.", + "id": "Operation", + "properties": { + "dnsKeyContext": { + "$ref": "OperationDnsKeyContext", + "description": "Only populated if the operation targeted a DnsKey (output only)." + }, + "id": { + "description": "Unique identifier for the resource. This is the client_operation_id if the client specified it when the mutation was initiated, otherwise, it is generated by the server. The name must be 1-63 characters long and match the regular expression [-a-z0-9]? (output only)", + "type": "string" + }, + "kind": { + "default": "dns#operation", + "type": "string" + }, + "startTime": { + "description": "The time that this operation was started by the server. This is in RFC3339 text format (output only).", + "type": "string" + }, + "status": { + "description": "Status of the operation. Can be one of the following: \"PENDING\" or \"DONE\" (output only). A status of \"DONE\" means that the request to update the authoritative servers has been sent, but the servers might not be updated yet.", + "enum": [ + "PENDING", + "DONE" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "type": { + "description": "Type of the operation. Operations include insert, update, and delete (output only).", + "type": "string" + }, + "user": { + "description": "User who requested the operation, for example: user@example.com. cloud-dns-system for operations automatically done by the system. (output only)", + "type": "string" + }, + "zoneContext": { + "$ref": "OperationManagedZoneContext", + "description": "Only populated if the operation targeted a ManagedZone (output only)." + } + }, + "type": "object" + }, + "OperationDnsKeyContext": { + "id": "OperationDnsKeyContext", + "properties": { + "newValue": { + "$ref": "DnsKey", + "description": "The post-operation DnsKey resource." + }, + "oldValue": { + "$ref": "DnsKey", + "description": "The pre-operation DnsKey resource." + } + }, + "type": "object" + }, + "OperationManagedZoneContext": { + "id": "OperationManagedZoneContext", + "properties": { + "newValue": { + "$ref": "ManagedZone", + "description": "The post-operation ManagedZone resource." + }, + "oldValue": { + "$ref": "ManagedZone", + "description": "The pre-operation ManagedZone resource." + } + }, + "type": "object" + }, + "PoliciesListResponse": { + "id": "PoliciesListResponse", + "properties": { + "header": { + "$ref": "ResponseHeader" + }, + "kind": { + "default": "dns#policiesListResponse", + "description": "Type of resource.", + "type": "string" + }, + "nextPageToken": { + "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. This lets you the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You cannot retrieve a consistent snapshot of a collection larger than the maximum page size.", + "type": "string" + }, + "policies": { + "description": "The policy resources.", + "items": { + "$ref": "Policy" + }, + "type": "array" + } + }, + "type": "object" + }, + "PoliciesPatchResponse": { + "id": "PoliciesPatchResponse", + "properties": { + "header": { + "$ref": "ResponseHeader" + }, + "policy": { + "$ref": "Policy" + } + }, + "type": "object" + }, + "PoliciesUpdateResponse": { + "id": "PoliciesUpdateResponse", + "properties": { + "header": { + "$ref": "ResponseHeader" + }, + "policy": { + "$ref": "Policy" + } + }, + "type": "object" + }, + "Policy": { + "description": "A policy is a collection of DNS rules applied to one or more Virtual Private Cloud resources.", + "id": "Policy", + "properties": { + "alternativeNameServerConfig": { + "$ref": "PolicyAlternativeNameServerConfig", + "description": "Sets an alternative name server for the associated networks. When specified, all DNS queries are forwarded to a name server that you choose. Names such as .internal are not available when an alternative name server is specified." + }, + "description": { + "description": "A mutable string of at most 1024 characters associated with this resource for the user's convenience. Has no effect on the policy's function.", + "type": "string" + }, + "enableInboundForwarding": { + "description": "Allows networks bound to this policy to receive DNS queries sent by VMs or applications over VPN connections. When enabled, a virtual IP address is allocated from each of the subnetworks that are bound to this policy.", + "type": "boolean" + }, + "enableLogging": { + "description": "Controls whether logging is enabled for the networks bound to this policy. Defaults to no logging if not set.", + "type": "boolean" + }, + "id": { + "description": "Unique identifier for the resource; defined by the server (output only).", + "format": "uint64", + "type": "string" + }, + "kind": { + "default": "dns#policy", + "type": "string" + }, + "name": { + "description": "User-assigned name for this policy.", + "type": "string" + }, + "networks": { + "description": "List of network names specifying networks to which this policy is applied.", + "items": { + "$ref": "PolicyNetwork" + }, + "type": "array" + } + }, + "type": "object" + }, + "PolicyAlternativeNameServerConfig": { + "id": "PolicyAlternativeNameServerConfig", + "properties": { + "kind": { + "default": "dns#policyAlternativeNameServerConfig", + "type": "string" + }, + "targetNameServers": { + "description": "Sets an alternative name server for the associated networks. When specified, all DNS queries are forwarded to a name server that you choose. Names such as .internal are not available when an alternative name server is specified.", + "items": { + "$ref": "PolicyAlternativeNameServerConfigTargetNameServer" + }, + "type": "array" + } + }, + "type": "object" + }, + "PolicyAlternativeNameServerConfigTargetNameServer": { + "id": "PolicyAlternativeNameServerConfigTargetNameServer", + "properties": { + "forwardingPath": { + "description": "Forwarding path for this TargetNameServer. If unset or set to DEFAULT, Cloud DNS makes forwarding decisions based on address ranges; that is, RFC1918 addresses go to the VPC network, non-RFC1918 addresses go to the internet. When set to PRIVATE, Cloud DNS always sends queries through the VPC network for this target.", + "enum": [ + "DEFAULT", + "PRIVATE" + ], + "enumDescriptions": [ + "Cloud DNS makes forwarding decision based on IP address ranges; that is, RFC1918 addresses forward to the target through the VPC and non-RFC1918 addresses forward to the target through the internet", + "Cloud DNS always forwards to this target through the VPC." + ], + "type": "string" + }, + "ipv4Address": { + "description": "IPv4 address to forward to.", + "type": "string" + }, + "kind": { + "default": "dns#policyAlternativeNameServerConfigTargetNameServer", + "type": "string" + } + }, + "type": "object" + }, + "PolicyNetwork": { + "id": "PolicyNetwork", + "properties": { + "kind": { + "default": "dns#policyNetwork", + "type": "string" + }, + "networkUrl": { + "description": "The fully qualified URL of the VPC network to bind to. This should be formatted like https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}", + "type": "string" + } + }, + "type": "object" + }, + "Project": { + "description": "A project resource. The project is a top level container for resources including Cloud DNS ManagedZones. Projects can be created only in the APIs console. Next tag: 7.", + "id": "Project", + "properties": { + "id": { + "description": "User assigned unique identifier for the resource (output only).", + "type": "string" + }, + "kind": { + "default": "dns#project", + "type": "string" + }, + "number": { + "description": "Unique numeric identifier for the resource; defined by the server (output only).", + "format": "uint64", + "type": "string" + }, + "quota": { + "$ref": "Quota", + "description": "Quotas assigned to this project (output only)." + } + }, + "type": "object" + }, + "Quota": { + "description": "Limits associated with a Project.", + "id": "Quota", + "properties": { + "dnsKeysPerManagedZone": { + "description": "Maximum allowed number of DnsKeys per ManagedZone.", + "format": "int32", + "type": "integer" + }, + "itemsPerRoutingPolicy": { + "description": "Maximum allowed number of items per routing policy.", + "format": "int32", + "type": "integer" + }, + "kind": { + "default": "dns#quota", + "type": "string" + }, + "managedZones": { + "description": "Maximum allowed number of managed zones in the project.", + "format": "int32", + "type": "integer" + }, + "managedZonesPerNetwork": { + "description": "Maximum allowed number of managed zones which can be attached to a network.", + "format": "int32", + "type": "integer" + }, + "networksPerManagedZone": { + "description": "Maximum allowed number of networks to which a privately scoped zone can be attached.", + "format": "int32", + "type": "integer" + }, + "networksPerPolicy": { + "description": "Maximum allowed number of networks per policy.", + "format": "int32", + "type": "integer" + }, + "peeringZonesPerTargetNetwork": { + "description": "Maximum allowed number of consumer peering zones per target network owned by this producer project", + "format": "int32", + "type": "integer" + }, + "policies": { + "description": "Maximum allowed number of policies per project.", + "format": "int32", + "type": "integer" + }, + "resourceRecordsPerRrset": { + "description": "Maximum allowed number of ResourceRecords per ResourceRecordSet.", + "format": "int32", + "type": "integer" + }, + "rrsetAdditionsPerChange": { + "description": "Maximum allowed number of ResourceRecordSets to add per ChangesCreateRequest.", + "format": "int32", + "type": "integer" + }, + "rrsetDeletionsPerChange": { + "description": "Maximum allowed number of ResourceRecordSets to delete per ChangesCreateRequest.", + "format": "int32", + "type": "integer" + }, + "rrsetsPerManagedZone": { + "description": "Maximum allowed number of ResourceRecordSets per zone in the project.", + "format": "int32", + "type": "integer" + }, + "targetNameServersPerManagedZone": { + "description": "Maximum allowed number of target name servers per managed forwarding zone.", + "format": "int32", + "type": "integer" + }, + "targetNameServersPerPolicy": { + "description": "Maximum allowed number of alternative target name servers per policy.", + "format": "int32", + "type": "integer" + }, + "totalRrdataSizePerChange": { + "description": "Maximum allowed size for total rrdata in one ChangesCreateRequest in bytes.", + "format": "int32", + "type": "integer" + }, + "whitelistedKeySpecs": { + "description": "DNSSEC algorithm and key length types that can be used for DnsKeys.", + "items": { + "$ref": "DnsKeySpec" + }, + "type": "array" + } + }, + "type": "object" + }, + "RRSetRoutingPolicy": { + "description": "A RRSetRoutingPolicy represents ResourceRecordSet data that is returned dynamically with the response varying based on configured properties such as geolocation or by weighted random selection.", + "id": "RRSetRoutingPolicy", + "properties": { + "geo": { + "$ref": "RRSetRoutingPolicyGeoPolicy" + }, + "kind": { + "default": "dns#rRSetRoutingPolicy", + "type": "string" + }, + "wrr": { + "$ref": "RRSetRoutingPolicyWrrPolicy" + } + }, + "type": "object" + }, + "RRSetRoutingPolicyGeoPolicy": { + "description": "Configures a RRSetRoutingPolicy that routes based on the geo location of the querying user.", + "id": "RRSetRoutingPolicyGeoPolicy", + "properties": { + "items": { + "description": "The primary geo routing configuration. If there are multiple items with the same location, an error is returned instead.", + "items": { + "$ref": "RRSetRoutingPolicyGeoPolicyGeoPolicyItem" + }, + "type": "array" + }, + "kind": { + "default": "dns#rRSetRoutingPolicyGeoPolicy", + "type": "string" + } + }, + "type": "object" + }, + "RRSetRoutingPolicyGeoPolicyGeoPolicyItem": { + "description": "ResourceRecordSet data for one geo location.", + "id": "RRSetRoutingPolicyGeoPolicyGeoPolicyItem", + "properties": { + "kind": { + "default": "dns#rRSetRoutingPolicyGeoPolicyGeoPolicyItem", + "type": "string" + }, + "location": { + "description": "The geo-location granularity is a GCP region. This location string should correspond to a GCP region. e.g. \"us-east1\", \"southamerica-east1\", \"asia-east1\", etc.", + "type": "string" + }, + "rrdatas": { + "items": { + "type": "string" + }, + "type": "array" + }, + "signatureRrdatas": { + "description": "DNSSEC generated signatures for all the rrdata within this item. Note that if health checked targets are provided for DNSSEC enabled zones, there's a restriction of 1 ip per item. .", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "RRSetRoutingPolicyWrrPolicy": { + "description": "Configures a RRSetRoutingPolicy that routes in a weighted round robin fashion.", + "id": "RRSetRoutingPolicyWrrPolicy", + "properties": { + "items": { + "items": { + "$ref": "RRSetRoutingPolicyWrrPolicyWrrPolicyItem" + }, + "type": "array" + }, + "kind": { + "default": "dns#rRSetRoutingPolicyWrrPolicy", + "type": "string" + } + }, + "type": "object" + }, + "RRSetRoutingPolicyWrrPolicyWrrPolicyItem": { + "description": "A routing block which contains the routing information for one WRR item.", + "id": "RRSetRoutingPolicyWrrPolicyWrrPolicyItem", + "properties": { + "kind": { + "default": "dns#rRSetRoutingPolicyWrrPolicyWrrPolicyItem", + "type": "string" + }, + "rrdatas": { + "items": { + "type": "string" + }, + "type": "array" + }, + "signatureRrdatas": { + "description": "DNSSEC generated signatures for all the rrdata within this item. Note that if health checked targets are provided for DNSSEC enabled zones, there's a restriction of 1 ip per item. .", + "items": { + "type": "string" + }, + "type": "array" + }, + "weight": { + "description": "The weight corresponding to this subset of rrdata. When multiple WeightedRoundRobinPolicyItems are configured, the probability of returning an rrset is proportional to its weight relative to the sum of weights configured for all items. This weight should be non-negative.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "ResourceRecordSet": { + "description": "A unit of data that is returned by the DNS servers.", + "id": "ResourceRecordSet", + "properties": { + "kind": { + "default": "dns#resourceRecordSet", + "type": "string" + }, + "name": { + "description": "For example, www.example.com.", + "type": "string" + }, + "routingPolicy": { + "$ref": "RRSetRoutingPolicy", + "description": "Configures dynamic query responses based on geo location of querying user or a weighted round robin based routing policy. A ResourceRecordSet should only have either rrdata (static) or routing_policy (dynamic). An error is returned otherwise." + }, + "rrdatas": { + "description": "As defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1) -- see examples.", + "items": { + "type": "string" + }, + "type": "array" + }, + "signatureRrdatas": { + "description": "As defined in RFC 4034 (section 3.2).", + "items": { + "type": "string" + }, + "type": "array" + }, + "ttl": { + "description": "Number of seconds that this ResourceRecordSet can be cached by resolvers.", + "format": "int32", + "type": "integer" + }, + "type": { + "description": "The identifier of a supported record type. See the list of Supported DNS record types.", + "type": "string" + } + }, + "type": "object" + }, + "ResourceRecordSetsListResponse": { + "id": "ResourceRecordSetsListResponse", + "properties": { + "header": { + "$ref": "ResponseHeader" + }, + "kind": { + "default": "dns#resourceRecordSetsListResponse", + "description": "Type of resource.", + "type": "string" + }, + "nextPageToken": { + "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your pagination token. This lets you retrieve complete contents of even larger collections, one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of elements returned are an inconsistent view of the collection. You cannot retrieve a consistent snapshot of a collection larger than the maximum page size.", + "type": "string" + }, + "rrsets": { + "description": "The resource record set resources.", + "items": { + "$ref": "ResourceRecordSet" + }, + "type": "array" + } + }, + "type": "object" + }, + "ResponseHeader": { + "description": "Elements common to every response.", + "id": "ResponseHeader", + "properties": { + "operationId": { + "description": "For mutating operation requests that completed successfully. This is the client_operation_id if the client specified it, otherwise it is generated by the server (output only).", + "type": "string" + } + }, + "type": "object" + }, + "ResponsePoliciesListResponse": { + "id": "ResponsePoliciesListResponse", + "properties": { + "header": { + "$ref": "ResponseHeader" + }, + "nextPageToken": { + "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. This lets you the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You cannot retrieve a consistent snapshot of a collection larger than the maximum page size.", + "type": "string" + }, + "responsePolicies": { + "description": "The Response Policy resources.", + "items": { + "$ref": "ResponsePolicy" + }, + "type": "array" + } + }, + "type": "object" + }, + "ResponsePoliciesPatchResponse": { + "id": "ResponsePoliciesPatchResponse", + "properties": { + "header": { + "$ref": "ResponseHeader" + }, + "responsePolicy": { + "$ref": "ResponsePolicy" + } + }, + "type": "object" + }, + "ResponsePoliciesUpdateResponse": { + "id": "ResponsePoliciesUpdateResponse", + "properties": { + "header": { + "$ref": "ResponseHeader" + }, + "responsePolicy": { + "$ref": "ResponsePolicy" + } + }, + "type": "object" + }, + "ResponsePolicy": { + "description": "A Response Policy is a collection of selectors that apply to queries made against one or more Virtual Private Cloud networks.", + "id": "ResponsePolicy", + "properties": { + "description": { + "description": "User-provided description for this Response Policy.", + "type": "string" + }, + "gkeClusters": { + "description": "The list of Google Kubernetes Engine clusters to which this response policy is applied.", + "items": { + "$ref": "ResponsePolicyGKECluster" + }, + "type": "array" + }, + "id": { + "description": "Unique identifier for the resource; defined by the server (output only).", + "format": "int64", + "type": "string" + }, + "kind": { + "default": "dns#responsePolicy", + "type": "string" + }, + "networks": { + "description": "List of network names specifying networks to which this policy is applied.", + "items": { + "$ref": "ResponsePolicyNetwork" + }, + "type": "array" + }, + "responsePolicyName": { + "description": "User assigned name for this Response Policy.", + "type": "string" + } + }, + "type": "object" + }, + "ResponsePolicyGKECluster": { + "id": "ResponsePolicyGKECluster", + "properties": { + "gkeClusterName": { + "description": "The resource name of the cluster to bind this response policy to. This should be specified in the format like: projects/*/locations/*/clusters/*. This is referenced from GKE projects.locations.clusters.get API: https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/get", + "type": "string" + }, + "kind": { + "default": "dns#responsePolicyGKECluster", + "type": "string" + } + }, + "type": "object" + }, + "ResponsePolicyNetwork": { + "id": "ResponsePolicyNetwork", + "properties": { + "kind": { + "default": "dns#responsePolicyNetwork", + "type": "string" + }, + "networkUrl": { + "description": "The fully qualified URL of the VPC network to bind to. This should be formatted like https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}", + "type": "string" + } + }, + "type": "object" + }, + "ResponsePolicyRule": { + "description": "A Response Policy Rule is a selector that applies its behavior to queries that match the selector. Selectors are DNS names, which may be wildcards or exact matches. Each DNS query subject to a Response Policy matches at most one ResponsePolicyRule, as identified by the dns_name field with the longest matching suffix.", + "id": "ResponsePolicyRule", + "properties": { + "behavior": { + "description": "Answer this query with a behavior rather than DNS data.", + "enum": [ + "BEHAVIOR_UNSPECIFIED", + "BYPASS_RESPONSE_POLICY" + ], + "enumDescriptions": [ + "", + "Skip a less-specific ResponsePolicyRule and continue normal query logic. This can be used in conjunction with a wildcard to exempt a subset of the wildcard ResponsePolicyRule from the ResponsePolicy behavior and e.g., query the public internet instead. For instance, if these rules exist: *.example.com -\u003e 1.2.3.4 foo.example.com -\u003e PASSTHRU Then a query for 'foo.example.com' skips the wildcard." + ], + "type": "string" + }, + "dnsName": { + "description": "The DNS name (wildcard or exact) to apply this rule to. Must be unique within the Response Policy Rule.", + "type": "string" + }, + "kind": { + "default": "dns#responsePolicyRule", + "type": "string" + }, + "localData": { + "$ref": "ResponsePolicyRuleLocalData", + "description": "Answer this query directly with DNS data. These ResourceRecordSets override any other DNS behavior for the matched name; in particular they override private zones, the public internet, and GCP internal DNS. No SOA nor NS types are allowed." + }, + "ruleName": { + "description": "An identifier for this rule. Must be unique with the ResponsePolicy.", + "type": "string" + } + }, + "type": "object" + }, + "ResponsePolicyRuleLocalData": { + "id": "ResponsePolicyRuleLocalData", + "properties": { + "localDatas": { + "description": "All resource record sets for this selector, one per resource record type. The name must match the dns_name.", + "items": { + "$ref": "ResourceRecordSet" + }, + "type": "array" + } + }, + "type": "object" + }, + "ResponsePolicyRulesListResponse": { + "id": "ResponsePolicyRulesListResponse", + "properties": { + "header": { + "$ref": "ResponseHeader" + }, + "nextPageToken": { + "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. This lets you the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You cannot retrieve a consistent snapshot of a collection larger than the maximum page size.", + "type": "string" + }, + "responsePolicyRules": { + "description": "The Response Policy Rule resources.", + "items": { + "$ref": "ResponsePolicyRule" + }, + "type": "array" + } + }, + "type": "object" + }, + "ResponsePolicyRulesPatchResponse": { + "id": "ResponsePolicyRulesPatchResponse", + "properties": { + "header": { + "$ref": "ResponseHeader" + }, + "responsePolicyRule": { + "$ref": "ResponsePolicyRule" + } + }, + "type": "object" + }, + "ResponsePolicyRulesUpdateResponse": { + "id": "ResponsePolicyRulesUpdateResponse", + "properties": { + "header": { + "$ref": "ResponseHeader" + }, + "responsePolicyRule": { + "$ref": "ResponsePolicyRule" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Cloud DNS API", + "version": "v2" +} \ No newline at end of file diff --git a/dns/v2/dns-gen.go b/dns/v2/dns-gen.go new file mode 100644 index 00000000000..d7b8c37ff91 --- /dev/null +++ b/dns/v2/dns-gen.go @@ -0,0 +1,9589 @@ +// Copyright 2022 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated file. DO NOT EDIT. + +// Package dns provides access to the Cloud DNS API. +// +// For product documentation, see: https://cloud.google.com/dns/docs +// +// Creating a client +// +// Usage example: +// +// import "google.golang.org/api/dns/v2" +// ... +// ctx := context.Background() +// dnsService, err := dns.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// Other authentication options +// +// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// +// dnsService, err := dns.NewService(ctx, option.WithScopes(dns.NdevClouddnsReadwriteScope)) +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// dnsService, err := dns.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// dnsService, err := dns.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. +package dns // import "google.golang.org/api/dns/v2" + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + googleapi "google.golang.org/api/googleapi" + internal "google.golang.org/api/internal" + gensupport "google.golang.org/api/internal/gensupport" + option "google.golang.org/api/option" + internaloption "google.golang.org/api/option/internaloption" + htransport "google.golang.org/api/transport/http" +) + +// Always reference these packages, just in case the auto-generated code +// below doesn't. +var _ = bytes.NewBuffer +var _ = strconv.Itoa +var _ = fmt.Sprintf +var _ = json.NewDecoder +var _ = io.Copy +var _ = url.Parse +var _ = gensupport.MarshalJSON +var _ = googleapi.Version +var _ = errors.New +var _ = strings.Replace +var _ = context.Canceled +var _ = internaloption.WithDefaultEndpoint + +const apiId = "dns:v2" +const apiName = "dns" +const apiVersion = "v2" +const basePath = "https://dns.googleapis.com/" +const mtlsBasePath = "https://dns.mtls.googleapis.com/" + +// OAuth2 scopes used by this API. +const ( + // See, edit, configure, and delete your Google Cloud data and see the + // email address for your Google Account. + CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" + + // View your data across Google Cloud services and see the email address + // of your Google Account + CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only" + + // View your DNS records hosted by Google Cloud DNS + NdevClouddnsReadonlyScope = "https://www.googleapis.com/auth/ndev.clouddns.readonly" + + // View and manage your DNS records hosted by Google Cloud DNS + NdevClouddnsReadwriteScope = "https://www.googleapis.com/auth/ndev.clouddns.readwrite" +) + +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := option.WithScopes( + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/ndev.clouddns.readonly", + "https://www.googleapis.com/auth/ndev.clouddns.readwrite", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Changes = NewChangesService(s) + s.DnsKeys = NewDnsKeysService(s) + s.ManagedZoneOperations = NewManagedZoneOperationsService(s) + s.ManagedZones = NewManagedZonesService(s) + s.Policies = NewPoliciesService(s) + s.Projects = NewProjectsService(s) + s.ResourceRecordSets = NewResourceRecordSetsService(s) + s.ResponsePolicies = NewResponsePoliciesService(s) + s.ResponsePolicyRules = NewResponsePolicyRulesService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Changes *ChangesService + + DnsKeys *DnsKeysService + + ManagedZoneOperations *ManagedZoneOperationsService + + ManagedZones *ManagedZonesService + + Policies *PoliciesService + + Projects *ProjectsService + + ResourceRecordSets *ResourceRecordSetsService + + ResponsePolicies *ResponsePoliciesService + + ResponsePolicyRules *ResponsePolicyRulesService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewChangesService(s *Service) *ChangesService { + rs := &ChangesService{s: s} + return rs +} + +type ChangesService struct { + s *Service +} + +func NewDnsKeysService(s *Service) *DnsKeysService { + rs := &DnsKeysService{s: s} + return rs +} + +type DnsKeysService struct { + s *Service +} + +func NewManagedZoneOperationsService(s *Service) *ManagedZoneOperationsService { + rs := &ManagedZoneOperationsService{s: s} + return rs +} + +type ManagedZoneOperationsService struct { + s *Service +} + +func NewManagedZonesService(s *Service) *ManagedZonesService { + rs := &ManagedZonesService{s: s} + return rs +} + +type ManagedZonesService struct { + s *Service +} + +func NewPoliciesService(s *Service) *PoliciesService { + rs := &PoliciesService{s: s} + return rs +} + +type PoliciesService struct { + s *Service +} + +func NewProjectsService(s *Service) *ProjectsService { + rs := &ProjectsService{s: s} + return rs +} + +type ProjectsService struct { + s *Service +} + +func NewResourceRecordSetsService(s *Service) *ResourceRecordSetsService { + rs := &ResourceRecordSetsService{s: s} + return rs +} + +type ResourceRecordSetsService struct { + s *Service +} + +func NewResponsePoliciesService(s *Service) *ResponsePoliciesService { + rs := &ResponsePoliciesService{s: s} + return rs +} + +type ResponsePoliciesService struct { + s *Service +} + +func NewResponsePolicyRulesService(s *Service) *ResponsePolicyRulesService { + rs := &ResponsePolicyRulesService{s: s} + return rs +} + +type ResponsePolicyRulesService struct { + s *Service +} + +// Change: A Change represents a set of ResourceRecordSet additions and +// deletions applied atomically to a ManagedZone. ResourceRecordSets +// within a ManagedZone are modified by creating a new Change element in +// the Changes collection. In turn the Changes collection also records +// the past modifications to the ResourceRecordSets in a ManagedZone. +// The current state of the ManagedZone is the sum effect of applying +// all Change elements in the Changes collection in sequence. +type Change struct { + // Additions: Which ResourceRecordSets to add? + Additions []*ResourceRecordSet `json:"additions,omitempty"` + + // Deletions: Which ResourceRecordSets to remove? Must match existing + // data exactly. + Deletions []*ResourceRecordSet `json:"deletions,omitempty"` + + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id string `json:"id,omitempty"` + + // IsServing: If the DNS queries for the zone will be served. + IsServing bool `json:"isServing,omitempty"` + + Kind string `json:"kind,omitempty"` + + // StartTime: The time that this operation was started by the server + // (output only). This is in RFC3339 text format. + StartTime string `json:"startTime,omitempty"` + + // Status: Status of the operation (output only). A status of "done" + // means that the request to update the authoritative servers has been + // sent, but the servers might not be updated yet. + // + // Possible values: + // "PENDING" + // "DONE" + Status string `json:"status,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Additions") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "Additions") 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 *Change) MarshalJSON() ([]byte, error) { + type NoMethod Change + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ChangesListResponse: The response to a request to enumerate Changes +// to a ResourceRecordSets collection. +type ChangesListResponse struct { + // Changes: The requested changes. + Changes []*Change `json:"changes,omitempty"` + + Header *ResponseHeader `json:"header,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: The presence of this field indicates that there exist + // more results following your last page of results in pagination order. + // To fetch them, make another list request using this value as your + // pagination token. This lets you retrieve the complete contents of + // even very large collections one page at a time. However, if the + // contents of the collection change between the first and last + // paginated list request, the set of all elements returned are an + // inconsistent view of the collection. You cannot retrieve a "snapshot" + // of collections larger than the maximum page size. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Changes") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "Changes") 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 *ChangesListResponse) MarshalJSON() ([]byte, error) { + type NoMethod ChangesListResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DnsKey: A DNSSEC key pair. +type DnsKey struct { + // Algorithm: String mnemonic specifying the DNSSEC algorithm of this + // key. Immutable after creation time. + // + // Possible values: + // "RSASHA1" + // "RSASHA256" + // "RSASHA512" + // "ECDSAP256SHA256" + // "ECDSAP384SHA384" + Algorithm string `json:"algorithm,omitempty"` + + // CreationTime: The time that this resource was created in the control + // plane. This is in RFC3339 text format. Output only. + CreationTime string `json:"creationTime,omitempty"` + + // Description: A mutable string of at most 1024 characters associated + // with this resource for the user's convenience. Has no effect on the + // resource's function. + Description string `json:"description,omitempty"` + + // Digests: Cryptographic hashes of the DNSKEY resource record + // associated with this DnsKey. These digests are needed to construct a + // DS record that points at this DNS key. Output only. + Digests []*DnsKeyDigest `json:"digests,omitempty"` + + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id string `json:"id,omitempty"` + + // IsActive: Active keys are used to sign subsequent changes to the + // ManagedZone. Inactive keys are still present as DNSKEY Resource + // Records for the use of resolvers validating existing signatures. + IsActive bool `json:"isActive,omitempty"` + + // KeyLength: Length of the key in bits. Specified at creation time, and + // then immutable. + KeyLength int64 `json:"keyLength,omitempty"` + + // KeyTag: The key tag is a non-cryptographic hash of the a DNSKEY + // resource record associated with this DnsKey. The key tag can be used + // to identify a DNSKEY more quickly (but it is not a unique + // identifier). In particular, the key tag is used in a parent zone's DS + // record to point at the DNSKEY in this child ManagedZone. The key tag + // is a number in the range [0, 65535] and the algorithm to calculate it + // is specified in RFC4034 Appendix B. Output only. + KeyTag int64 `json:"keyTag,omitempty"` + + Kind string `json:"kind,omitempty"` + + // PublicKey: Base64 encoded public half of this key. Output only. + PublicKey string `json:"publicKey,omitempty"` + + // Type: One of "KEY_SIGNING" or "ZONE_SIGNING". Keys of type + // KEY_SIGNING have the Secure Entry Point flag set and, when active, + // are used to sign only resource record sets of type DNSKEY. Otherwise, + // the Secure Entry Point flag is cleared, and this key is used to sign + // only resource record sets of other types. Immutable after creation + // time. + // + // Possible values: + // "KEY_SIGNING" + // "ZONE_SIGNING" + Type string `json:"type,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Algorithm") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "Algorithm") 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 *DnsKey) MarshalJSON() ([]byte, error) { + type NoMethod DnsKey + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type DnsKeyDigest struct { + // Digest: The base-16 encoded bytes of this digest. Suitable for use in + // a DS resource record. + Digest string `json:"digest,omitempty"` + + // Type: Specifies the algorithm used to calculate this digest. + // + // Possible values: + // "SHA1" + // "SHA256" + // "SHA384" + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Digest") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "Digest") 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 *DnsKeyDigest) MarshalJSON() ([]byte, error) { + type NoMethod DnsKeyDigest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DnsKeySpec: Parameters for DnsKey key generation. Used for generating +// initial keys for a new ManagedZone and as default when adding a new +// DnsKey. +type DnsKeySpec struct { + // Algorithm: String mnemonic specifying the DNSSEC algorithm of this + // key. + // + // Possible values: + // "RSASHA1" + // "RSASHA256" + // "RSASHA512" + // "ECDSAP256SHA256" + // "ECDSAP384SHA384" + Algorithm string `json:"algorithm,omitempty"` + + // KeyLength: Length of the keys in bits. + KeyLength int64 `json:"keyLength,omitempty"` + + // KeyType: Specifies whether this is a key signing key (KSK) or a zone + // signing key (ZSK). Key signing keys have the Secure Entry Point flag + // set and, when active, are only used to sign resource record sets of + // type DNSKEY. Zone signing keys do not have the Secure Entry Point + // flag set and are used to sign all other types of resource record + // sets. + // + // Possible values: + // "KEY_SIGNING" + // "ZONE_SIGNING" + KeyType string `json:"keyType,omitempty"` + + Kind string `json:"kind,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Algorithm") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "Algorithm") 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 *DnsKeySpec) MarshalJSON() ([]byte, error) { + type NoMethod DnsKeySpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DnsKeysListResponse: The response to a request to enumerate DnsKeys +// in a ManagedZone. +type DnsKeysListResponse struct { + // DnsKeys: The requested resources. + DnsKeys []*DnsKey `json:"dnsKeys,omitempty"` + + Header *ResponseHeader `json:"header,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: The presence of this field indicates that there exist + // more results following your last page of results in pagination order. + // To fetch them, make another list request using this value as your + // pagination token. In this way you can retrieve the complete contents + // of even very large collections one page at a time. However, if the + // contents of the collection change between the first and last + // paginated list request, the set of all elements returned are an + // inconsistent view of the collection. There is no way to retrieve a + // "snapshot" of collections larger than the maximum page size. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DnsKeys") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "DnsKeys") 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 *DnsKeysListResponse) MarshalJSON() ([]byte, error) { + type NoMethod DnsKeysListResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ManagedZone: A zone is a subtree of the DNS namespace under one +// administrative responsibility. A ManagedZone is a resource that +// represents a DNS zone hosted by the Cloud DNS service. +type ManagedZone struct { + CloudLoggingConfig *ManagedZoneCloudLoggingConfig `json:"cloudLoggingConfig,omitempty"` + + // CreationTime: The time that this resource was created on the server. + // This is in RFC3339 text format. Output only. + CreationTime string `json:"creationTime,omitempty"` + + // Description: A mutable string of at most 1024 characters associated + // with this resource for the user's convenience. Has no effect on the + // managed zone's function. + Description string `json:"description,omitempty"` + + // DnsName: The DNS name of this managed zone, for instance + // "example.com.". + DnsName string `json:"dnsName,omitempty"` + + // DnssecConfig: DNSSEC configuration. + DnssecConfig *ManagedZoneDnsSecConfig `json:"dnssecConfig,omitempty"` + + // ForwardingConfig: The presence for this field indicates that outbound + // forwarding is enabled for this zone. The value of this field contains + // the set of destinations to forward to. + ForwardingConfig *ManagedZoneForwardingConfig `json:"forwardingConfig,omitempty"` + + // Id: Unique identifier for the resource; defined by the server (output + // only) + Id uint64 `json:"id,omitempty,string"` + + Kind string `json:"kind,omitempty"` + + // Labels: User labels. + Labels map[string]string `json:"labels,omitempty"` + + // Name: User assigned name for this resource. Must be unique within the + // project. The name must be 1-63 characters long, must begin with a + // letter, end with a letter or digit, and only contain lowercase + // letters, digits or dashes. + Name string `json:"name,omitempty"` + + // NameServerSet: Optionally specifies the NameServerSet for this + // ManagedZone. A NameServerSet is a set of DNS name servers that all + // host the same ManagedZones. Most users leave this field unset. If you + // need to use this field, contact your account team. + NameServerSet string `json:"nameServerSet,omitempty"` + + // NameServers: Delegate your managed_zone to these virtual name + // servers; defined by the server (output only) + NameServers []string `json:"nameServers,omitempty"` + + // PeeringConfig: The presence of this field indicates that DNS Peering + // is enabled for this zone. The value of this field contains the + // network to peer with. + PeeringConfig *ManagedZonePeeringConfig `json:"peeringConfig,omitempty"` + + // PrivateVisibilityConfig: For privately visible zones, the set of + // Virtual Private Cloud resources that the zone is visible from. + PrivateVisibilityConfig *ManagedZonePrivateVisibilityConfig `json:"privateVisibilityConfig,omitempty"` + + // ReverseLookupConfig: The presence of this field indicates that this + // is a managed reverse lookup zone and Cloud DNS resolves reverse + // lookup queries using automatically configured records for VPC + // resources. This only applies to networks listed under + // private_visibility_config. + ReverseLookupConfig *ManagedZoneReverseLookupConfig `json:"reverseLookupConfig,omitempty"` + + // ServiceDirectoryConfig: This field links to the associated service + // directory namespace. Do not set this field for public zones or + // forwarding zones. + ServiceDirectoryConfig *ManagedZoneServiceDirectoryConfig `json:"serviceDirectoryConfig,omitempty"` + + // Visibility: The zone's visibility: public zones are exposed to the + // Internet, while private zones are visible only to Virtual Private + // Cloud resources. + // + // Possible values: + // "PUBLIC" + // "PRIVATE" + Visibility string `json:"visibility,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CloudLoggingConfig") + // to unconditionally include in API requests. By default, fields with + // empty or default 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. "CloudLoggingConfig") 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 *ManagedZone) MarshalJSON() ([]byte, error) { + type NoMethod ManagedZone + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ManagedZoneCloudLoggingConfig: Cloud Logging configurations for +// publicly visible zones. +type ManagedZoneCloudLoggingConfig struct { + // EnableLogging: If set, enable query logging for this ManagedZone. + // False by default, making logging opt-in. + EnableLogging bool `json:"enableLogging,omitempty"` + + Kind string `json:"kind,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EnableLogging") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "EnableLogging") 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 *ManagedZoneCloudLoggingConfig) MarshalJSON() ([]byte, error) { + type NoMethod ManagedZoneCloudLoggingConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ManagedZoneDnsSecConfig struct { + // DefaultKeySpecs: Specifies parameters for generating initial DnsKeys + // for this ManagedZone. Can only be changed while the state is OFF. + DefaultKeySpecs []*DnsKeySpec `json:"defaultKeySpecs,omitempty"` + + Kind string `json:"kind,omitempty"` + + // NonExistence: Specifies the mechanism for authenticated + // denial-of-existence responses. Can only be changed while the state is + // OFF. + // + // Possible values: + // "NSEC" + // "NSEC3" + NonExistence string `json:"nonExistence,omitempty"` + + // State: Specifies whether DNSSEC is enabled, and what mode it is in. + // + // Possible values: + // "OFF" - DNSSEC is disabled; the zone is not signed. + // "ON" - DNSSEC is enabled; the zone is signed and fully managed. + // "TRANSFER" - DNSSEC is enabled, but in a "transfer" mode. + State string `json:"state,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DefaultKeySpecs") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "DefaultKeySpecs") 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 *ManagedZoneDnsSecConfig) MarshalJSON() ([]byte, error) { + type NoMethod ManagedZoneDnsSecConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ManagedZoneForwardingConfig struct { + Kind string `json:"kind,omitempty"` + + // TargetNameServers: List of target name servers to forward to. Cloud + // DNS selects the best available name server if more than one target is + // given. + TargetNameServers []*ManagedZoneForwardingConfigNameServerTarget `json:"targetNameServers,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Kind") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "Kind") 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 *ManagedZoneForwardingConfig) MarshalJSON() ([]byte, error) { + type NoMethod ManagedZoneForwardingConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ManagedZoneForwardingConfigNameServerTarget struct { + // ForwardingPath: Forwarding path for this NameServerTarget. If unset + // or set to DEFAULT, Cloud DNS makes forwarding decisions based on IP + // address ranges; that is, RFC1918 addresses go to the VPC network, + // non-RFC1918 addresses go to the internet. When set to PRIVATE, Cloud + // DNS always sends queries through the VPC network for this target. + // + // Possible values: + // "DEFAULT" - Cloud DNS makes forwarding decisions based on address + // ranges; that is, RFC1918 addresses forward to the target through the + // VPC and non-RFC1918 addresses forward to the target through the + // internet + // "PRIVATE" - Cloud DNS always forwards to this target through the + // VPC. + ForwardingPath string `json:"forwardingPath,omitempty"` + + // Ipv4Address: IPv4 address of a target name server. + Ipv4Address string `json:"ipv4Address,omitempty"` + + Kind string `json:"kind,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ForwardingPath") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "ForwardingPath") 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 *ManagedZoneForwardingConfigNameServerTarget) MarshalJSON() ([]byte, error) { + type NoMethod ManagedZoneForwardingConfigNameServerTarget + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ManagedZoneOperationsListResponse struct { + Header *ResponseHeader `json:"header,omitempty"` + + Kind string `json:"kind,omitempty"` + + // NextPageToken: The presence of this field indicates that there exist + // more results following your last page of results in pagination order. + // To fetch them, make another list request using this value as your + // page token. This lets you retrieve the complete contents of even very + // large collections one page at a time. However, if the contents of the + // collection change between the first and last paginated list request, + // the set of all elements returned are an inconsistent view of the + // collection. You cannot retrieve a consistent snapshot of a collection + // larger than the maximum page size. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Operations: The operation resources. + Operations []*Operation `json:"operations,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Header") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "Header") 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 *ManagedZoneOperationsListResponse) MarshalJSON() ([]byte, error) { + type NoMethod ManagedZoneOperationsListResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ManagedZonePeeringConfig struct { + Kind string `json:"kind,omitempty"` + + // TargetNetwork: The network with which to peer. + TargetNetwork *ManagedZonePeeringConfigTargetNetwork `json:"targetNetwork,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Kind") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "Kind") 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 *ManagedZonePeeringConfig) MarshalJSON() ([]byte, error) { + type NoMethod ManagedZonePeeringConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ManagedZonePeeringConfigTargetNetwork struct { + // DeactivateTime: The time at which the zone was deactivated, in RFC + // 3339 date-time format. An empty string indicates that the peering + // connection is active. The producer network can deactivate a zone. The + // zone is automatically deactivated if the producer network that the + // zone targeted is deleted. Output only. + DeactivateTime string `json:"deactivateTime,omitempty"` + + Kind string `json:"kind,omitempty"` + + // NetworkUrl: The fully qualified URL of the VPC network to forward + // queries to. This should be formatted like + // https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} + NetworkUrl string `json:"networkUrl,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DeactivateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "DeactivateTime") 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 *ManagedZonePeeringConfigTargetNetwork) MarshalJSON() ([]byte, error) { + type NoMethod ManagedZonePeeringConfigTargetNetwork + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ManagedZonePrivateVisibilityConfig struct { + // GkeClusters: The list of Google Kubernetes Engine clusters that can + // see this zone. + GkeClusters []*ManagedZonePrivateVisibilityConfigGKECluster `json:"gkeClusters,omitempty"` + + Kind string `json:"kind,omitempty"` + + // Networks: The list of VPC networks that can see this zone. + Networks []*ManagedZonePrivateVisibilityConfigNetwork `json:"networks,omitempty"` + + // ForceSendFields is a list of field names (e.g. "GkeClusters") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "GkeClusters") 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 *ManagedZonePrivateVisibilityConfig) MarshalJSON() ([]byte, error) { + type NoMethod ManagedZonePrivateVisibilityConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ManagedZonePrivateVisibilityConfigGKECluster struct { + // GkeClusterName: The resource name of the cluster to bind this + // ManagedZone to. This should be specified in the format like: + // projects/*/locations/*/clusters/*. This is referenced from GKE + // projects.locations.clusters.get API: + // https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/get + GkeClusterName string `json:"gkeClusterName,omitempty"` + + Kind string `json:"kind,omitempty"` + + // ForceSendFields is a list of field names (e.g. "GkeClusterName") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "GkeClusterName") 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 *ManagedZonePrivateVisibilityConfigGKECluster) MarshalJSON() ([]byte, error) { + type NoMethod ManagedZonePrivateVisibilityConfigGKECluster + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ManagedZonePrivateVisibilityConfigNetwork struct { + Kind string `json:"kind,omitempty"` + + // NetworkUrl: The fully qualified URL of the VPC network to bind to. + // Format this URL like + // https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} + NetworkUrl string `json:"networkUrl,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Kind") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "Kind") 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 *ManagedZonePrivateVisibilityConfigNetwork) MarshalJSON() ([]byte, error) { + type NoMethod ManagedZonePrivateVisibilityConfigNetwork + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ManagedZoneReverseLookupConfig struct { + Kind string `json:"kind,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Kind") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "Kind") 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 *ManagedZoneReverseLookupConfig) MarshalJSON() ([]byte, error) { + type NoMethod ManagedZoneReverseLookupConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ManagedZoneServiceDirectoryConfig: Contains information about Service +// Directory-backed zones. +type ManagedZoneServiceDirectoryConfig struct { + Kind string `json:"kind,omitempty"` + + // Namespace: Contains information about the namespace associated with + // the zone. + Namespace *ManagedZoneServiceDirectoryConfigNamespace `json:"namespace,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Kind") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "Kind") 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 *ManagedZoneServiceDirectoryConfig) MarshalJSON() ([]byte, error) { + type NoMethod ManagedZoneServiceDirectoryConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ManagedZoneServiceDirectoryConfigNamespace struct { + // DeletionTime: The time that the namespace backing this zone was + // deleted; an empty string if it still exists. This is in RFC3339 text + // format. Output only. + DeletionTime string `json:"deletionTime,omitempty"` + + Kind string `json:"kind,omitempty"` + + // NamespaceUrl: The fully qualified URL of the namespace associated + // with the zone. Format must be + // https://servicedirectory.googleapis.com/v1/projects/{project}/locations/{location}/namespaces/{namespace} + NamespaceUrl string `json:"namespaceUrl,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DeletionTime") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "DeletionTime") 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 *ManagedZoneServiceDirectoryConfigNamespace) MarshalJSON() ([]byte, error) { + type NoMethod ManagedZoneServiceDirectoryConfigNamespace + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ManagedZonesListResponse struct { + Header *ResponseHeader `json:"header,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // ManagedZones: The managed zone resources. + ManagedZones []*ManagedZone `json:"managedZones,omitempty"` + + // NextPageToken: The presence of this field indicates that there exist + // more results following your last page of results in pagination order. + // To fetch them, make another list request using this value as your + // page token. This lets you the complete contents of even very large + // collections one page at a time. However, if the contents of the + // collection change between the first and last paginated list request, + // the set of all elements returned are an inconsistent view of the + // collection. You cannot retrieve a consistent snapshot of a collection + // larger than the maximum page size. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Header") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "Header") 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 *ManagedZonesListResponse) MarshalJSON() ([]byte, error) { + type NoMethod ManagedZonesListResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Operation: An operation represents a successful mutation performed on +// a Cloud DNS resource. Operations provide: - An audit log of server +// resource mutations. - A way to recover/retry API calls in the case +// where the response is never received by the caller. Use the caller +// specified client_operation_id. +type Operation struct { + // DnsKeyContext: Only populated if the operation targeted a DnsKey + // (output only). + DnsKeyContext *OperationDnsKeyContext `json:"dnsKeyContext,omitempty"` + + // Id: Unique identifier for the resource. This is the + // client_operation_id if the client specified it when the mutation was + // initiated, otherwise, it is generated by the server. The name must be + // 1-63 characters long and match the regular expression [-a-z0-9]? + // (output only) + Id string `json:"id,omitempty"` + + Kind string `json:"kind,omitempty"` + + // StartTime: The time that this operation was started by the server. + // This is in RFC3339 text format (output only). + StartTime string `json:"startTime,omitempty"` + + // Status: Status of the operation. Can be one of the following: + // "PENDING" or "DONE" (output only). A status of "DONE" means that the + // request to update the authoritative servers has been sent, but the + // servers might not be updated yet. + // + // Possible values: + // "PENDING" + // "DONE" + Status string `json:"status,omitempty"` + + // Type: Type of the operation. Operations include insert, update, and + // delete (output only). + Type string `json:"type,omitempty"` + + // User: User who requested the operation, for example: + // user@example.com. cloud-dns-system for operations automatically done + // by the system. (output only) + User string `json:"user,omitempty"` + + // ZoneContext: Only populated if the operation targeted a ManagedZone + // (output only). + ZoneContext *OperationManagedZoneContext `json:"zoneContext,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DnsKeyContext") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "DnsKeyContext") 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 *Operation) MarshalJSON() ([]byte, error) { + type NoMethod Operation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type OperationDnsKeyContext struct { + // NewValue: The post-operation DnsKey resource. + NewValue *DnsKey `json:"newValue,omitempty"` + + // OldValue: The pre-operation DnsKey resource. + OldValue *DnsKey `json:"oldValue,omitempty"` + + // ForceSendFields is a list of field names (e.g. "NewValue") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "NewValue") 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 *OperationDnsKeyContext) MarshalJSON() ([]byte, error) { + type NoMethod OperationDnsKeyContext + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type OperationManagedZoneContext struct { + // NewValue: The post-operation ManagedZone resource. + NewValue *ManagedZone `json:"newValue,omitempty"` + + // OldValue: The pre-operation ManagedZone resource. + OldValue *ManagedZone `json:"oldValue,omitempty"` + + // ForceSendFields is a list of field names (e.g. "NewValue") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "NewValue") 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 *OperationManagedZoneContext) MarshalJSON() ([]byte, error) { + type NoMethod OperationManagedZoneContext + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type PoliciesListResponse struct { + Header *ResponseHeader `json:"header,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: The presence of this field indicates that there exist + // more results following your last page of results in pagination order. + // To fetch them, make another list request using this value as your + // page token. This lets you the complete contents of even very large + // collections one page at a time. However, if the contents of the + // collection change between the first and last paginated list request, + // the set of all elements returned are an inconsistent view of the + // collection. You cannot retrieve a consistent snapshot of a collection + // larger than the maximum page size. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Policies: The policy resources. + Policies []*Policy `json:"policies,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Header") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "Header") 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 *PoliciesListResponse) MarshalJSON() ([]byte, error) { + type NoMethod PoliciesListResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type PoliciesPatchResponse struct { + Header *ResponseHeader `json:"header,omitempty"` + + Policy *Policy `json:"policy,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Header") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "Header") 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 *PoliciesPatchResponse) MarshalJSON() ([]byte, error) { + type NoMethod PoliciesPatchResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type PoliciesUpdateResponse struct { + Header *ResponseHeader `json:"header,omitempty"` + + Policy *Policy `json:"policy,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Header") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "Header") 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 *PoliciesUpdateResponse) MarshalJSON() ([]byte, error) { + type NoMethod PoliciesUpdateResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Policy: A policy is a collection of DNS rules applied to one or more +// Virtual Private Cloud resources. +type Policy struct { + // AlternativeNameServerConfig: Sets an alternative name server for the + // associated networks. When specified, all DNS queries are forwarded to + // a name server that you choose. Names such as .internal are not + // available when an alternative name server is specified. + AlternativeNameServerConfig *PolicyAlternativeNameServerConfig `json:"alternativeNameServerConfig,omitempty"` + + // Description: A mutable string of at most 1024 characters associated + // with this resource for the user's convenience. Has no effect on the + // policy's function. + Description string `json:"description,omitempty"` + + // EnableInboundForwarding: Allows networks bound to this policy to + // receive DNS queries sent by VMs or applications over VPN connections. + // When enabled, a virtual IP address is allocated from each of the + // subnetworks that are bound to this policy. + EnableInboundForwarding bool `json:"enableInboundForwarding,omitempty"` + + // EnableLogging: Controls whether logging is enabled for the networks + // bound to this policy. Defaults to no logging if not set. + EnableLogging bool `json:"enableLogging,omitempty"` + + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id uint64 `json:"id,omitempty,string"` + + Kind string `json:"kind,omitempty"` + + // Name: User-assigned name for this policy. + Name string `json:"name,omitempty"` + + // Networks: List of network names specifying networks to which this + // policy is applied. + Networks []*PolicyNetwork `json:"networks,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "AlternativeNameServerConfig") to unconditionally include in API + // requests. By default, fields with empty or default 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. + // "AlternativeNameServerConfig") 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 *Policy) MarshalJSON() ([]byte, error) { + type NoMethod Policy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type PolicyAlternativeNameServerConfig struct { + Kind string `json:"kind,omitempty"` + + // TargetNameServers: Sets an alternative name server for the associated + // networks. When specified, all DNS queries are forwarded to a name + // server that you choose. Names such as .internal are not available + // when an alternative name server is specified. + TargetNameServers []*PolicyAlternativeNameServerConfigTargetNameServer `json:"targetNameServers,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Kind") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "Kind") 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 *PolicyAlternativeNameServerConfig) MarshalJSON() ([]byte, error) { + type NoMethod PolicyAlternativeNameServerConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type PolicyAlternativeNameServerConfigTargetNameServer struct { + // ForwardingPath: Forwarding path for this TargetNameServer. If unset + // or set to DEFAULT, Cloud DNS makes forwarding decisions based on + // address ranges; that is, RFC1918 addresses go to the VPC network, + // non-RFC1918 addresses go to the internet. When set to PRIVATE, Cloud + // DNS always sends queries through the VPC network for this target. + // + // Possible values: + // "DEFAULT" - Cloud DNS makes forwarding decision based on IP address + // ranges; that is, RFC1918 addresses forward to the target through the + // VPC and non-RFC1918 addresses forward to the target through the + // internet + // "PRIVATE" - Cloud DNS always forwards to this target through the + // VPC. + ForwardingPath string `json:"forwardingPath,omitempty"` + + // Ipv4Address: IPv4 address to forward to. + Ipv4Address string `json:"ipv4Address,omitempty"` + + Kind string `json:"kind,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ForwardingPath") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "ForwardingPath") 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 *PolicyAlternativeNameServerConfigTargetNameServer) MarshalJSON() ([]byte, error) { + type NoMethod PolicyAlternativeNameServerConfigTargetNameServer + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type PolicyNetwork struct { + Kind string `json:"kind,omitempty"` + + // NetworkUrl: The fully qualified URL of the VPC network to bind to. + // This should be formatted like + // https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} + NetworkUrl string `json:"networkUrl,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Kind") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "Kind") 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 *PolicyNetwork) MarshalJSON() ([]byte, error) { + type NoMethod PolicyNetwork + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Project: A project resource. The project is a top level container for +// resources including Cloud DNS ManagedZones. Projects can be created +// only in the APIs console. Next tag: 7. +type Project struct { + // Id: User assigned unique identifier for the resource (output only). + Id string `json:"id,omitempty"` + + Kind string `json:"kind,omitempty"` + + // Number: Unique numeric identifier for the resource; defined by the + // server (output only). + Number uint64 `json:"number,omitempty,string"` + + // Quota: Quotas assigned to this project (output only). + Quota *Quota `json:"quota,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "Id") 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 *Project) MarshalJSON() ([]byte, error) { + type NoMethod Project + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Quota: Limits associated with a Project. +type Quota struct { + // DnsKeysPerManagedZone: Maximum allowed number of DnsKeys per + // ManagedZone. + DnsKeysPerManagedZone int64 `json:"dnsKeysPerManagedZone,omitempty"` + + // ItemsPerRoutingPolicy: Maximum allowed number of items per routing + // policy. + ItemsPerRoutingPolicy int64 `json:"itemsPerRoutingPolicy,omitempty"` + + Kind string `json:"kind,omitempty"` + + // ManagedZones: Maximum allowed number of managed zones in the project. + ManagedZones int64 `json:"managedZones,omitempty"` + + // ManagedZonesPerNetwork: Maximum allowed number of managed zones which + // can be attached to a network. + ManagedZonesPerNetwork int64 `json:"managedZonesPerNetwork,omitempty"` + + // NetworksPerManagedZone: Maximum allowed number of networks to which a + // privately scoped zone can be attached. + NetworksPerManagedZone int64 `json:"networksPerManagedZone,omitempty"` + + // NetworksPerPolicy: Maximum allowed number of networks per policy. + NetworksPerPolicy int64 `json:"networksPerPolicy,omitempty"` + + // PeeringZonesPerTargetNetwork: Maximum allowed number of consumer + // peering zones per target network owned by this producer project + PeeringZonesPerTargetNetwork int64 `json:"peeringZonesPerTargetNetwork,omitempty"` + + // Policies: Maximum allowed number of policies per project. + Policies int64 `json:"policies,omitempty"` + + // ResourceRecordsPerRrset: Maximum allowed number of ResourceRecords + // per ResourceRecordSet. + ResourceRecordsPerRrset int64 `json:"resourceRecordsPerRrset,omitempty"` + + // RrsetAdditionsPerChange: Maximum allowed number of ResourceRecordSets + // to add per ChangesCreateRequest. + RrsetAdditionsPerChange int64 `json:"rrsetAdditionsPerChange,omitempty"` + + // RrsetDeletionsPerChange: Maximum allowed number of ResourceRecordSets + // to delete per ChangesCreateRequest. + RrsetDeletionsPerChange int64 `json:"rrsetDeletionsPerChange,omitempty"` + + // RrsetsPerManagedZone: Maximum allowed number of ResourceRecordSets + // per zone in the project. + RrsetsPerManagedZone int64 `json:"rrsetsPerManagedZone,omitempty"` + + // TargetNameServersPerManagedZone: Maximum allowed number of target + // name servers per managed forwarding zone. + TargetNameServersPerManagedZone int64 `json:"targetNameServersPerManagedZone,omitempty"` + + // TargetNameServersPerPolicy: Maximum allowed number of alternative + // target name servers per policy. + TargetNameServersPerPolicy int64 `json:"targetNameServersPerPolicy,omitempty"` + + // TotalRrdataSizePerChange: Maximum allowed size for total rrdata in + // one ChangesCreateRequest in bytes. + TotalRrdataSizePerChange int64 `json:"totalRrdataSizePerChange,omitempty"` + + // WhitelistedKeySpecs: DNSSEC algorithm and key length types that can + // be used for DnsKeys. + WhitelistedKeySpecs []*DnsKeySpec `json:"whitelistedKeySpecs,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "DnsKeysPerManagedZone") to unconditionally include in API requests. + // By default, fields with empty or default 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. "DnsKeysPerManagedZone") 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 *Quota) MarshalJSON() ([]byte, error) { + type NoMethod Quota + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RRSetRoutingPolicy: A RRSetRoutingPolicy represents ResourceRecordSet +// data that is returned dynamically with the response varying based on +// configured properties such as geolocation or by weighted random +// selection. +type RRSetRoutingPolicy struct { + Geo *RRSetRoutingPolicyGeoPolicy `json:"geo,omitempty"` + + Kind string `json:"kind,omitempty"` + + Wrr *RRSetRoutingPolicyWrrPolicy `json:"wrr,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Geo") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "Geo") 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 *RRSetRoutingPolicy) MarshalJSON() ([]byte, error) { + type NoMethod RRSetRoutingPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RRSetRoutingPolicyGeoPolicy: Configures a RRSetRoutingPolicy that +// routes based on the geo location of the querying user. +type RRSetRoutingPolicyGeoPolicy struct { + // Items: The primary geo routing configuration. If there are multiple + // items with the same location, an error is returned instead. + Items []*RRSetRoutingPolicyGeoPolicyGeoPolicyItem `json:"items,omitempty"` + + Kind string `json:"kind,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Items") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "Items") 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 *RRSetRoutingPolicyGeoPolicy) MarshalJSON() ([]byte, error) { + type NoMethod RRSetRoutingPolicyGeoPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RRSetRoutingPolicyGeoPolicyGeoPolicyItem: ResourceRecordSet data for +// one geo location. +type RRSetRoutingPolicyGeoPolicyGeoPolicyItem struct { + Kind string `json:"kind,omitempty"` + + // Location: The geo-location granularity is a GCP region. This location + // string should correspond to a GCP region. e.g. "us-east1", + // "southamerica-east1", "asia-east1", etc. + Location string `json:"location,omitempty"` + + Rrdatas []string `json:"rrdatas,omitempty"` + + // SignatureRrdatas: DNSSEC generated signatures for all the rrdata + // within this item. Note that if health checked targets are provided + // for DNSSEC enabled zones, there's a restriction of 1 ip per item. . + SignatureRrdatas []string `json:"signatureRrdatas,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Kind") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "Kind") 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 *RRSetRoutingPolicyGeoPolicyGeoPolicyItem) MarshalJSON() ([]byte, error) { + type NoMethod RRSetRoutingPolicyGeoPolicyGeoPolicyItem + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RRSetRoutingPolicyWrrPolicy: Configures a RRSetRoutingPolicy that +// routes in a weighted round robin fashion. +type RRSetRoutingPolicyWrrPolicy struct { + Items []*RRSetRoutingPolicyWrrPolicyWrrPolicyItem `json:"items,omitempty"` + + Kind string `json:"kind,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Items") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "Items") 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 *RRSetRoutingPolicyWrrPolicy) MarshalJSON() ([]byte, error) { + type NoMethod RRSetRoutingPolicyWrrPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RRSetRoutingPolicyWrrPolicyWrrPolicyItem: A routing block which +// contains the routing information for one WRR item. +type RRSetRoutingPolicyWrrPolicyWrrPolicyItem struct { + Kind string `json:"kind,omitempty"` + + Rrdatas []string `json:"rrdatas,omitempty"` + + // SignatureRrdatas: DNSSEC generated signatures for all the rrdata + // within this item. Note that if health checked targets are provided + // for DNSSEC enabled zones, there's a restriction of 1 ip per item. . + SignatureRrdatas []string `json:"signatureRrdatas,omitempty"` + + // Weight: The weight corresponding to this subset of rrdata. When + // multiple WeightedRoundRobinPolicyItems are configured, the + // probability of returning an rrset is proportional to its weight + // relative to the sum of weights configured for all items. This weight + // should be non-negative. + Weight float64 `json:"weight,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Kind") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "Kind") 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 *RRSetRoutingPolicyWrrPolicyWrrPolicyItem) MarshalJSON() ([]byte, error) { + type NoMethod RRSetRoutingPolicyWrrPolicyWrrPolicyItem + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *RRSetRoutingPolicyWrrPolicyWrrPolicyItem) UnmarshalJSON(data []byte) error { + type NoMethod RRSetRoutingPolicyWrrPolicyWrrPolicyItem + var s1 struct { + Weight gensupport.JSONFloat64 `json:"weight"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Weight = float64(s1.Weight) + return nil +} + +// ResourceRecordSet: A unit of data that is returned by the DNS +// servers. +type ResourceRecordSet struct { + Kind string `json:"kind,omitempty"` + + // Name: For example, www.example.com. + Name string `json:"name,omitempty"` + + // RoutingPolicy: Configures dynamic query responses based on geo + // location of querying user or a weighted round robin based routing + // policy. A ResourceRecordSet should only have either rrdata (static) + // or routing_policy (dynamic). An error is returned otherwise. + RoutingPolicy *RRSetRoutingPolicy `json:"routingPolicy,omitempty"` + + // Rrdatas: As defined in RFC 1035 (section 5) and RFC 1034 (section + // 3.6.1) -- see examples. + Rrdatas []string `json:"rrdatas,omitempty"` + + // SignatureRrdatas: As defined in RFC 4034 (section 3.2). + SignatureRrdatas []string `json:"signatureRrdatas,omitempty"` + + // Ttl: Number of seconds that this ResourceRecordSet can be cached by + // resolvers. + Ttl int64 `json:"ttl,omitempty"` + + // Type: The identifier of a supported record type. See the list of + // Supported DNS record types. + Type string `json:"type,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Kind") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "Kind") 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 *ResourceRecordSet) MarshalJSON() ([]byte, error) { + type NoMethod ResourceRecordSet + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ResourceRecordSetsListResponse struct { + Header *ResponseHeader `json:"header,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: The presence of this field indicates that there exist + // more results following your last page of results in pagination order. + // To fetch them, make another list request using this value as your + // pagination token. This lets you retrieve complete contents of even + // larger collections, one page at a time. However, if the contents of + // the collection change between the first and last paginated list + // request, the set of elements returned are an inconsistent view of the + // collection. You cannot retrieve a consistent snapshot of a collection + // larger than the maximum page size. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Rrsets: The resource record set resources. + Rrsets []*ResourceRecordSet `json:"rrsets,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Header") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "Header") 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 *ResourceRecordSetsListResponse) MarshalJSON() ([]byte, error) { + type NoMethod ResourceRecordSetsListResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ResponseHeader: Elements common to every response. +type ResponseHeader struct { + // OperationId: For mutating operation requests that completed + // successfully. This is the client_operation_id if the client specified + // it, otherwise it is generated by the server (output only). + OperationId string `json:"operationId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "OperationId") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "OperationId") 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 *ResponseHeader) MarshalJSON() ([]byte, error) { + type NoMethod ResponseHeader + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ResponsePoliciesListResponse struct { + Header *ResponseHeader `json:"header,omitempty"` + + // NextPageToken: The presence of this field indicates that there exist + // more results following your last page of results in pagination order. + // To fetch them, make another list request using this value as your + // page token. This lets you the complete contents of even very large + // collections one page at a time. However, if the contents of the + // collection change between the first and last paginated list request, + // the set of all elements returned are an inconsistent view of the + // collection. You cannot retrieve a consistent snapshot of a collection + // larger than the maximum page size. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ResponsePolicies: The Response Policy resources. + ResponsePolicies []*ResponsePolicy `json:"responsePolicies,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Header") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "Header") 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 *ResponsePoliciesListResponse) MarshalJSON() ([]byte, error) { + type NoMethod ResponsePoliciesListResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ResponsePoliciesPatchResponse struct { + Header *ResponseHeader `json:"header,omitempty"` + + ResponsePolicy *ResponsePolicy `json:"responsePolicy,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Header") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "Header") 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 *ResponsePoliciesPatchResponse) MarshalJSON() ([]byte, error) { + type NoMethod ResponsePoliciesPatchResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ResponsePoliciesUpdateResponse struct { + Header *ResponseHeader `json:"header,omitempty"` + + ResponsePolicy *ResponsePolicy `json:"responsePolicy,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Header") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "Header") 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 *ResponsePoliciesUpdateResponse) MarshalJSON() ([]byte, error) { + type NoMethod ResponsePoliciesUpdateResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ResponsePolicy: A Response Policy is a collection of selectors that +// apply to queries made against one or more Virtual Private Cloud +// networks. +type ResponsePolicy struct { + // Description: User-provided description for this Response Policy. + Description string `json:"description,omitempty"` + + // GkeClusters: The list of Google Kubernetes Engine clusters to which + // this response policy is applied. + GkeClusters []*ResponsePolicyGKECluster `json:"gkeClusters,omitempty"` + + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id int64 `json:"id,omitempty,string"` + + Kind string `json:"kind,omitempty"` + + // Networks: List of network names specifying networks to which this + // policy is applied. + Networks []*ResponsePolicyNetwork `json:"networks,omitempty"` + + // ResponsePolicyName: User assigned name for this Response Policy. + ResponsePolicyName string `json:"responsePolicyName,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Description") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ResponsePolicy) MarshalJSON() ([]byte, error) { + type NoMethod ResponsePolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ResponsePolicyGKECluster struct { + // GkeClusterName: The resource name of the cluster to bind this + // response policy to. This should be specified in the format like: + // projects/*/locations/*/clusters/*. This is referenced from GKE + // projects.locations.clusters.get API: + // https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/get + GkeClusterName string `json:"gkeClusterName,omitempty"` + + Kind string `json:"kind,omitempty"` + + // ForceSendFields is a list of field names (e.g. "GkeClusterName") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "GkeClusterName") 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 *ResponsePolicyGKECluster) MarshalJSON() ([]byte, error) { + type NoMethod ResponsePolicyGKECluster + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ResponsePolicyNetwork struct { + Kind string `json:"kind,omitempty"` + + // NetworkUrl: The fully qualified URL of the VPC network to bind to. + // This should be formatted like + // https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} + NetworkUrl string `json:"networkUrl,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Kind") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "Kind") 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 *ResponsePolicyNetwork) MarshalJSON() ([]byte, error) { + type NoMethod ResponsePolicyNetwork + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ResponsePolicyRule: A Response Policy Rule is a selector that applies +// its behavior to queries that match the selector. Selectors are DNS +// names, which may be wildcards or exact matches. Each DNS query +// subject to a Response Policy matches at most one ResponsePolicyRule, +// as identified by the dns_name field with the longest matching suffix. +type ResponsePolicyRule struct { + // Behavior: Answer this query with a behavior rather than DNS data. + // + // Possible values: + // "BEHAVIOR_UNSPECIFIED" + // "BYPASS_RESPONSE_POLICY" - Skip a less-specific ResponsePolicyRule + // and continue normal query logic. This can be used in conjunction with + // a wildcard to exempt a subset of the wildcard ResponsePolicyRule from + // the ResponsePolicy behavior and e.g., query the public internet + // instead. For instance, if these rules exist: *.example.com -> 1.2.3.4 + // foo.example.com -> PASSTHRU Then a query for 'foo.example.com' skips + // the wildcard. + Behavior string `json:"behavior,omitempty"` + + // DnsName: The DNS name (wildcard or exact) to apply this rule to. Must + // be unique within the Response Policy Rule. + DnsName string `json:"dnsName,omitempty"` + + Kind string `json:"kind,omitempty"` + + // LocalData: Answer this query directly with DNS data. These + // ResourceRecordSets override any other DNS behavior for the matched + // name; in particular they override private zones, the public internet, + // and GCP internal DNS. No SOA nor NS types are allowed. + LocalData *ResponsePolicyRuleLocalData `json:"localData,omitempty"` + + // RuleName: An identifier for this rule. Must be unique with the + // ResponsePolicy. + RuleName string `json:"ruleName,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Behavior") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "Behavior") 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 *ResponsePolicyRule) MarshalJSON() ([]byte, error) { + type NoMethod ResponsePolicyRule + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ResponsePolicyRuleLocalData struct { + // LocalDatas: All resource record sets for this selector, one per + // resource record type. The name must match the dns_name. + LocalDatas []*ResourceRecordSet `json:"localDatas,omitempty"` + + // ForceSendFields is a list of field names (e.g. "LocalDatas") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "LocalDatas") 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 *ResponsePolicyRuleLocalData) MarshalJSON() ([]byte, error) { + type NoMethod ResponsePolicyRuleLocalData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ResponsePolicyRulesListResponse struct { + Header *ResponseHeader `json:"header,omitempty"` + + // NextPageToken: The presence of this field indicates that there exist + // more results following your last page of results in pagination order. + // To fetch them, make another list request using this value as your + // page token. This lets you the complete contents of even very large + // collections one page at a time. However, if the contents of the + // collection change between the first and last paginated list request, + // the set of all elements returned are an inconsistent view of the + // collection. You cannot retrieve a consistent snapshot of a collection + // larger than the maximum page size. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ResponsePolicyRules: The Response Policy Rule resources. + ResponsePolicyRules []*ResponsePolicyRule `json:"responsePolicyRules,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Header") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "Header") 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 *ResponsePolicyRulesListResponse) MarshalJSON() ([]byte, error) { + type NoMethod ResponsePolicyRulesListResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ResponsePolicyRulesPatchResponse struct { + Header *ResponseHeader `json:"header,omitempty"` + + ResponsePolicyRule *ResponsePolicyRule `json:"responsePolicyRule,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Header") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "Header") 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 *ResponsePolicyRulesPatchResponse) MarshalJSON() ([]byte, error) { + type NoMethod ResponsePolicyRulesPatchResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ResponsePolicyRulesUpdateResponse struct { + Header *ResponseHeader `json:"header,omitempty"` + + ResponsePolicyRule *ResponsePolicyRule `json:"responsePolicyRule,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Header") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "Header") 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 *ResponsePolicyRulesUpdateResponse) MarshalJSON() ([]byte, error) { + type NoMethod ResponsePolicyRulesUpdateResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "dns.changes.create": + +type ChangesCreateCall struct { + s *Service + project string + location string + managedZone string + change *Change + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Atomically updates the ResourceRecordSet collection. +// +// - location: . +// - managedZone: Identifies the managed zone addressed by this request. +// Can be the managed zone name or ID. +// - project: Identifies the project addressed by this request. +func (r *ChangesService) Create(project string, location string, managedZone string, change *Change) *ChangesCreateCall { + c := &ChangesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.location = location + c.managedZone = managedZone + c.change = change + return c +} + +// ClientOperationId sets the optional parameter "clientOperationId": +// For mutating operation requests only. An optional identifier +// specified by the client. Must be unique for operation resources in +// the Operations collection. +func (c *ChangesCreateCall) ClientOperationId(clientOperationId string) *ChangesCreateCall { + c.urlParams_.Set("clientOperationId", clientOperationId) + 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 *ChangesCreateCall) Fields(s ...googleapi.Field) *ChangesCreateCall { + 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 *ChangesCreateCall) Context(ctx context.Context) *ChangesCreateCall { + 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 *ChangesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ChangesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.change) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/changes") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "location": c.location, + "managedZone": c.managedZone, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dns.changes.create" call. +// Exactly one of *Change or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Change.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 *ChangesCreateCall) Do(opts ...googleapi.CallOption) (*Change, 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 := &Change{ + 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": "Atomically updates the ResourceRecordSet collection.", + // "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/changes", + // "httpMethod": "POST", + // "id": "dns.changes.create", + // "parameterOrder": [ + // "project", + // "location", + // "managedZone" + // ], + // "parameters": { + // "clientOperationId": { + // "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + // "location": "query", + // "type": "string" + // }, + // "location": { + // "default": "global", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "managedZone": { + // "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Identifies the project addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/changes", + // "request": { + // "$ref": "Change" + // }, + // "response": { + // "$ref": "Change" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + // ] + // } + +} + +// method id "dns.changes.get": + +type ChangesGetCall struct { + s *Service + project string + location string + managedZone string + changeId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Fetches the representation of an existing Change. +// +// - changeId: The identifier of the requested change, from a previous +// ResourceRecordSetsChangeResponse. +// - location: . +// - managedZone: Identifies the managed zone addressed by this request. +// Can be the managed zone name or ID. +// - project: Identifies the project addressed by this request. +func (r *ChangesService) Get(project string, location string, managedZone string, changeId string) *ChangesGetCall { + c := &ChangesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.location = location + c.managedZone = managedZone + c.changeId = changeId + return c +} + +// ClientOperationId sets the optional parameter "clientOperationId": +// For mutating operation requests only. An optional identifier +// specified by the client. Must be unique for operation resources in +// the Operations collection. +func (c *ChangesGetCall) ClientOperationId(clientOperationId string) *ChangesGetCall { + c.urlParams_.Set("clientOperationId", clientOperationId) + 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 *ChangesGetCall) Fields(s ...googleapi.Field) *ChangesGetCall { + 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 *ChangesGetCall) IfNoneMatch(entityTag string) *ChangesGetCall { + 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 *ChangesGetCall) Context(ctx context.Context) *ChangesGetCall { + 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 *ChangesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ChangesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/changes/{changeId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "location": c.location, + "managedZone": c.managedZone, + "changeId": c.changeId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dns.changes.get" call. +// Exactly one of *Change or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Change.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 *ChangesGetCall) Do(opts ...googleapi.CallOption) (*Change, 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 := &Change{ + 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": "Fetches the representation of an existing Change.", + // "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/changes/{changeId}", + // "httpMethod": "GET", + // "id": "dns.changes.get", + // "parameterOrder": [ + // "project", + // "location", + // "managedZone", + // "changeId" + // ], + // "parameters": { + // "changeId": { + // "description": "The identifier of the requested change, from a previous ResourceRecordSetsChangeResponse.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "clientOperationId": { + // "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + // "location": "query", + // "type": "string" + // }, + // "location": { + // "default": "global", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "managedZone": { + // "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Identifies the project addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/changes/{changeId}", + // "response": { + // "$ref": "Change" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-platform.read-only", + // "https://www.googleapis.com/auth/ndev.clouddns.readonly", + // "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + // ] + // } + +} + +// method id "dns.changes.list": + +type ChangesListCall struct { + s *Service + project string + location string + managedZone string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Enumerates Changes to a ResourceRecordSet collection. +// +// - location: . +// - managedZone: Identifies the managed zone addressed by this request. +// Can be the managed zone name or ID. +// - project: Identifies the project addressed by this request. +func (r *ChangesService) List(project string, location string, managedZone string) *ChangesListCall { + c := &ChangesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.location = location + c.managedZone = managedZone + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum number +// of results to be returned. If unspecified, the server decides how +// many results to return. +func (c *ChangesListCall) MaxResults(maxResults int64) *ChangesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// PageToken sets the optional parameter "pageToken": A tag returned by +// a previous list request that was truncated. Use this parameter to +// continue a previous list request. +func (c *ChangesListCall) PageToken(pageToken string) *ChangesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// SortBy sets the optional parameter "sortBy": Sorting criterion. The +// only supported value is change sequence. +// +// Possible values: +// "CHANGE_SEQUENCE" (default) +func (c *ChangesListCall) SortBy(sortBy string) *ChangesListCall { + c.urlParams_.Set("sortBy", sortBy) + return c +} + +// SortOrder sets the optional parameter "sortOrder": Sorting order +// direction: 'ascending' or 'descending'. +func (c *ChangesListCall) SortOrder(sortOrder string) *ChangesListCall { + c.urlParams_.Set("sortOrder", sortOrder) + 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 *ChangesListCall) Fields(s ...googleapi.Field) *ChangesListCall { + 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 *ChangesListCall) IfNoneMatch(entityTag string) *ChangesListCall { + 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 *ChangesListCall) Context(ctx context.Context) *ChangesListCall { + 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 *ChangesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ChangesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/changes") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "location": c.location, + "managedZone": c.managedZone, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dns.changes.list" call. +// Exactly one of *ChangesListResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ChangesListResponse.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 *ChangesListCall) Do(opts ...googleapi.CallOption) (*ChangesListResponse, 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 := &ChangesListResponse{ + 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": "Enumerates Changes to a ResourceRecordSet collection.", + // "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/changes", + // "httpMethod": "GET", + // "id": "dns.changes.list", + // "parameterOrder": [ + // "project", + // "location", + // "managedZone" + // ], + // "parameters": { + // "location": { + // "default": "global", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "managedZone": { + // "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "maxResults": { + // "description": "Optional. Maximum number of results to be returned. If unspecified, the server decides how many results to return.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Identifies the project addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "sortBy": { + // "default": "CHANGE_SEQUENCE", + // "description": "Sorting criterion. The only supported value is change sequence.", + // "enum": [ + // "CHANGE_SEQUENCE" + // ], + // "enumDescriptions": [ + // "" + // ], + // "location": "query", + // "type": "string" + // }, + // "sortOrder": { + // "description": "Sorting order direction: 'ascending' or 'descending'.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/changes", + // "response": { + // "$ref": "ChangesListResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-platform.read-only", + // "https://www.googleapis.com/auth/ndev.clouddns.readonly", + // "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + // ] + // } + +} + +// 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 *ChangesListCall) Pages(ctx context.Context, f func(*ChangesListResponse) 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 "dns.dnsKeys.get": + +type DnsKeysGetCall struct { + s *Service + project string + location string + managedZone string + dnsKeyId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Fetches the representation of an existing DnsKey. +// +// - dnsKeyId: The identifier of the requested DnsKey. +// - location: Specifies the location of the resource. This information +// will be used for routing and will be part of the resource name. +// - managedZone: Identifies the managed zone addressed by this request. +// Can be the managed zone name or ID. +// - project: Identifies the project addressed by this request. +func (r *DnsKeysService) Get(project string, location string, managedZone string, dnsKeyId string) *DnsKeysGetCall { + c := &DnsKeysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.location = location + c.managedZone = managedZone + c.dnsKeyId = dnsKeyId + return c +} + +// ClientOperationId sets the optional parameter "clientOperationId": +// For mutating operation requests only. An optional identifier +// specified by the client. Must be unique for operation resources in +// the Operations collection. +func (c *DnsKeysGetCall) ClientOperationId(clientOperationId string) *DnsKeysGetCall { + c.urlParams_.Set("clientOperationId", clientOperationId) + return c +} + +// DigestType sets the optional parameter "digestType": An optional +// comma-separated list of digest types to compute and display for key +// signing keys. If omitted, the recommended digest type is computed and +// displayed. +func (c *DnsKeysGetCall) DigestType(digestType string) *DnsKeysGetCall { + c.urlParams_.Set("digestType", digestType) + 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 *DnsKeysGetCall) Fields(s ...googleapi.Field) *DnsKeysGetCall { + 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 *DnsKeysGetCall) IfNoneMatch(entityTag string) *DnsKeysGetCall { + 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 *DnsKeysGetCall) Context(ctx context.Context) *DnsKeysGetCall { + 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 *DnsKeysGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DnsKeysGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/dnsKeys/{dnsKeyId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "location": c.location, + "managedZone": c.managedZone, + "dnsKeyId": c.dnsKeyId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dns.dnsKeys.get" call. +// Exactly one of *DnsKey or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *DnsKey.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 *DnsKeysGetCall) Do(opts ...googleapi.CallOption) (*DnsKey, 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 := &DnsKey{ + 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": "Fetches the representation of an existing DnsKey.", + // "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/dnsKeys/{dnsKeyId}", + // "httpMethod": "GET", + // "id": "dns.dnsKeys.get", + // "parameterOrder": [ + // "project", + // "location", + // "managedZone", + // "dnsKeyId" + // ], + // "parameters": { + // "clientOperationId": { + // "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + // "location": "query", + // "type": "string" + // }, + // "digestType": { + // "description": "An optional comma-separated list of digest types to compute and display for key signing keys. If omitted, the recommended digest type is computed and displayed.", + // "location": "query", + // "type": "string" + // }, + // "dnsKeyId": { + // "description": "The identifier of the requested DnsKey.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "location": { + // "default": "global", + // "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "managedZone": { + // "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Identifies the project addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/dnsKeys/{dnsKeyId}", + // "response": { + // "$ref": "DnsKey" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-platform.read-only", + // "https://www.googleapis.com/auth/ndev.clouddns.readonly", + // "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + // ] + // } + +} + +// method id "dns.dnsKeys.list": + +type DnsKeysListCall struct { + s *Service + project string + location string + managedZone string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Enumerates DnsKeys to a ResourceRecordSet collection. +// +// - location: Specifies the location of the resource. This information +// will be used for routing and will be part of the resource name. +// - managedZone: Identifies the managed zone addressed by this request. +// Can be the managed zone name or ID. +// - project: Identifies the project addressed by this request. +func (r *DnsKeysService) List(project string, location string, managedZone string) *DnsKeysListCall { + c := &DnsKeysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.location = location + c.managedZone = managedZone + return c +} + +// DigestType sets the optional parameter "digestType": An optional +// comma-separated list of digest types to compute and display for key +// signing keys. If omitted, the recommended digest type is computed and +// displayed. +func (c *DnsKeysListCall) DigestType(digestType string) *DnsKeysListCall { + c.urlParams_.Set("digestType", digestType) + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum number +// of results to be returned. If unspecified, the server decides how +// many results to return. +func (c *DnsKeysListCall) MaxResults(maxResults int64) *DnsKeysListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// PageToken sets the optional parameter "pageToken": A tag returned by +// a previous list request that was truncated. Use this parameter to +// continue a previous list request. +func (c *DnsKeysListCall) PageToken(pageToken string) *DnsKeysListCall { + 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 *DnsKeysListCall) Fields(s ...googleapi.Field) *DnsKeysListCall { + 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 *DnsKeysListCall) IfNoneMatch(entityTag string) *DnsKeysListCall { + 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 *DnsKeysListCall) Context(ctx context.Context) *DnsKeysListCall { + 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 *DnsKeysListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DnsKeysListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/dnsKeys") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "location": c.location, + "managedZone": c.managedZone, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dns.dnsKeys.list" call. +// Exactly one of *DnsKeysListResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *DnsKeysListResponse.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 *DnsKeysListCall) Do(opts ...googleapi.CallOption) (*DnsKeysListResponse, 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 := &DnsKeysListResponse{ + 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": "Enumerates DnsKeys to a ResourceRecordSet collection.", + // "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/dnsKeys", + // "httpMethod": "GET", + // "id": "dns.dnsKeys.list", + // "parameterOrder": [ + // "project", + // "location", + // "managedZone" + // ], + // "parameters": { + // "digestType": { + // "description": "An optional comma-separated list of digest types to compute and display for key signing keys. If omitted, the recommended digest type is computed and displayed.", + // "location": "query", + // "type": "string" + // }, + // "location": { + // "default": "global", + // "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "managedZone": { + // "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "maxResults": { + // "description": "Optional. Maximum number of results to be returned. If unspecified, the server decides how many results to return.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Identifies the project addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/dnsKeys", + // "response": { + // "$ref": "DnsKeysListResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-platform.read-only", + // "https://www.googleapis.com/auth/ndev.clouddns.readonly", + // "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + // ] + // } + +} + +// 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 *DnsKeysListCall) Pages(ctx context.Context, f func(*DnsKeysListResponse) 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 "dns.managedZoneOperations.get": + +type ManagedZoneOperationsGetCall struct { + s *Service + project string + location string + managedZone string + operation string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Fetches the representation of an existing Operation. +// +// - location: Specifies the location of the resource. This information +// will be used for routing and will be part of the resource name. +// - managedZone: Identifies the managed zone addressed by this request. +// - operation: Identifies the operation addressed by this request (ID +// of the operation). +// - project: Identifies the project addressed by this request. +func (r *ManagedZoneOperationsService) Get(project string, location string, managedZone string, operation string) *ManagedZoneOperationsGetCall { + c := &ManagedZoneOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.location = location + c.managedZone = managedZone + c.operation = operation + return c +} + +// ClientOperationId sets the optional parameter "clientOperationId": +// For mutating operation requests only. An optional identifier +// specified by the client. Must be unique for operation resources in +// the Operations collection. +func (c *ManagedZoneOperationsGetCall) ClientOperationId(clientOperationId string) *ManagedZoneOperationsGetCall { + c.urlParams_.Set("clientOperationId", clientOperationId) + 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 *ManagedZoneOperationsGetCall) Fields(s ...googleapi.Field) *ManagedZoneOperationsGetCall { + 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 *ManagedZoneOperationsGetCall) IfNoneMatch(entityTag string) *ManagedZoneOperationsGetCall { + 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 *ManagedZoneOperationsGetCall) Context(ctx context.Context) *ManagedZoneOperationsGetCall { + 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 *ManagedZoneOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ManagedZoneOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/operations/{operation}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "location": c.location, + "managedZone": c.managedZone, + "operation": c.operation, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dns.managedZoneOperations.get" 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 *ManagedZoneOperationsGetCall) 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": "Fetches the representation of an existing Operation.", + // "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/operations/{operation}", + // "httpMethod": "GET", + // "id": "dns.managedZoneOperations.get", + // "parameterOrder": [ + // "project", + // "location", + // "managedZone", + // "operation" + // ], + // "parameters": { + // "clientOperationId": { + // "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + // "location": "query", + // "type": "string" + // }, + // "location": { + // "default": "global", + // "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "managedZone": { + // "description": "Identifies the managed zone addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "operation": { + // "description": "Identifies the operation addressed by this request (ID of the operation).", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Identifies the project addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/operations/{operation}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-platform.read-only", + // "https://www.googleapis.com/auth/ndev.clouddns.readonly", + // "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + // ] + // } + +} + +// method id "dns.managedZoneOperations.list": + +type ManagedZoneOperationsListCall struct { + s *Service + project string + location string + managedZone string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Enumerates Operations for the given ManagedZone. +// +// - location: Specifies the location of the resource. This information +// will be used for routing and will be part of the resource name. +// - managedZone: Identifies the managed zone addressed by this request. +// - project: Identifies the project addressed by this request. +func (r *ManagedZoneOperationsService) List(project string, location string, managedZone string) *ManagedZoneOperationsListCall { + c := &ManagedZoneOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.location = location + c.managedZone = managedZone + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum number +// of results to be returned. If unspecified, the server decides how +// many results to return. +func (c *ManagedZoneOperationsListCall) MaxResults(maxResults int64) *ManagedZoneOperationsListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// PageToken sets the optional parameter "pageToken": A tag returned by +// a previous list request that was truncated. Use this parameter to +// continue a previous list request. +func (c *ManagedZoneOperationsListCall) PageToken(pageToken string) *ManagedZoneOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// SortBy sets the optional parameter "sortBy": Sorting criterion. The +// only supported values are START_TIME and ID. +// +// Possible values: +// "START_TIME" (default) +// "ID" +func (c *ManagedZoneOperationsListCall) SortBy(sortBy string) *ManagedZoneOperationsListCall { + c.urlParams_.Set("sortBy", sortBy) + 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 *ManagedZoneOperationsListCall) Fields(s ...googleapi.Field) *ManagedZoneOperationsListCall { + 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 *ManagedZoneOperationsListCall) IfNoneMatch(entityTag string) *ManagedZoneOperationsListCall { + 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 *ManagedZoneOperationsListCall) Context(ctx context.Context) *ManagedZoneOperationsListCall { + 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 *ManagedZoneOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ManagedZoneOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/operations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "location": c.location, + "managedZone": c.managedZone, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dns.managedZoneOperations.list" call. +// Exactly one of *ManagedZoneOperationsListResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ManagedZoneOperationsListResponse.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 *ManagedZoneOperationsListCall) Do(opts ...googleapi.CallOption) (*ManagedZoneOperationsListResponse, 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 := &ManagedZoneOperationsListResponse{ + 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": "Enumerates Operations for the given ManagedZone.", + // "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/operations", + // "httpMethod": "GET", + // "id": "dns.managedZoneOperations.list", + // "parameterOrder": [ + // "project", + // "location", + // "managedZone" + // ], + // "parameters": { + // "location": { + // "default": "global", + // "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "managedZone": { + // "description": "Identifies the managed zone addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "maxResults": { + // "description": "Optional. Maximum number of results to be returned. If unspecified, the server decides how many results to return.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Identifies the project addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "sortBy": { + // "default": "START_TIME", + // "description": "Sorting criterion. The only supported values are START_TIME and ID.", + // "enum": [ + // "START_TIME", + // "ID" + // ], + // "enumDescriptions": [ + // "", + // "" + // ], + // "location": "query", + // "type": "string" + // } + // }, + // "path": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/operations", + // "response": { + // "$ref": "ManagedZoneOperationsListResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-platform.read-only", + // "https://www.googleapis.com/auth/ndev.clouddns.readonly", + // "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + // ] + // } + +} + +// 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 *ManagedZoneOperationsListCall) Pages(ctx context.Context, f func(*ManagedZoneOperationsListResponse) 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 "dns.managedZones.create": + +type ManagedZonesCreateCall struct { + s *Service + project string + location string + managedzone *ManagedZone + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new ManagedZone. +// +// - location: Specifies the location of the resource. This information +// will be used for routing and will be part of the resource name. +// - project: Identifies the project addressed by this request. +func (r *ManagedZonesService) Create(project string, location string, managedzone *ManagedZone) *ManagedZonesCreateCall { + c := &ManagedZonesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.location = location + c.managedzone = managedzone + return c +} + +// ClientOperationId sets the optional parameter "clientOperationId": +// For mutating operation requests only. An optional identifier +// specified by the client. Must be unique for operation resources in +// the Operations collection. +func (c *ManagedZonesCreateCall) ClientOperationId(clientOperationId string) *ManagedZonesCreateCall { + c.urlParams_.Set("clientOperationId", clientOperationId) + 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 *ManagedZonesCreateCall) Fields(s ...googleapi.Field) *ManagedZonesCreateCall { + 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 *ManagedZonesCreateCall) Context(ctx context.Context) *ManagedZonesCreateCall { + 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 *ManagedZonesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ManagedZonesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.managedzone) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/managedZones") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "location": c.location, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dns.managedZones.create" call. +// Exactly one of *ManagedZone or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *ManagedZone.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 *ManagedZonesCreateCall) Do(opts ...googleapi.CallOption) (*ManagedZone, 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 := &ManagedZone{ + 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 ManagedZone.", + // "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones", + // "httpMethod": "POST", + // "id": "dns.managedZones.create", + // "parameterOrder": [ + // "project", + // "location" + // ], + // "parameters": { + // "clientOperationId": { + // "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + // "location": "query", + // "type": "string" + // }, + // "location": { + // "default": "global", + // "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Identifies the project addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "dns/v2/projects/{project}/locations/{location}/managedZones", + // "request": { + // "$ref": "ManagedZone" + // }, + // "response": { + // "$ref": "ManagedZone" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + // ] + // } + +} + +// method id "dns.managedZones.delete": + +type ManagedZonesDeleteCall struct { + s *Service + project string + location string + managedZone string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a previously created ManagedZone. +// +// - location: Specifies the location of the resource. This information +// will be used for routing and will be part of the resource name. +// - managedZone: Identifies the managed zone addressed by this request. +// Can be the managed zone name or ID. +// - project: Identifies the project addressed by this request. +func (r *ManagedZonesService) Delete(project string, location string, managedZone string) *ManagedZonesDeleteCall { + c := &ManagedZonesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.location = location + c.managedZone = managedZone + return c +} + +// ClientOperationId sets the optional parameter "clientOperationId": +// For mutating operation requests only. An optional identifier +// specified by the client. Must be unique for operation resources in +// the Operations collection. +func (c *ManagedZonesDeleteCall) ClientOperationId(clientOperationId string) *ManagedZonesDeleteCall { + c.urlParams_.Set("clientOperationId", clientOperationId) + 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 *ManagedZonesDeleteCall) Fields(s ...googleapi.Field) *ManagedZonesDeleteCall { + 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 *ManagedZonesDeleteCall) Context(ctx context.Context) *ManagedZonesDeleteCall { + 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 *ManagedZonesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ManagedZonesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "location": c.location, + "managedZone": c.managedZone, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dns.managedZones.delete" call. +func (c *ManagedZonesDeleteCall) Do(opts ...googleapi.CallOption) error { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if err != nil { + return err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return err + } + return nil + // { + // "description": "Deletes a previously created ManagedZone.", + // "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}", + // "httpMethod": "DELETE", + // "id": "dns.managedZones.delete", + // "parameterOrder": [ + // "project", + // "location", + // "managedZone" + // ], + // "parameters": { + // "clientOperationId": { + // "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + // "location": "query", + // "type": "string" + // }, + // "location": { + // "default": "global", + // "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "managedZone": { + // "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Identifies the project addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}", + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + // ] + // } + +} + +// method id "dns.managedZones.get": + +type ManagedZonesGetCall struct { + s *Service + project string + location string + managedZone string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Fetches the representation of an existing ManagedZone. +// +// - location: Specifies the location of the resource. This information +// will be used for routing and will be part of the resource name. +// - managedZone: Identifies the managed zone addressed by this request. +// Can be the managed zone name or ID. +// - project: Identifies the project addressed by this request. +func (r *ManagedZonesService) Get(project string, location string, managedZone string) *ManagedZonesGetCall { + c := &ManagedZonesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.location = location + c.managedZone = managedZone + return c +} + +// ClientOperationId sets the optional parameter "clientOperationId": +// For mutating operation requests only. An optional identifier +// specified by the client. Must be unique for operation resources in +// the Operations collection. +func (c *ManagedZonesGetCall) ClientOperationId(clientOperationId string) *ManagedZonesGetCall { + c.urlParams_.Set("clientOperationId", clientOperationId) + 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 *ManagedZonesGetCall) Fields(s ...googleapi.Field) *ManagedZonesGetCall { + 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 *ManagedZonesGetCall) IfNoneMatch(entityTag string) *ManagedZonesGetCall { + 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 *ManagedZonesGetCall) Context(ctx context.Context) *ManagedZonesGetCall { + 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 *ManagedZonesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ManagedZonesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "location": c.location, + "managedZone": c.managedZone, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dns.managedZones.get" call. +// Exactly one of *ManagedZone or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *ManagedZone.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 *ManagedZonesGetCall) Do(opts ...googleapi.CallOption) (*ManagedZone, 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 := &ManagedZone{ + 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": "Fetches the representation of an existing ManagedZone.", + // "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}", + // "httpMethod": "GET", + // "id": "dns.managedZones.get", + // "parameterOrder": [ + // "project", + // "location", + // "managedZone" + // ], + // "parameters": { + // "clientOperationId": { + // "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + // "location": "query", + // "type": "string" + // }, + // "location": { + // "default": "global", + // "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "managedZone": { + // "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Identifies the project addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}", + // "response": { + // "$ref": "ManagedZone" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-platform.read-only", + // "https://www.googleapis.com/auth/ndev.clouddns.readonly", + // "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + // ] + // } + +} + +// method id "dns.managedZones.list": + +type ManagedZonesListCall struct { + s *Service + project string + location string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Enumerates ManagedZones that have been created but not yet +// deleted. +// +// - location: Specifies the location of the resource. This information +// will be used for routing and will be part of the resource name. +// - project: Identifies the project addressed by this request. +func (r *ManagedZonesService) List(project string, location string) *ManagedZonesListCall { + c := &ManagedZonesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.location = location + return c +} + +// DnsName sets the optional parameter "dnsName": Restricts the list to +// return only zones with this domain name. +func (c *ManagedZonesListCall) DnsName(dnsName string) *ManagedZonesListCall { + c.urlParams_.Set("dnsName", dnsName) + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum number +// of results to be returned. If unspecified, the server decides how +// many results to return. +func (c *ManagedZonesListCall) MaxResults(maxResults int64) *ManagedZonesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// PageToken sets the optional parameter "pageToken": A tag returned by +// a previous list request that was truncated. Use this parameter to +// continue a previous list request. +func (c *ManagedZonesListCall) PageToken(pageToken string) *ManagedZonesListCall { + 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 *ManagedZonesListCall) Fields(s ...googleapi.Field) *ManagedZonesListCall { + 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 *ManagedZonesListCall) IfNoneMatch(entityTag string) *ManagedZonesListCall { + 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 *ManagedZonesListCall) Context(ctx context.Context) *ManagedZonesListCall { + 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 *ManagedZonesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ManagedZonesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/managedZones") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "location": c.location, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dns.managedZones.list" call. +// Exactly one of *ManagedZonesListResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ManagedZonesListResponse.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 *ManagedZonesListCall) Do(opts ...googleapi.CallOption) (*ManagedZonesListResponse, 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 := &ManagedZonesListResponse{ + 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": "Enumerates ManagedZones that have been created but not yet deleted.", + // "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones", + // "httpMethod": "GET", + // "id": "dns.managedZones.list", + // "parameterOrder": [ + // "project", + // "location" + // ], + // "parameters": { + // "dnsName": { + // "description": "Restricts the list to return only zones with this domain name.", + // "location": "query", + // "type": "string" + // }, + // "location": { + // "default": "global", + // "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "maxResults": { + // "description": "Optional. Maximum number of results to be returned. If unspecified, the server decides how many results to return.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Identifies the project addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "dns/v2/projects/{project}/locations/{location}/managedZones", + // "response": { + // "$ref": "ManagedZonesListResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-platform.read-only", + // "https://www.googleapis.com/auth/ndev.clouddns.readonly", + // "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + // ] + // } + +} + +// 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 *ManagedZonesListCall) Pages(ctx context.Context, f func(*ManagedZonesListResponse) 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 "dns.managedZones.patch": + +type ManagedZonesPatchCall struct { + s *Service + project string + location string + managedZone string + managedzone *ManagedZone + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Applies a partial update to an existing ManagedZone. +// +// - location: Specifies the location of the resource. This information +// will be used for routing and will be part of the resource name. +// - managedZone: Identifies the managed zone addressed by this request. +// Can be the managed zone name or ID. +// - project: Identifies the project addressed by this request. +func (r *ManagedZonesService) Patch(project string, location string, managedZone string, managedzone *ManagedZone) *ManagedZonesPatchCall { + c := &ManagedZonesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.location = location + c.managedZone = managedZone + c.managedzone = managedzone + return c +} + +// ClientOperationId sets the optional parameter "clientOperationId": +// For mutating operation requests only. An optional identifier +// specified by the client. Must be unique for operation resources in +// the Operations collection. +func (c *ManagedZonesPatchCall) ClientOperationId(clientOperationId string) *ManagedZonesPatchCall { + c.urlParams_.Set("clientOperationId", clientOperationId) + 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 *ManagedZonesPatchCall) Fields(s ...googleapi.Field) *ManagedZonesPatchCall { + 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 *ManagedZonesPatchCall) Context(ctx context.Context) *ManagedZonesPatchCall { + 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 *ManagedZonesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ManagedZonesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.managedzone) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "location": c.location, + "managedZone": c.managedZone, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dns.managedZones.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ManagedZonesPatchCall) 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": "Applies a partial update to an existing ManagedZone.", + // "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}", + // "httpMethod": "PATCH", + // "id": "dns.managedZones.patch", + // "parameterOrder": [ + // "project", + // "location", + // "managedZone" + // ], + // "parameters": { + // "clientOperationId": { + // "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + // "location": "query", + // "type": "string" + // }, + // "location": { + // "default": "global", + // "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "managedZone": { + // "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Identifies the project addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}", + // "request": { + // "$ref": "ManagedZone" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + // ] + // } + +} + +// method id "dns.managedZones.update": + +type ManagedZonesUpdateCall struct { + s *Service + project string + location string + managedZone string + managedzone *ManagedZone + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Update: Updates an existing ManagedZone. +// +// - location: Specifies the location of the resource. This information +// will be used for routing and will be part of the resource name. +// - managedZone: Identifies the managed zone addressed by this request. +// Can be the managed zone name or ID. +// - project: Identifies the project addressed by this request. +func (r *ManagedZonesService) Update(project string, location string, managedZone string, managedzone *ManagedZone) *ManagedZonesUpdateCall { + c := &ManagedZonesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.location = location + c.managedZone = managedZone + c.managedzone = managedzone + return c +} + +// ClientOperationId sets the optional parameter "clientOperationId": +// For mutating operation requests only. An optional identifier +// specified by the client. Must be unique for operation resources in +// the Operations collection. +func (c *ManagedZonesUpdateCall) ClientOperationId(clientOperationId string) *ManagedZonesUpdateCall { + c.urlParams_.Set("clientOperationId", clientOperationId) + 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 *ManagedZonesUpdateCall) Fields(s ...googleapi.Field) *ManagedZonesUpdateCall { + 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 *ManagedZonesUpdateCall) Context(ctx context.Context) *ManagedZonesUpdateCall { + 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 *ManagedZonesUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ManagedZonesUpdateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.managedzone) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PUT", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "location": c.location, + "managedZone": c.managedZone, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dns.managedZones.update" 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 *ManagedZonesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates an existing ManagedZone.", + // "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}", + // "httpMethod": "PUT", + // "id": "dns.managedZones.update", + // "parameterOrder": [ + // "project", + // "location", + // "managedZone" + // ], + // "parameters": { + // "clientOperationId": { + // "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + // "location": "query", + // "type": "string" + // }, + // "location": { + // "default": "global", + // "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "managedZone": { + // "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Identifies the project addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}", + // "request": { + // "$ref": "ManagedZone" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + // ] + // } + +} + +// method id "dns.policies.create": + +type PoliciesCreateCall struct { + s *Service + project string + location string + policy *Policy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new Policy. +// +// - location: Specifies the location of the resource. This information +// will be used for routing and will be part of the resource name. +// - project: Identifies the project addressed by this request. +func (r *PoliciesService) Create(project string, location string, policy *Policy) *PoliciesCreateCall { + c := &PoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.location = location + c.policy = policy + return c +} + +// ClientOperationId sets the optional parameter "clientOperationId": +// For mutating operation requests only. An optional identifier +// specified by the client. Must be unique for operation resources in +// the Operations collection. +func (c *PoliciesCreateCall) ClientOperationId(clientOperationId string) *PoliciesCreateCall { + c.urlParams_.Set("clientOperationId", clientOperationId) + 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 *PoliciesCreateCall) Fields(s ...googleapi.Field) *PoliciesCreateCall { + 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 *PoliciesCreateCall) Context(ctx context.Context) *PoliciesCreateCall { + 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 *PoliciesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PoliciesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.policy) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/policies") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "location": c.location, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dns.policies.create" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.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 *PoliciesCreateCall) Do(opts ...googleapi.CallOption) (*Policy, 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 := &Policy{ + 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 Policy.", + // "flatPath": "dns/v2/projects/{project}/locations/{location}/policies", + // "httpMethod": "POST", + // "id": "dns.policies.create", + // "parameterOrder": [ + // "project", + // "location" + // ], + // "parameters": { + // "clientOperationId": { + // "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + // "location": "query", + // "type": "string" + // }, + // "location": { + // "default": "global", + // "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Identifies the project addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "dns/v2/projects/{project}/locations/{location}/policies", + // "request": { + // "$ref": "Policy" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + // ] + // } + +} + +// method id "dns.policies.delete": + +type PoliciesDeleteCall struct { + s *Service + project string + location string + policy string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a previously created Policy. Fails if the policy is +// still being referenced by a network. +// +// - location: Specifies the location of the resource. This information +// will be used for routing and will be part of the resource name. +// - policy: User given friendly name of the policy addressed by this +// request. +// - project: Identifies the project addressed by this request. +func (r *PoliciesService) Delete(project string, location string, policy string) *PoliciesDeleteCall { + c := &PoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.location = location + c.policy = policy + return c +} + +// ClientOperationId sets the optional parameter "clientOperationId": +// For mutating operation requests only. An optional identifier +// specified by the client. Must be unique for operation resources in +// the Operations collection. +func (c *PoliciesDeleteCall) ClientOperationId(clientOperationId string) *PoliciesDeleteCall { + c.urlParams_.Set("clientOperationId", clientOperationId) + 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 *PoliciesDeleteCall) Fields(s ...googleapi.Field) *PoliciesDeleteCall { + 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 *PoliciesDeleteCall) Context(ctx context.Context) *PoliciesDeleteCall { + 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 *PoliciesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/policies/{policy}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "location": c.location, + "policy": c.policy, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dns.policies.delete" call. +func (c *PoliciesDeleteCall) Do(opts ...googleapi.CallOption) error { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if err != nil { + return err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return err + } + return nil + // { + // "description": "Deletes a previously created Policy. Fails if the policy is still being referenced by a network.", + // "flatPath": "dns/v2/projects/{project}/locations/{location}/policies/{policy}", + // "httpMethod": "DELETE", + // "id": "dns.policies.delete", + // "parameterOrder": [ + // "project", + // "location", + // "policy" + // ], + // "parameters": { + // "clientOperationId": { + // "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + // "location": "query", + // "type": "string" + // }, + // "location": { + // "default": "global", + // "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "policy": { + // "description": "User given friendly name of the policy addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Identifies the project addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "dns/v2/projects/{project}/locations/{location}/policies/{policy}", + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + // ] + // } + +} + +// method id "dns.policies.get": + +type PoliciesGetCall struct { + s *Service + project string + location string + policy string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Fetches the representation of an existing Policy. +// +// - location: Specifies the location of the resource. This information +// will be used for routing and will be part of the resource name. +// - policy: User given friendly name of the policy addressed by this +// request. +// - project: Identifies the project addressed by this request. +func (r *PoliciesService) Get(project string, location string, policy string) *PoliciesGetCall { + c := &PoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.location = location + c.policy = policy + return c +} + +// ClientOperationId sets the optional parameter "clientOperationId": +// For mutating operation requests only. An optional identifier +// specified by the client. Must be unique for operation resources in +// the Operations collection. +func (c *PoliciesGetCall) ClientOperationId(clientOperationId string) *PoliciesGetCall { + c.urlParams_.Set("clientOperationId", clientOperationId) + 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 *PoliciesGetCall) Fields(s ...googleapi.Field) *PoliciesGetCall { + 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 *PoliciesGetCall) IfNoneMatch(entityTag string) *PoliciesGetCall { + 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 *PoliciesGetCall) Context(ctx context.Context) *PoliciesGetCall { + 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 *PoliciesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PoliciesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/policies/{policy}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "location": c.location, + "policy": c.policy, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dns.policies.get" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.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 *PoliciesGetCall) Do(opts ...googleapi.CallOption) (*Policy, 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 := &Policy{ + 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": "Fetches the representation of an existing Policy.", + // "flatPath": "dns/v2/projects/{project}/locations/{location}/policies/{policy}", + // "httpMethod": "GET", + // "id": "dns.policies.get", + // "parameterOrder": [ + // "project", + // "location", + // "policy" + // ], + // "parameters": { + // "clientOperationId": { + // "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + // "location": "query", + // "type": "string" + // }, + // "location": { + // "default": "global", + // "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "policy": { + // "description": "User given friendly name of the policy addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Identifies the project addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "dns/v2/projects/{project}/locations/{location}/policies/{policy}", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-platform.read-only", + // "https://www.googleapis.com/auth/ndev.clouddns.readonly", + // "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + // ] + // } + +} + +// method id "dns.policies.list": + +type PoliciesListCall struct { + s *Service + project string + location string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Enumerates all Policies associated with a project. +// +// - location: Specifies the location of the resource. This information +// will be used for routing and will be part of the resource name. +// - project: Identifies the project addressed by this request. +func (r *PoliciesService) List(project string, location string) *PoliciesListCall { + c := &PoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.location = location + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum number +// of results to be returned. If unspecified, the server decides how +// many results to return. +func (c *PoliciesListCall) MaxResults(maxResults int64) *PoliciesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// PageToken sets the optional parameter "pageToken": A tag returned by +// a previous list request that was truncated. Use this parameter to +// continue a previous list request. +func (c *PoliciesListCall) PageToken(pageToken string) *PoliciesListCall { + 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 *PoliciesListCall) Fields(s ...googleapi.Field) *PoliciesListCall { + 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 *PoliciesListCall) IfNoneMatch(entityTag string) *PoliciesListCall { + 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 *PoliciesListCall) Context(ctx context.Context) *PoliciesListCall { + 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 *PoliciesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PoliciesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/policies") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "location": c.location, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dns.policies.list" call. +// Exactly one of *PoliciesListResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *PoliciesListResponse.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 *PoliciesListCall) Do(opts ...googleapi.CallOption) (*PoliciesListResponse, 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 := &PoliciesListResponse{ + 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": "Enumerates all Policies associated with a project.", + // "flatPath": "dns/v2/projects/{project}/locations/{location}/policies", + // "httpMethod": "GET", + // "id": "dns.policies.list", + // "parameterOrder": [ + // "project", + // "location" + // ], + // "parameters": { + // "location": { + // "default": "global", + // "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "maxResults": { + // "description": "Optional. Maximum number of results to be returned. If unspecified, the server decides how many results to return.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Identifies the project addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "dns/v2/projects/{project}/locations/{location}/policies", + // "response": { + // "$ref": "PoliciesListResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-platform.read-only", + // "https://www.googleapis.com/auth/ndev.clouddns.readonly", + // "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + // ] + // } + +} + +// 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 *PoliciesListCall) Pages(ctx context.Context, f func(*PoliciesListResponse) 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 "dns.policies.patch": + +type PoliciesPatchCall struct { + s *Service + project string + location string + policy string + policy2 *Policy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Applies a partial update to an existing Policy. +// +// - location: Specifies the location of the resource. This information +// will be used for routing and will be part of the resource name. +// - policy: User given friendly name of the policy addressed by this +// request. +// - project: Identifies the project addressed by this request. +func (r *PoliciesService) Patch(project string, location string, policy string, policy2 *Policy) *PoliciesPatchCall { + c := &PoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.location = location + c.policy = policy + c.policy2 = policy2 + return c +} + +// ClientOperationId sets the optional parameter "clientOperationId": +// For mutating operation requests only. An optional identifier +// specified by the client. Must be unique for operation resources in +// the Operations collection. +func (c *PoliciesPatchCall) ClientOperationId(clientOperationId string) *PoliciesPatchCall { + c.urlParams_.Set("clientOperationId", clientOperationId) + 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 *PoliciesPatchCall) Fields(s ...googleapi.Field) *PoliciesPatchCall { + 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 *PoliciesPatchCall) Context(ctx context.Context) *PoliciesPatchCall { + 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 *PoliciesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PoliciesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.policy2) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/policies/{policy}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "location": c.location, + "policy": c.policy, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dns.policies.patch" call. +// Exactly one of *PoliciesPatchResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *PoliciesPatchResponse.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 *PoliciesPatchCall) Do(opts ...googleapi.CallOption) (*PoliciesPatchResponse, 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 := &PoliciesPatchResponse{ + 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": "Applies a partial update to an existing Policy.", + // "flatPath": "dns/v2/projects/{project}/locations/{location}/policies/{policy}", + // "httpMethod": "PATCH", + // "id": "dns.policies.patch", + // "parameterOrder": [ + // "project", + // "location", + // "policy" + // ], + // "parameters": { + // "clientOperationId": { + // "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + // "location": "query", + // "type": "string" + // }, + // "location": { + // "default": "global", + // "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "policy": { + // "description": "User given friendly name of the policy addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Identifies the project addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "dns/v2/projects/{project}/locations/{location}/policies/{policy}", + // "request": { + // "$ref": "Policy" + // }, + // "response": { + // "$ref": "PoliciesPatchResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + // ] + // } + +} + +// method id "dns.policies.update": + +type PoliciesUpdateCall struct { + s *Service + project string + location string + policy string + policy2 *Policy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Update: Updates an existing Policy. +// +// - location: Specifies the location of the resource. This information +// will be used for routing and will be part of the resource name. +// - policy: User given friendly name of the policy addressed by this +// request. +// - project: Identifies the project addressed by this request. +func (r *PoliciesService) Update(project string, location string, policy string, policy2 *Policy) *PoliciesUpdateCall { + c := &PoliciesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.location = location + c.policy = policy + c.policy2 = policy2 + return c +} + +// ClientOperationId sets the optional parameter "clientOperationId": +// For mutating operation requests only. An optional identifier +// specified by the client. Must be unique for operation resources in +// the Operations collection. +func (c *PoliciesUpdateCall) ClientOperationId(clientOperationId string) *PoliciesUpdateCall { + c.urlParams_.Set("clientOperationId", clientOperationId) + 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 *PoliciesUpdateCall) Fields(s ...googleapi.Field) *PoliciesUpdateCall { + 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 *PoliciesUpdateCall) Context(ctx context.Context) *PoliciesUpdateCall { + 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 *PoliciesUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PoliciesUpdateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.policy2) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/policies/{policy}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PUT", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "location": c.location, + "policy": c.policy, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dns.policies.update" call. +// Exactly one of *PoliciesUpdateResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *PoliciesUpdateResponse.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 *PoliciesUpdateCall) Do(opts ...googleapi.CallOption) (*PoliciesUpdateResponse, 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 := &PoliciesUpdateResponse{ + 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 existing Policy.", + // "flatPath": "dns/v2/projects/{project}/locations/{location}/policies/{policy}", + // "httpMethod": "PUT", + // "id": "dns.policies.update", + // "parameterOrder": [ + // "project", + // "location", + // "policy" + // ], + // "parameters": { + // "clientOperationId": { + // "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + // "location": "query", + // "type": "string" + // }, + // "location": { + // "default": "global", + // "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "policy": { + // "description": "User given friendly name of the policy addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Identifies the project addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "dns/v2/projects/{project}/locations/{location}/policies/{policy}", + // "request": { + // "$ref": "Policy" + // }, + // "response": { + // "$ref": "PoliciesUpdateResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + // ] + // } + +} + +// method id "dns.projects.get": + +type ProjectsGetCall struct { + s *Service + project string + location string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Fetches the representation of an existing Project. +// +// - location: . +// - project: Identifies the project addressed by this request. +func (r *ProjectsService) Get(project string, location string) *ProjectsGetCall { + c := &ProjectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.location = location + return c +} + +// ClientOperationId sets the optional parameter "clientOperationId": +// For mutating operation requests only. An optional identifier +// specified by the client. Must be unique for operation resources in +// the Operations collection. +func (c *ProjectsGetCall) ClientOperationId(clientOperationId string) *ProjectsGetCall { + c.urlParams_.Set("clientOperationId", clientOperationId) + 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 *ProjectsGetCall) Fields(s ...googleapi.Field) *ProjectsGetCall { + 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 *ProjectsGetCall) IfNoneMatch(entityTag string) *ProjectsGetCall { + 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 *ProjectsGetCall) Context(ctx context.Context) *ProjectsGetCall { + 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 *ProjectsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "location": c.location, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dns.projects.get" call. +// Exactly one of *Project or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Project.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 *ProjectsGetCall) Do(opts ...googleapi.CallOption) (*Project, 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 := &Project{ + 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": "Fetches the representation of an existing Project.", + // "flatPath": "dns/v2/projects/{project}/locations/{location}", + // "httpMethod": "GET", + // "id": "dns.projects.get", + // "parameterOrder": [ + // "project", + // "location" + // ], + // "parameters": { + // "clientOperationId": { + // "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + // "location": "query", + // "type": "string" + // }, + // "location": { + // "default": "global", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Identifies the project addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "dns/v2/projects/{project}/locations/{location}", + // "response": { + // "$ref": "Project" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-platform.read-only", + // "https://www.googleapis.com/auth/ndev.clouddns.readonly", + // "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + // ] + // } + +} + +// method id "dns.resourceRecordSets.create": + +type ResourceRecordSetsCreateCall struct { + s *Service + project string + location string + managedZone string + resourcerecordset *ResourceRecordSet + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new ResourceRecordSet. +// +// - location: Specifies the location of the resource. This information +// will be used for routing and will be part of the resource name. +// - managedZone: Identifies the managed zone addressed by this request. +// Can be the managed zone name or ID. +// - project: Identifies the project addressed by this request. +func (r *ResourceRecordSetsService) Create(project string, location string, managedZone string, resourcerecordset *ResourceRecordSet) *ResourceRecordSetsCreateCall { + c := &ResourceRecordSetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.location = location + c.managedZone = managedZone + c.resourcerecordset = resourcerecordset + return c +} + +// ClientOperationId sets the optional parameter "clientOperationId": +// For mutating operation requests only. An optional identifier +// specified by the client. Must be unique for operation resources in +// the Operations collection. +func (c *ResourceRecordSetsCreateCall) ClientOperationId(clientOperationId string) *ResourceRecordSetsCreateCall { + c.urlParams_.Set("clientOperationId", clientOperationId) + 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 *ResourceRecordSetsCreateCall) Fields(s ...googleapi.Field) *ResourceRecordSetsCreateCall { + 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 *ResourceRecordSetsCreateCall) Context(ctx context.Context) *ResourceRecordSetsCreateCall { + 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 *ResourceRecordSetsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ResourceRecordSetsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.resourcerecordset) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/rrsets") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "location": c.location, + "managedZone": c.managedZone, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dns.resourceRecordSets.create" call. +// Exactly one of *ResourceRecordSet or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ResourceRecordSet.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 *ResourceRecordSetsCreateCall) Do(opts ...googleapi.CallOption) (*ResourceRecordSet, 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 := &ResourceRecordSet{ + 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 ResourceRecordSet.", + // "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/rrsets", + // "httpMethod": "POST", + // "id": "dns.resourceRecordSets.create", + // "parameterOrder": [ + // "project", + // "location", + // "managedZone" + // ], + // "parameters": { + // "clientOperationId": { + // "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + // "location": "query", + // "type": "string" + // }, + // "location": { + // "default": "global", + // "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "managedZone": { + // "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Identifies the project addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/rrsets", + // "request": { + // "$ref": "ResourceRecordSet" + // }, + // "response": { + // "$ref": "ResourceRecordSet" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + // ] + // } + +} + +// method id "dns.resourceRecordSets.delete": + +type ResourceRecordSetsDeleteCall struct { + s *Service + project string + location string + managedZone string + name string + type_ string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a previously created ResourceRecordSet. +// +// - location: Specifies the location of the resource. This information +// will be used for routing and will be part of the resource name. +// - managedZone: Identifies the managed zone addressed by this request. +// Can be the managed zone name or ID. +// - name: Fully qualified domain name. +// - project: Identifies the project addressed by this request. +// - type: RRSet type. +func (r *ResourceRecordSetsService) Delete(project string, location string, managedZone string, name string, type_ string) *ResourceRecordSetsDeleteCall { + c := &ResourceRecordSetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.location = location + c.managedZone = managedZone + c.name = name + c.type_ = type_ + return c +} + +// ClientOperationId sets the optional parameter "clientOperationId": +// For mutating operation requests only. An optional identifier +// specified by the client. Must be unique for operation resources in +// the Operations collection. +func (c *ResourceRecordSetsDeleteCall) ClientOperationId(clientOperationId string) *ResourceRecordSetsDeleteCall { + c.urlParams_.Set("clientOperationId", clientOperationId) + 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 *ResourceRecordSetsDeleteCall) Fields(s ...googleapi.Field) *ResourceRecordSetsDeleteCall { + 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 *ResourceRecordSetsDeleteCall) Context(ctx context.Context) *ResourceRecordSetsDeleteCall { + 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 *ResourceRecordSetsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ResourceRecordSetsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/rrsets/{name}/{type}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "location": c.location, + "managedZone": c.managedZone, + "name": c.name, + "type": c.type_, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dns.resourceRecordSets.delete" call. +func (c *ResourceRecordSetsDeleteCall) Do(opts ...googleapi.CallOption) error { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if err != nil { + return err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return err + } + return nil + // { + // "description": "Deletes a previously created ResourceRecordSet.", + // "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/rrsets/{name}/{type}", + // "httpMethod": "DELETE", + // "id": "dns.resourceRecordSets.delete", + // "parameterOrder": [ + // "project", + // "location", + // "managedZone", + // "name", + // "type" + // ], + // "parameters": { + // "clientOperationId": { + // "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + // "location": "query", + // "type": "string" + // }, + // "location": { + // "default": "global", + // "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "managedZone": { + // "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "name": { + // "description": "Fully qualified domain name.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Identifies the project addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "type": { + // "description": "RRSet type.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/rrsets/{name}/{type}", + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + // ] + // } + +} + +// method id "dns.resourceRecordSets.get": + +type ResourceRecordSetsGetCall struct { + s *Service + project string + location string + managedZone string + name string + type_ string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Fetches the representation of an existing ResourceRecordSet. +// +// - location: Specifies the location of the resource. This information +// will be used for routing and will be part of the resource name. +// - managedZone: Identifies the managed zone addressed by this request. +// Can be the managed zone name or ID. +// - name: Fully qualified domain name. +// - project: Identifies the project addressed by this request. +// - type: RRSet type. +func (r *ResourceRecordSetsService) Get(project string, location string, managedZone string, name string, type_ string) *ResourceRecordSetsGetCall { + c := &ResourceRecordSetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.location = location + c.managedZone = managedZone + c.name = name + c.type_ = type_ + return c +} + +// ClientOperationId sets the optional parameter "clientOperationId": +// For mutating operation requests only. An optional identifier +// specified by the client. Must be unique for operation resources in +// the Operations collection. +func (c *ResourceRecordSetsGetCall) ClientOperationId(clientOperationId string) *ResourceRecordSetsGetCall { + c.urlParams_.Set("clientOperationId", clientOperationId) + 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 *ResourceRecordSetsGetCall) Fields(s ...googleapi.Field) *ResourceRecordSetsGetCall { + 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 *ResourceRecordSetsGetCall) IfNoneMatch(entityTag string) *ResourceRecordSetsGetCall { + 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 *ResourceRecordSetsGetCall) Context(ctx context.Context) *ResourceRecordSetsGetCall { + 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 *ResourceRecordSetsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ResourceRecordSetsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/rrsets/{name}/{type}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "location": c.location, + "managedZone": c.managedZone, + "name": c.name, + "type": c.type_, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dns.resourceRecordSets.get" call. +// Exactly one of *ResourceRecordSet or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ResourceRecordSet.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 *ResourceRecordSetsGetCall) Do(opts ...googleapi.CallOption) (*ResourceRecordSet, 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 := &ResourceRecordSet{ + 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": "Fetches the representation of an existing ResourceRecordSet.", + // "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/rrsets/{name}/{type}", + // "httpMethod": "GET", + // "id": "dns.resourceRecordSets.get", + // "parameterOrder": [ + // "project", + // "location", + // "managedZone", + // "name", + // "type" + // ], + // "parameters": { + // "clientOperationId": { + // "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + // "location": "query", + // "type": "string" + // }, + // "location": { + // "default": "global", + // "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "managedZone": { + // "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "name": { + // "description": "Fully qualified domain name.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Identifies the project addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "type": { + // "description": "RRSet type.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/rrsets/{name}/{type}", + // "response": { + // "$ref": "ResourceRecordSet" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-platform.read-only", + // "https://www.googleapis.com/auth/ndev.clouddns.readonly", + // "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + // ] + // } + +} + +// method id "dns.resourceRecordSets.list": + +type ResourceRecordSetsListCall struct { + s *Service + project string + location string + managedZone string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Enumerates ResourceRecordSets that you have created but not yet +// deleted. +// +// - location: Specifies the location of the resource. This information +// will be used for routing and will be part of the resource name. +// - managedZone: Identifies the managed zone addressed by this request. +// Can be the managed zone name or ID. +// - project: Identifies the project addressed by this request. +func (r *ResourceRecordSetsService) List(project string, location string, managedZone string) *ResourceRecordSetsListCall { + c := &ResourceRecordSetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.location = location + c.managedZone = managedZone + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum number +// of results to be returned. If unspecified, the server decides how +// many results to return. +func (c *ResourceRecordSetsListCall) MaxResults(maxResults int64) *ResourceRecordSetsListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// Name sets the optional parameter "name": Restricts the list to return +// only records with this fully qualified domain name. +func (c *ResourceRecordSetsListCall) Name(name string) *ResourceRecordSetsListCall { + c.urlParams_.Set("name", name) + return c +} + +// PageToken sets the optional parameter "pageToken": A tag returned by +// a previous list request that was truncated. Use this parameter to +// continue a previous list request. +func (c *ResourceRecordSetsListCall) PageToken(pageToken string) *ResourceRecordSetsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Type sets the optional parameter "type": Restricts the list to return +// only records of this type. If present, the "name" parameter must also +// be present. +func (c *ResourceRecordSetsListCall) Type(type_ string) *ResourceRecordSetsListCall { + c.urlParams_.Set("type", type_) + 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 *ResourceRecordSetsListCall) Fields(s ...googleapi.Field) *ResourceRecordSetsListCall { + 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 *ResourceRecordSetsListCall) IfNoneMatch(entityTag string) *ResourceRecordSetsListCall { + 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 *ResourceRecordSetsListCall) Context(ctx context.Context) *ResourceRecordSetsListCall { + 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 *ResourceRecordSetsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ResourceRecordSetsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/rrsets") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "location": c.location, + "managedZone": c.managedZone, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dns.resourceRecordSets.list" call. +// Exactly one of *ResourceRecordSetsListResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ResourceRecordSetsListResponse.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 *ResourceRecordSetsListCall) Do(opts ...googleapi.CallOption) (*ResourceRecordSetsListResponse, 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 := &ResourceRecordSetsListResponse{ + 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": "Enumerates ResourceRecordSets that you have created but not yet deleted.", + // "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/rrsets", + // "httpMethod": "GET", + // "id": "dns.resourceRecordSets.list", + // "parameterOrder": [ + // "project", + // "location", + // "managedZone" + // ], + // "parameters": { + // "location": { + // "default": "global", + // "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "managedZone": { + // "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "maxResults": { + // "description": "Optional. Maximum number of results to be returned. If unspecified, the server decides how many results to return.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "name": { + // "description": "Restricts the list to return only records with this fully qualified domain name.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Identifies the project addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "type": { + // "description": "Restricts the list to return only records of this type. If present, the \"name\" parameter must also be present.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/rrsets", + // "response": { + // "$ref": "ResourceRecordSetsListResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-platform.read-only", + // "https://www.googleapis.com/auth/ndev.clouddns.readonly", + // "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + // ] + // } + +} + +// 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 *ResourceRecordSetsListCall) Pages(ctx context.Context, f func(*ResourceRecordSetsListResponse) 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 "dns.resourceRecordSets.patch": + +type ResourceRecordSetsPatchCall struct { + s *Service + project string + location string + managedZone string + name string + type_ string + resourcerecordset *ResourceRecordSet + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Applies a partial update to an existing ResourceRecordSet. +// +// - location: Specifies the location of the resource. This information +// will be used for routing and will be part of the resource name. +// - managedZone: Identifies the managed zone addressed by this request. +// Can be the managed zone name or ID. +// - name: Fully qualified domain name. +// - project: Identifies the project addressed by this request. +// - type: RRSet type. +func (r *ResourceRecordSetsService) Patch(project string, location string, managedZone string, name string, type_ string, resourcerecordset *ResourceRecordSet) *ResourceRecordSetsPatchCall { + c := &ResourceRecordSetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.location = location + c.managedZone = managedZone + c.name = name + c.type_ = type_ + c.resourcerecordset = resourcerecordset + return c +} + +// ClientOperationId sets the optional parameter "clientOperationId": +// For mutating operation requests only. An optional identifier +// specified by the client. Must be unique for operation resources in +// the Operations collection. +func (c *ResourceRecordSetsPatchCall) ClientOperationId(clientOperationId string) *ResourceRecordSetsPatchCall { + c.urlParams_.Set("clientOperationId", clientOperationId) + 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 *ResourceRecordSetsPatchCall) Fields(s ...googleapi.Field) *ResourceRecordSetsPatchCall { + 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 *ResourceRecordSetsPatchCall) Context(ctx context.Context) *ResourceRecordSetsPatchCall { + 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 *ResourceRecordSetsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ResourceRecordSetsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.resourcerecordset) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/rrsets/{name}/{type}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "location": c.location, + "managedZone": c.managedZone, + "name": c.name, + "type": c.type_, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dns.resourceRecordSets.patch" call. +// Exactly one of *ResourceRecordSet or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ResourceRecordSet.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 *ResourceRecordSetsPatchCall) Do(opts ...googleapi.CallOption) (*ResourceRecordSet, 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 := &ResourceRecordSet{ + 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": "Applies a partial update to an existing ResourceRecordSet.", + // "flatPath": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/rrsets/{name}/{type}", + // "httpMethod": "PATCH", + // "id": "dns.resourceRecordSets.patch", + // "parameterOrder": [ + // "project", + // "location", + // "managedZone", + // "name", + // "type" + // ], + // "parameters": { + // "clientOperationId": { + // "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + // "location": "query", + // "type": "string" + // }, + // "location": { + // "default": "global", + // "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "managedZone": { + // "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "name": { + // "description": "Fully qualified domain name.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Identifies the project addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "type": { + // "description": "RRSet type.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "dns/v2/projects/{project}/locations/{location}/managedZones/{managedZone}/rrsets/{name}/{type}", + // "request": { + // "$ref": "ResourceRecordSet" + // }, + // "response": { + // "$ref": "ResourceRecordSet" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + // ] + // } + +} + +// method id "dns.responsePolicies.create": + +type ResponsePoliciesCreateCall struct { + s *Service + project string + location string + responsepolicy *ResponsePolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new Response Policy +// +// - location: Specifies the location of the resource, only applicable +// in the v APIs. This information will be used for routing and will +// be part of the resource name. +// - project: Identifies the project addressed by this request. +func (r *ResponsePoliciesService) Create(project string, location string, responsepolicy *ResponsePolicy) *ResponsePoliciesCreateCall { + c := &ResponsePoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.location = location + c.responsepolicy = responsepolicy + return c +} + +// ClientOperationId sets the optional parameter "clientOperationId": +// For mutating operation requests only. An optional identifier +// specified by the client. Must be unique for operation resources in +// the Operations collection. +func (c *ResponsePoliciesCreateCall) ClientOperationId(clientOperationId string) *ResponsePoliciesCreateCall { + c.urlParams_.Set("clientOperationId", clientOperationId) + 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 *ResponsePoliciesCreateCall) Fields(s ...googleapi.Field) *ResponsePoliciesCreateCall { + 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 *ResponsePoliciesCreateCall) Context(ctx context.Context) *ResponsePoliciesCreateCall { + 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 *ResponsePoliciesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ResponsePoliciesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.responsepolicy) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/responsePolicies") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "location": c.location, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dns.responsePolicies.create" call. +// Exactly one of *ResponsePolicy or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *ResponsePolicy.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 *ResponsePoliciesCreateCall) Do(opts ...googleapi.CallOption) (*ResponsePolicy, 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 := &ResponsePolicy{ + 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 Response Policy", + // "flatPath": "dns/v2/projects/{project}/locations/{location}/responsePolicies", + // "httpMethod": "POST", + // "id": "dns.responsePolicies.create", + // "parameterOrder": [ + // "project", + // "location" + // ], + // "parameters": { + // "clientOperationId": { + // "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + // "location": "query", + // "type": "string" + // }, + // "location": { + // "default": "global", + // "description": "Specifies the location of the resource, only applicable in the v APIs. This information will be used for routing and will be part of the resource name.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Identifies the project addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "dns/v2/projects/{project}/locations/{location}/responsePolicies", + // "request": { + // "$ref": "ResponsePolicy" + // }, + // "response": { + // "$ref": "ResponsePolicy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + // ] + // } + +} + +// method id "dns.responsePolicies.delete": + +type ResponsePoliciesDeleteCall struct { + s *Service + project string + location string + responsePolicy string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a previously created Response Policy. Fails if the +// response policy is non-empty or still being referenced by a network. +// +// - location: Specifies the location of the resource. This information +// will be used for routing and will be part of the resource name. +// - project: Identifies the project addressed by this request. +// - responsePolicy: User assigned name of the Response Policy addressed +// by this request. +func (r *ResponsePoliciesService) Delete(project string, location string, responsePolicy string) *ResponsePoliciesDeleteCall { + c := &ResponsePoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.location = location + c.responsePolicy = responsePolicy + return c +} + +// ClientOperationId sets the optional parameter "clientOperationId": +// For mutating operation requests only. An optional identifier +// specified by the client. Must be unique for operation resources in +// the Operations collection. +func (c *ResponsePoliciesDeleteCall) ClientOperationId(clientOperationId string) *ResponsePoliciesDeleteCall { + c.urlParams_.Set("clientOperationId", clientOperationId) + 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 *ResponsePoliciesDeleteCall) Fields(s ...googleapi.Field) *ResponsePoliciesDeleteCall { + 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 *ResponsePoliciesDeleteCall) Context(ctx context.Context) *ResponsePoliciesDeleteCall { + 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 *ResponsePoliciesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ResponsePoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "location": c.location, + "responsePolicy": c.responsePolicy, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dns.responsePolicies.delete" call. +func (c *ResponsePoliciesDeleteCall) Do(opts ...googleapi.CallOption) error { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if err != nil { + return err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return err + } + return nil + // { + // "description": "Deletes a previously created Response Policy. Fails if the response policy is non-empty or still being referenced by a network.", + // "flatPath": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}", + // "httpMethod": "DELETE", + // "id": "dns.responsePolicies.delete", + // "parameterOrder": [ + // "project", + // "location", + // "responsePolicy" + // ], + // "parameters": { + // "clientOperationId": { + // "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + // "location": "query", + // "type": "string" + // }, + // "location": { + // "default": "global", + // "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Identifies the project addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "responsePolicy": { + // "description": "User assigned name of the Response Policy addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}", + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + // ] + // } + +} + +// method id "dns.responsePolicies.get": + +type ResponsePoliciesGetCall struct { + s *Service + project string + location string + responsePolicy string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Fetches the representation of an existing Response Policy. +// +// - location: Specifies the location of the resource. This information +// will be used for routing and will be part of the resource name. +// - project: Identifies the project addressed by this request. +// - responsePolicy: User assigned name of the Response Policy addressed +// by this request. +func (r *ResponsePoliciesService) Get(project string, location string, responsePolicy string) *ResponsePoliciesGetCall { + c := &ResponsePoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.location = location + c.responsePolicy = responsePolicy + return c +} + +// ClientOperationId sets the optional parameter "clientOperationId": +// For mutating operation requests only. An optional identifier +// specified by the client. Must be unique for operation resources in +// the Operations collection. +func (c *ResponsePoliciesGetCall) ClientOperationId(clientOperationId string) *ResponsePoliciesGetCall { + c.urlParams_.Set("clientOperationId", clientOperationId) + 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 *ResponsePoliciesGetCall) Fields(s ...googleapi.Field) *ResponsePoliciesGetCall { + 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 *ResponsePoliciesGetCall) IfNoneMatch(entityTag string) *ResponsePoliciesGetCall { + 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 *ResponsePoliciesGetCall) Context(ctx context.Context) *ResponsePoliciesGetCall { + 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 *ResponsePoliciesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ResponsePoliciesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "location": c.location, + "responsePolicy": c.responsePolicy, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dns.responsePolicies.get" call. +// Exactly one of *ResponsePolicy or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *ResponsePolicy.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 *ResponsePoliciesGetCall) Do(opts ...googleapi.CallOption) (*ResponsePolicy, 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 := &ResponsePolicy{ + 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": "Fetches the representation of an existing Response Policy.", + // "flatPath": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}", + // "httpMethod": "GET", + // "id": "dns.responsePolicies.get", + // "parameterOrder": [ + // "project", + // "location", + // "responsePolicy" + // ], + // "parameters": { + // "clientOperationId": { + // "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + // "location": "query", + // "type": "string" + // }, + // "location": { + // "default": "global", + // "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Identifies the project addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "responsePolicy": { + // "description": "User assigned name of the Response Policy addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}", + // "response": { + // "$ref": "ResponsePolicy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-platform.read-only", + // "https://www.googleapis.com/auth/ndev.clouddns.readonly", + // "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + // ] + // } + +} + +// method id "dns.responsePolicies.list": + +type ResponsePoliciesListCall struct { + s *Service + project string + location string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Enumerates all Response Policies associated with a project. +// +// - location: Specifies the location of the resource. This information +// will be used for routing and will be part of the resource name. +// - project: Identifies the project addressed by this request. +func (r *ResponsePoliciesService) List(project string, location string) *ResponsePoliciesListCall { + c := &ResponsePoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.location = location + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum number +// of results to be returned. If unspecified, the server decides how +// many results to return. +func (c *ResponsePoliciesListCall) MaxResults(maxResults int64) *ResponsePoliciesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// PageToken sets the optional parameter "pageToken": A tag returned by +// a previous list request that was truncated. Use this parameter to +// continue a previous list request. +func (c *ResponsePoliciesListCall) PageToken(pageToken string) *ResponsePoliciesListCall { + 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 *ResponsePoliciesListCall) Fields(s ...googleapi.Field) *ResponsePoliciesListCall { + 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 *ResponsePoliciesListCall) IfNoneMatch(entityTag string) *ResponsePoliciesListCall { + 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 *ResponsePoliciesListCall) Context(ctx context.Context) *ResponsePoliciesListCall { + 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 *ResponsePoliciesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ResponsePoliciesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/responsePolicies") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "location": c.location, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dns.responsePolicies.list" call. +// Exactly one of *ResponsePoliciesListResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ResponsePoliciesListResponse.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 *ResponsePoliciesListCall) Do(opts ...googleapi.CallOption) (*ResponsePoliciesListResponse, 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 := &ResponsePoliciesListResponse{ + 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": "Enumerates all Response Policies associated with a project.", + // "flatPath": "dns/v2/projects/{project}/locations/{location}/responsePolicies", + // "httpMethod": "GET", + // "id": "dns.responsePolicies.list", + // "parameterOrder": [ + // "project", + // "location" + // ], + // "parameters": { + // "location": { + // "default": "global", + // "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "maxResults": { + // "description": "Optional. Maximum number of results to be returned. If unspecified, the server decides how many results to return.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Identifies the project addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "dns/v2/projects/{project}/locations/{location}/responsePolicies", + // "response": { + // "$ref": "ResponsePoliciesListResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-platform.read-only", + // "https://www.googleapis.com/auth/ndev.clouddns.readonly", + // "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + // ] + // } + +} + +// 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 *ResponsePoliciesListCall) Pages(ctx context.Context, f func(*ResponsePoliciesListResponse) 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 "dns.responsePolicies.patch": + +type ResponsePoliciesPatchCall struct { + s *Service + project string + location string + responsePolicy string + responsepolicy *ResponsePolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Applies a partial update to an existing Response Policy. +// +// - location: Specifies the location of the resource. This information +// will be used for routing and will be part of the resource name. +// - project: Identifies the project addressed by this request. +// - responsePolicy: User assigned name of the Respones Policy addressed +// by this request. +func (r *ResponsePoliciesService) Patch(project string, location string, responsePolicy string, responsepolicy *ResponsePolicy) *ResponsePoliciesPatchCall { + c := &ResponsePoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.location = location + c.responsePolicy = responsePolicy + c.responsepolicy = responsepolicy + return c +} + +// ClientOperationId sets the optional parameter "clientOperationId": +// For mutating operation requests only. An optional identifier +// specified by the client. Must be unique for operation resources in +// the Operations collection. +func (c *ResponsePoliciesPatchCall) ClientOperationId(clientOperationId string) *ResponsePoliciesPatchCall { + c.urlParams_.Set("clientOperationId", clientOperationId) + 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 *ResponsePoliciesPatchCall) Fields(s ...googleapi.Field) *ResponsePoliciesPatchCall { + 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 *ResponsePoliciesPatchCall) Context(ctx context.Context) *ResponsePoliciesPatchCall { + 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 *ResponsePoliciesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ResponsePoliciesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.responsepolicy) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "location": c.location, + "responsePolicy": c.responsePolicy, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dns.responsePolicies.patch" call. +// Exactly one of *ResponsePoliciesPatchResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ResponsePoliciesPatchResponse.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 *ResponsePoliciesPatchCall) Do(opts ...googleapi.CallOption) (*ResponsePoliciesPatchResponse, 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 := &ResponsePoliciesPatchResponse{ + 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": "Applies a partial update to an existing Response Policy.", + // "flatPath": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}", + // "httpMethod": "PATCH", + // "id": "dns.responsePolicies.patch", + // "parameterOrder": [ + // "project", + // "location", + // "responsePolicy" + // ], + // "parameters": { + // "clientOperationId": { + // "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + // "location": "query", + // "type": "string" + // }, + // "location": { + // "default": "global", + // "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Identifies the project addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "responsePolicy": { + // "description": "User assigned name of the Respones Policy addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}", + // "request": { + // "$ref": "ResponsePolicy" + // }, + // "response": { + // "$ref": "ResponsePoliciesPatchResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + // ] + // } + +} + +// method id "dns.responsePolicies.update": + +type ResponsePoliciesUpdateCall struct { + s *Service + project string + location string + responsePolicy string + responsepolicy *ResponsePolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Update: Updates an existing Response Policy. +// +// - location: Specifies the location of the resource. This information +// will be used for routing and will be part of the resource name. +// - project: Identifies the project addressed by this request. +// - responsePolicy: User assigned name of the Response Policy addressed +// by this request. +func (r *ResponsePoliciesService) Update(project string, location string, responsePolicy string, responsepolicy *ResponsePolicy) *ResponsePoliciesUpdateCall { + c := &ResponsePoliciesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.location = location + c.responsePolicy = responsePolicy + c.responsepolicy = responsepolicy + return c +} + +// ClientOperationId sets the optional parameter "clientOperationId": +// For mutating operation requests only. An optional identifier +// specified by the client. Must be unique for operation resources in +// the Operations collection. +func (c *ResponsePoliciesUpdateCall) ClientOperationId(clientOperationId string) *ResponsePoliciesUpdateCall { + c.urlParams_.Set("clientOperationId", clientOperationId) + 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 *ResponsePoliciesUpdateCall) Fields(s ...googleapi.Field) *ResponsePoliciesUpdateCall { + 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 *ResponsePoliciesUpdateCall) Context(ctx context.Context) *ResponsePoliciesUpdateCall { + 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 *ResponsePoliciesUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ResponsePoliciesUpdateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.responsepolicy) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PUT", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "location": c.location, + "responsePolicy": c.responsePolicy, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dns.responsePolicies.update" call. +// Exactly one of *ResponsePoliciesUpdateResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ResponsePoliciesUpdateResponse.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 *ResponsePoliciesUpdateCall) Do(opts ...googleapi.CallOption) (*ResponsePoliciesUpdateResponse, 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 := &ResponsePoliciesUpdateResponse{ + 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 existing Response Policy.", + // "flatPath": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}", + // "httpMethod": "PUT", + // "id": "dns.responsePolicies.update", + // "parameterOrder": [ + // "project", + // "location", + // "responsePolicy" + // ], + // "parameters": { + // "clientOperationId": { + // "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + // "location": "query", + // "type": "string" + // }, + // "location": { + // "default": "global", + // "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Identifies the project addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "responsePolicy": { + // "description": "User assigned name of the Response Policy addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}", + // "request": { + // "$ref": "ResponsePolicy" + // }, + // "response": { + // "$ref": "ResponsePoliciesUpdateResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + // ] + // } + +} + +// method id "dns.responsePolicyRules.create": + +type ResponsePolicyRulesCreateCall struct { + s *Service + project string + location string + responsePolicy string + responsepolicyrule *ResponsePolicyRule + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new Response Policy Rule. +// +// - location: Specifies the location of the resource. This information +// will be used for routing and will be part of the resource name. +// - project: Identifies the project addressed by this request. +// - responsePolicy: User assigned name of the Response Policy +// containing the Response Policy Rule. +func (r *ResponsePolicyRulesService) Create(project string, location string, responsePolicy string, responsepolicyrule *ResponsePolicyRule) *ResponsePolicyRulesCreateCall { + c := &ResponsePolicyRulesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.location = location + c.responsePolicy = responsePolicy + c.responsepolicyrule = responsepolicyrule + return c +} + +// ClientOperationId sets the optional parameter "clientOperationId": +// For mutating operation requests only. An optional identifier +// specified by the client. Must be unique for operation resources in +// the Operations collection. +func (c *ResponsePolicyRulesCreateCall) ClientOperationId(clientOperationId string) *ResponsePolicyRulesCreateCall { + c.urlParams_.Set("clientOperationId", clientOperationId) + 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 *ResponsePolicyRulesCreateCall) Fields(s ...googleapi.Field) *ResponsePolicyRulesCreateCall { + 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 *ResponsePolicyRulesCreateCall) Context(ctx context.Context) *ResponsePolicyRulesCreateCall { + 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 *ResponsePolicyRulesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ResponsePolicyRulesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.responsepolicyrule) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "location": c.location, + "responsePolicy": c.responsePolicy, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dns.responsePolicyRules.create" call. +// Exactly one of *ResponsePolicyRule or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ResponsePolicyRule.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 *ResponsePolicyRulesCreateCall) Do(opts ...googleapi.CallOption) (*ResponsePolicyRule, 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 := &ResponsePolicyRule{ + 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 Response Policy Rule.", + // "flatPath": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules", + // "httpMethod": "POST", + // "id": "dns.responsePolicyRules.create", + // "parameterOrder": [ + // "project", + // "location", + // "responsePolicy" + // ], + // "parameters": { + // "clientOperationId": { + // "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + // "location": "query", + // "type": "string" + // }, + // "location": { + // "default": "global", + // "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Identifies the project addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "responsePolicy": { + // "description": "User assigned name of the Response Policy containing the Response Policy Rule.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules", + // "request": { + // "$ref": "ResponsePolicyRule" + // }, + // "response": { + // "$ref": "ResponsePolicyRule" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + // ] + // } + +} + +// method id "dns.responsePolicyRules.delete": + +type ResponsePolicyRulesDeleteCall struct { + s *Service + project string + location string + responsePolicy string + responsePolicyRule string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a previously created Response Policy Rule. +// +// - location: Specifies the location of the resource. This information +// will be used for routing and will be part of the resource name. +// - project: Identifies the project addressed by this request. +// - responsePolicy: User assigned name of the Response Policy +// containing the Response Policy Rule. +// - responsePolicyRule: User assigned name of the Response Policy Rule +// addressed by this request. +func (r *ResponsePolicyRulesService) Delete(project string, location string, responsePolicy string, responsePolicyRule string) *ResponsePolicyRulesDeleteCall { + c := &ResponsePolicyRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.location = location + c.responsePolicy = responsePolicy + c.responsePolicyRule = responsePolicyRule + return c +} + +// ClientOperationId sets the optional parameter "clientOperationId": +// For mutating operation requests only. An optional identifier +// specified by the client. Must be unique for operation resources in +// the Operations collection. +func (c *ResponsePolicyRulesDeleteCall) ClientOperationId(clientOperationId string) *ResponsePolicyRulesDeleteCall { + c.urlParams_.Set("clientOperationId", clientOperationId) + 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 *ResponsePolicyRulesDeleteCall) Fields(s ...googleapi.Field) *ResponsePolicyRulesDeleteCall { + 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 *ResponsePolicyRulesDeleteCall) Context(ctx context.Context) *ResponsePolicyRulesDeleteCall { + 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 *ResponsePolicyRulesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ResponsePolicyRulesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "location": c.location, + "responsePolicy": c.responsePolicy, + "responsePolicyRule": c.responsePolicyRule, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dns.responsePolicyRules.delete" call. +func (c *ResponsePolicyRulesDeleteCall) Do(opts ...googleapi.CallOption) error { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if err != nil { + return err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return err + } + return nil + // { + // "description": "Deletes a previously created Response Policy Rule.", + // "flatPath": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}", + // "httpMethod": "DELETE", + // "id": "dns.responsePolicyRules.delete", + // "parameterOrder": [ + // "project", + // "location", + // "responsePolicy", + // "responsePolicyRule" + // ], + // "parameters": { + // "clientOperationId": { + // "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + // "location": "query", + // "type": "string" + // }, + // "location": { + // "default": "global", + // "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Identifies the project addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "responsePolicy": { + // "description": "User assigned name of the Response Policy containing the Response Policy Rule.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "responsePolicyRule": { + // "description": "User assigned name of the Response Policy Rule addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}", + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + // ] + // } + +} + +// method id "dns.responsePolicyRules.get": + +type ResponsePolicyRulesGetCall struct { + s *Service + project string + location string + responsePolicy string + responsePolicyRule string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Fetches the representation of an existing Response Policy Rule. +// +// - location: Specifies the location of the resource. This information +// will be used for routing and will be part of the resource name. +// - project: Identifies the project addressed by this request. +// - responsePolicy: User assigned name of the Response Policy +// containing the Response Policy Rule. +// - responsePolicyRule: User assigned name of the Response Policy Rule +// addressed by this request. +func (r *ResponsePolicyRulesService) Get(project string, location string, responsePolicy string, responsePolicyRule string) *ResponsePolicyRulesGetCall { + c := &ResponsePolicyRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.location = location + c.responsePolicy = responsePolicy + c.responsePolicyRule = responsePolicyRule + return c +} + +// ClientOperationId sets the optional parameter "clientOperationId": +// For mutating operation requests only. An optional identifier +// specified by the client. Must be unique for operation resources in +// the Operations collection. +func (c *ResponsePolicyRulesGetCall) ClientOperationId(clientOperationId string) *ResponsePolicyRulesGetCall { + c.urlParams_.Set("clientOperationId", clientOperationId) + 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 *ResponsePolicyRulesGetCall) Fields(s ...googleapi.Field) *ResponsePolicyRulesGetCall { + 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 *ResponsePolicyRulesGetCall) IfNoneMatch(entityTag string) *ResponsePolicyRulesGetCall { + 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 *ResponsePolicyRulesGetCall) Context(ctx context.Context) *ResponsePolicyRulesGetCall { + 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 *ResponsePolicyRulesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ResponsePolicyRulesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "location": c.location, + "responsePolicy": c.responsePolicy, + "responsePolicyRule": c.responsePolicyRule, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dns.responsePolicyRules.get" call. +// Exactly one of *ResponsePolicyRule or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ResponsePolicyRule.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 *ResponsePolicyRulesGetCall) Do(opts ...googleapi.CallOption) (*ResponsePolicyRule, 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 := &ResponsePolicyRule{ + 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": "Fetches the representation of an existing Response Policy Rule.", + // "flatPath": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}", + // "httpMethod": "GET", + // "id": "dns.responsePolicyRules.get", + // "parameterOrder": [ + // "project", + // "location", + // "responsePolicy", + // "responsePolicyRule" + // ], + // "parameters": { + // "clientOperationId": { + // "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + // "location": "query", + // "type": "string" + // }, + // "location": { + // "default": "global", + // "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Identifies the project addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "responsePolicy": { + // "description": "User assigned name of the Response Policy containing the Response Policy Rule.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "responsePolicyRule": { + // "description": "User assigned name of the Response Policy Rule addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}", + // "response": { + // "$ref": "ResponsePolicyRule" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-platform.read-only", + // "https://www.googleapis.com/auth/ndev.clouddns.readonly", + // "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + // ] + // } + +} + +// method id "dns.responsePolicyRules.list": + +type ResponsePolicyRulesListCall struct { + s *Service + project string + location string + responsePolicy string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Enumerates all Response Policy Rules associated with a project. +// +// - location: Specifies the location of the resource. This information +// will be used for routing and will be part of the resource name. +// - project: Identifies the project addressed by this request. +// - responsePolicy: User assigned name of the Response Policy to list. +func (r *ResponsePolicyRulesService) List(project string, location string, responsePolicy string) *ResponsePolicyRulesListCall { + c := &ResponsePolicyRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.location = location + c.responsePolicy = responsePolicy + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum number +// of results to be returned. If unspecified, the server decides how +// many results to return. +func (c *ResponsePolicyRulesListCall) MaxResults(maxResults int64) *ResponsePolicyRulesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// PageToken sets the optional parameter "pageToken": A tag returned by +// a previous list request that was truncated. Use this parameter to +// continue a previous list request. +func (c *ResponsePolicyRulesListCall) PageToken(pageToken string) *ResponsePolicyRulesListCall { + 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 *ResponsePolicyRulesListCall) Fields(s ...googleapi.Field) *ResponsePolicyRulesListCall { + 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 *ResponsePolicyRulesListCall) IfNoneMatch(entityTag string) *ResponsePolicyRulesListCall { + 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 *ResponsePolicyRulesListCall) Context(ctx context.Context) *ResponsePolicyRulesListCall { + 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 *ResponsePolicyRulesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ResponsePolicyRulesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "location": c.location, + "responsePolicy": c.responsePolicy, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dns.responsePolicyRules.list" call. +// Exactly one of *ResponsePolicyRulesListResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ResponsePolicyRulesListResponse.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 *ResponsePolicyRulesListCall) Do(opts ...googleapi.CallOption) (*ResponsePolicyRulesListResponse, 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 := &ResponsePolicyRulesListResponse{ + 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": "Enumerates all Response Policy Rules associated with a project.", + // "flatPath": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules", + // "httpMethod": "GET", + // "id": "dns.responsePolicyRules.list", + // "parameterOrder": [ + // "project", + // "location", + // "responsePolicy" + // ], + // "parameters": { + // "location": { + // "default": "global", + // "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "maxResults": { + // "description": "Optional. Maximum number of results to be returned. If unspecified, the server decides how many results to return.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Identifies the project addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "responsePolicy": { + // "description": "User assigned name of the Response Policy to list.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules", + // "response": { + // "$ref": "ResponsePolicyRulesListResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-platform.read-only", + // "https://www.googleapis.com/auth/ndev.clouddns.readonly", + // "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + // ] + // } + +} + +// 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 *ResponsePolicyRulesListCall) Pages(ctx context.Context, f func(*ResponsePolicyRulesListResponse) 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 "dns.responsePolicyRules.patch": + +type ResponsePolicyRulesPatchCall struct { + s *Service + project string + location string + responsePolicy string + responsePolicyRule string + responsepolicyrule *ResponsePolicyRule + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Applies a partial update to an existing Response Policy Rule. +// +// - location: Specifies the location of the resource. This information +// will be used for routing and will be part of the resource name. +// - project: Identifies the project addressed by this request. +// - responsePolicy: User assigned name of the Response Policy +// containing the Response Policy Rule. +// - responsePolicyRule: User assigned name of the Response Policy Rule +// addressed by this request. +func (r *ResponsePolicyRulesService) Patch(project string, location string, responsePolicy string, responsePolicyRule string, responsepolicyrule *ResponsePolicyRule) *ResponsePolicyRulesPatchCall { + c := &ResponsePolicyRulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.location = location + c.responsePolicy = responsePolicy + c.responsePolicyRule = responsePolicyRule + c.responsepolicyrule = responsepolicyrule + return c +} + +// ClientOperationId sets the optional parameter "clientOperationId": +// For mutating operation requests only. An optional identifier +// specified by the client. Must be unique for operation resources in +// the Operations collection. +func (c *ResponsePolicyRulesPatchCall) ClientOperationId(clientOperationId string) *ResponsePolicyRulesPatchCall { + c.urlParams_.Set("clientOperationId", clientOperationId) + 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 *ResponsePolicyRulesPatchCall) Fields(s ...googleapi.Field) *ResponsePolicyRulesPatchCall { + 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 *ResponsePolicyRulesPatchCall) Context(ctx context.Context) *ResponsePolicyRulesPatchCall { + 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 *ResponsePolicyRulesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ResponsePolicyRulesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.responsepolicyrule) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "location": c.location, + "responsePolicy": c.responsePolicy, + "responsePolicyRule": c.responsePolicyRule, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dns.responsePolicyRules.patch" call. +// Exactly one of *ResponsePolicyRulesPatchResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ResponsePolicyRulesPatchResponse.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 *ResponsePolicyRulesPatchCall) Do(opts ...googleapi.CallOption) (*ResponsePolicyRulesPatchResponse, 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 := &ResponsePolicyRulesPatchResponse{ + 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": "Applies a partial update to an existing Response Policy Rule.", + // "flatPath": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}", + // "httpMethod": "PATCH", + // "id": "dns.responsePolicyRules.patch", + // "parameterOrder": [ + // "project", + // "location", + // "responsePolicy", + // "responsePolicyRule" + // ], + // "parameters": { + // "clientOperationId": { + // "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + // "location": "query", + // "type": "string" + // }, + // "location": { + // "default": "global", + // "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Identifies the project addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "responsePolicy": { + // "description": "User assigned name of the Response Policy containing the Response Policy Rule.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "responsePolicyRule": { + // "description": "User assigned name of the Response Policy Rule addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}", + // "request": { + // "$ref": "ResponsePolicyRule" + // }, + // "response": { + // "$ref": "ResponsePolicyRulesPatchResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + // ] + // } + +} + +// method id "dns.responsePolicyRules.update": + +type ResponsePolicyRulesUpdateCall struct { + s *Service + project string + location string + responsePolicy string + responsePolicyRule string + responsepolicyrule *ResponsePolicyRule + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Update: Updates an existing Response Policy Rule. +// +// - location: Specifies the location of the resource. This information +// will be used for routing and will be part of the resource name. +// - project: Identifies the project addressed by this request. +// - responsePolicy: User assigned name of the Response Policy +// containing the Response Policy Rule. +// - responsePolicyRule: User assigned name of the Response Policy Rule +// addressed by this request. +func (r *ResponsePolicyRulesService) Update(project string, location string, responsePolicy string, responsePolicyRule string, responsepolicyrule *ResponsePolicyRule) *ResponsePolicyRulesUpdateCall { + c := &ResponsePolicyRulesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.location = location + c.responsePolicy = responsePolicy + c.responsePolicyRule = responsePolicyRule + c.responsepolicyrule = responsepolicyrule + return c +} + +// ClientOperationId sets the optional parameter "clientOperationId": +// For mutating operation requests only. An optional identifier +// specified by the client. Must be unique for operation resources in +// the Operations collection. +func (c *ResponsePolicyRulesUpdateCall) ClientOperationId(clientOperationId string) *ResponsePolicyRulesUpdateCall { + c.urlParams_.Set("clientOperationId", clientOperationId) + 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 *ResponsePolicyRulesUpdateCall) Fields(s ...googleapi.Field) *ResponsePolicyRulesUpdateCall { + 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 *ResponsePolicyRulesUpdateCall) Context(ctx context.Context) *ResponsePolicyRulesUpdateCall { + 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 *ResponsePolicyRulesUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ResponsePolicyRulesUpdateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.responsepolicyrule) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PUT", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "location": c.location, + "responsePolicy": c.responsePolicy, + "responsePolicyRule": c.responsePolicyRule, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dns.responsePolicyRules.update" call. +// Exactly one of *ResponsePolicyRulesUpdateResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ResponsePolicyRulesUpdateResponse.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 *ResponsePolicyRulesUpdateCall) Do(opts ...googleapi.CallOption) (*ResponsePolicyRulesUpdateResponse, 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 := &ResponsePolicyRulesUpdateResponse{ + 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 existing Response Policy Rule.", + // "flatPath": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}", + // "httpMethod": "PUT", + // "id": "dns.responsePolicyRules.update", + // "parameterOrder": [ + // "project", + // "location", + // "responsePolicy", + // "responsePolicyRule" + // ], + // "parameters": { + // "clientOperationId": { + // "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", + // "location": "query", + // "type": "string" + // }, + // "location": { + // "default": "global", + // "description": "Specifies the location of the resource. This information will be used for routing and will be part of the resource name.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Identifies the project addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "responsePolicy": { + // "description": "User assigned name of the Response Policy containing the Response Policy Rule.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "responsePolicyRule": { + // "description": "User assigned name of the Response Policy Rule addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "dns/v2/projects/{project}/locations/{location}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}", + // "request": { + // "$ref": "ResponsePolicyRule" + // }, + // "response": { + // "$ref": "ResponsePolicyRulesUpdateResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + // ] + // } + +} diff --git a/file/v1/file-api.json b/file/v1/file-api.json index 2814d6844ff..884d5f879ec 100644 --- a/file/v1/file-api.json +++ b/file/v1/file-api.json @@ -846,7 +846,7 @@ } } }, - "revision": "20211105", + "revision": "20220214", "rootUrl": "https://file.googleapis.com/", "schemas": { "Backup": { @@ -974,7 +974,7 @@ "type": "object" }, "Date": { - "description": "Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values * A month and day value, with a zero year, such as an anniversary * A year on its own, with zero month and day values * A year and month value, with a zero day, such as a credit card expiration date Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`.", + "description": "Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values * A month and day, with a zero year (e.g., an anniversary) * A year on its own, with a zero month and a zero day * A year and month, with a zero day (e.g., a credit card expiration date) Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp", "id": "Date", "properties": { "day": { @@ -1060,6 +1060,10 @@ "readOnly": true, "type": "string" }, + "instanceType": { + "description": "Optional. The instance_type of this instance of format: projects/{project_id}/locations/{location_id}/instanceTypes/{instance_type_id}. Instance Type represents a high-level tier or SKU of the service that this instance belong to. When enabled(eg: Maintenance Rollout), Rollout uses 'instance_type' along with 'software_versions' to determine whether instance needs an update or not.", + "type": "string" + }, "labels": { "additionalProperties": { "type": "string" @@ -1089,6 +1093,13 @@ "description": "Unique name of the resource. It uses the form: `projects/{project_id|project_number}/locations/{location_id}/instances/{instance_id}` Note: Either project_id or project_number can be used, but keep it consistent with other APIs (e.g. RescheduleUpdate)", "type": "string" }, + "notificationParameters": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. notification_parameters are information that service producers may like to include that is not relevant to Rollout. This parameter will only be passed to Gamma and Cloud Logging for notification/logging purpose.", + "type": "object" + }, "producerMetadata": { "additionalProperties": { "type": "string" diff --git a/file/v1/file-gen.go b/file/v1/file-gen.go index 2e53c7f673e..cf272e62388 100644 --- a/file/v1/file-gen.go +++ b/file/v1/file-gen.go @@ -349,11 +349,11 @@ func (s *DailyCycle) MarshalJSON() ([]byte, error) { // birthday. The time of day and time zone are either specified // elsewhere or are insignificant. The date is relative to the Gregorian // Calendar. This can represent one of the following: * A full date, -// with non-zero year, month, and day values * A month and day value, -// with a zero year, such as an anniversary * A year on its own, with -// zero month and day values * A year and month value, with a zero day, -// such as a credit card expiration date Related types are -// google.type.TimeOfDay and `google.protobuf.Timestamp`. +// with non-zero year, month, and day values * A month and day, with a +// zero year (e.g., an anniversary) * A year on its own, with a zero +// month and a zero day * A year and month, with a zero day (e.g., a +// credit card expiration date) Related types: * google.type.TimeOfDay * +// google.type.DateTime * google.protobuf.Timestamp type Date struct { // Day: Day of a month. Must be from 1 to 31 and valid for the year and // month, or 0 to specify a year by itself or a year and month where the @@ -499,6 +499,14 @@ type GoogleCloudSaasacceleratorManagementProvidersV1Instance struct { // CreateTime: Output only. Timestamp when the resource was created. CreateTime string `json:"createTime,omitempty"` + // InstanceType: Optional. The instance_type of this instance of format: + // projects/{project_id}/locations/{location_id}/instanceTypes/{instance_ + // type_id}. Instance Type represents a high-level tier or SKU of the + // service that this instance belong to. When enabled(eg: Maintenance + // Rollout), Rollout uses 'instance_type' along with 'software_versions' + // to determine whether instance needs an update or not. + InstanceType string `json:"instanceType,omitempty"` + // Labels: Optional. Resource labels to represent user provided // metadata. Each label is a key-value pair, where both the key and the // value are arbitrary strings provided by the user. @@ -526,6 +534,12 @@ type GoogleCloudSaasacceleratorManagementProvidersV1Instance struct { // used, but keep it consistent with other APIs (e.g. RescheduleUpdate) Name string `json:"name,omitempty"` + // NotificationParameters: Optional. notification_parameters are + // information that service producers may like to include that is not + // relevant to Rollout. This parameter will only be passed to Gamma and + // Cloud Logging for notification/logging purpose. + NotificationParameters map[string]string `json:"notificationParameters,omitempty"` + // ProducerMetadata: Output only. Custom string attributes used // primarily to expose producer-specific information in monitoring // dashboards. See go/get-instance-metadata. diff --git a/file/v1beta1/file-api.json b/file/v1beta1/file-api.json index 9abbe5e15c0..0428222bfd6 100644 --- a/file/v1beta1/file-api.json +++ b/file/v1beta1/file-api.json @@ -874,7 +874,7 @@ } } }, - "revision": "20211017", + "revision": "20220214", "rootUrl": "https://file.googleapis.com/", "schemas": { "Backup": { @@ -1002,7 +1002,7 @@ "type": "object" }, "Date": { - "description": "Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values * A month and day value, with a zero year, such as an anniversary * A year on its own, with zero month and day values * A year and month value, with a zero day, such as a credit card expiration date Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`.", + "description": "Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values * A month and day, with a zero year (e.g., an anniversary) * A year on its own, with a zero month and a zero day * A year and month, with a zero day (e.g., a credit card expiration date) Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp", "id": "Date", "properties": { "day": { @@ -1088,6 +1088,10 @@ "readOnly": true, "type": "string" }, + "instanceType": { + "description": "Optional. The instance_type of this instance of format: projects/{project_id}/locations/{location_id}/instanceTypes/{instance_type_id}. Instance Type represents a high-level tier or SKU of the service that this instance belong to. When enabled(eg: Maintenance Rollout), Rollout uses 'instance_type' along with 'software_versions' to determine whether instance needs an update or not.", + "type": "string" + }, "labels": { "additionalProperties": { "type": "string" @@ -1117,6 +1121,13 @@ "description": "Unique name of the resource. It uses the form: `projects/{project_id|project_number}/locations/{location_id}/instances/{instance_id}` Note: Either project_id or project_number can be used, but keep it consistent with other APIs (e.g. RescheduleUpdate)", "type": "string" }, + "notificationParameters": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. notification_parameters are information that service producers may like to include that is not relevant to Rollout. This parameter will only be passed to Gamma and Cloud Logging for notification/logging purpose.", + "type": "object" + }, "producerMetadata": { "additionalProperties": { "type": "string" @@ -1359,6 +1370,12 @@ "description": "Resource labels to represent user provided metadata.", "type": "object" }, + "maxShareCount": { + "description": "Output only. The max number of shares allowed.", + "format": "int64", + "readOnly": true, + "type": "string" + }, "name": { "description": "Output only. The resource name of the instance, in the format `projects/{project_id}/locations/{location_id}/instances/{instance_id}`.", "readOnly": true, diff --git a/file/v1beta1/file-gen.go b/file/v1beta1/file-gen.go index 6e5991c3dbd..2afbd965820 100644 --- a/file/v1beta1/file-gen.go +++ b/file/v1beta1/file-gen.go @@ -349,11 +349,11 @@ func (s *DailyCycle) MarshalJSON() ([]byte, error) { // birthday. The time of day and time zone are either specified // elsewhere or are insignificant. The date is relative to the Gregorian // Calendar. This can represent one of the following: * A full date, -// with non-zero year, month, and day values * A month and day value, -// with a zero year, such as an anniversary * A year on its own, with -// zero month and day values * A year and month value, with a zero day, -// such as a credit card expiration date Related types are -// google.type.TimeOfDay and `google.protobuf.Timestamp`. +// with non-zero year, month, and day values * A month and day, with a +// zero year (e.g., an anniversary) * A year on its own, with a zero +// month and a zero day * A year and month, with a zero day (e.g., a +// credit card expiration date) Related types: * google.type.TimeOfDay * +// google.type.DateTime * google.protobuf.Timestamp type Date struct { // Day: Day of a month. Must be from 1 to 31 and valid for the year and // month, or 0 to specify a year by itself or a year and month where the @@ -501,6 +501,14 @@ type GoogleCloudSaasacceleratorManagementProvidersV1Instance struct { // CreateTime: Output only. Timestamp when the resource was created. CreateTime string `json:"createTime,omitempty"` + // InstanceType: Optional. The instance_type of this instance of format: + // projects/{project_id}/locations/{location_id}/instanceTypes/{instance_ + // type_id}. Instance Type represents a high-level tier or SKU of the + // service that this instance belong to. When enabled(eg: Maintenance + // Rollout), Rollout uses 'instance_type' along with 'software_versions' + // to determine whether instance needs an update or not. + InstanceType string `json:"instanceType,omitempty"` + // Labels: Optional. Resource labels to represent user provided // metadata. Each label is a key-value pair, where both the key and the // value are arbitrary strings provided by the user. @@ -528,6 +536,12 @@ type GoogleCloudSaasacceleratorManagementProvidersV1Instance struct { // used, but keep it consistent with other APIs (e.g. RescheduleUpdate) Name string `json:"name,omitempty"` + // NotificationParameters: Optional. notification_parameters are + // information that service producers may like to include that is not + // relevant to Rollout. This parameter will only be passed to Gamma and + // Cloud Logging for notification/logging purpose. + NotificationParameters map[string]string `json:"notificationParameters,omitempty"` + // ProducerMetadata: Output only. Custom string attributes used // primarily to expose producer-specific information in monitoring // dashboards. See go/get-instance-metadata. @@ -923,6 +937,9 @@ type Instance struct { // Labels: Resource labels to represent user provided metadata. Labels map[string]string `json:"labels,omitempty"` + // MaxShareCount: Output only. The max number of shares allowed. + MaxShareCount int64 `json:"maxShareCount,omitempty,string"` + // Name: Output only. The resource name of the instance, in the format // `projects/{project_id}/locations/{location_id}/instances/{instance_id} // `. diff --git a/firebase/v1beta1/firebase-api.json b/firebase/v1beta1/firebase-api.json index 97a4f9471bb..a79d78c5efd 100644 --- a/firebase/v1beta1/firebase-api.json +++ b/firebase/v1beta1/firebase-api.json @@ -1121,7 +1121,7 @@ } } }, - "revision": "20211013", + "revision": "20220224", "rootUrl": "https://firebase.googleapis.com/", "schemas": { "AddFirebaseRequest": { @@ -1212,6 +1212,10 @@ "description": "Details of a Firebase App for Android.", "id": "AndroidApp", "properties": { + "apiKeyId": { + "description": "The key_id of the GCP ApiKey associated with this App. If set must have no restrictions, or only have restrictions that are valid for the associated Firebase App. Cannot be set in create requests, instead an existing valid API Key will be chosen, or if no valid API Keys exist, one will be provisioned for you. Cannot be set to an empty value in update requests.", + "type": "string" + }, "appId": { "description": "Immutable. The globally unique, Firebase-assigned identifier for the `AndroidApp`. This identifier should be treated as an opaque token, as the data format is not specified.", "type": "string" @@ -1378,6 +1382,10 @@ "description": "Details of a Firebase App for iOS.", "id": "IosApp", "properties": { + "apiKeyId": { + "description": "The key_id of the GCP ApiKey associated with this App. If set must have no restrictions, or only have restrictions that are valid for the associated Firebase App. Cannot be set in create requests, instead an existing valid API Key will be chosen, or if no valid API Keys exist, one will be provisioned for you. Cannot be set to an empty value in update requests.", + "type": "string" + }, "appId": { "description": "Immutable. The globally unique, Firebase-assigned identifier for the `IosApp`. This identifier should be treated as an opaque token, as the data format is not specified.", "type": "string" @@ -1780,6 +1788,10 @@ "description": "Details of a Firebase App for the web.", "id": "WebApp", "properties": { + "apiKeyId": { + "description": "The key_id of the GCP ApiKey associated with this App. If set must have no restrictions, or only have restrictions that are valid for the associated Firebase App. Cannot be set in create requests, instead an existing valid API Key will be chosen, or if no valid API Keys exist, one will be provisioned for you. Cannot be set to an empty value in update requests.", + "type": "string" + }, "appId": { "description": "Immutable. The globally unique, Firebase-assigned identifier for the `WebApp`. This identifier should be treated as an opaque token, as the data format is not specified.", "type": "string" diff --git a/firebase/v1beta1/firebase-gen.go b/firebase/v1beta1/firebase-gen.go index 1dd298b1c40..206b5839d6b 100644 --- a/firebase/v1beta1/firebase-gen.go +++ b/firebase/v1beta1/firebase-gen.go @@ -467,6 +467,14 @@ func (s *AnalyticsProperty) MarshalJSON() ([]byte, error) { // AndroidApp: Details of a Firebase App for Android. type AndroidApp struct { + // ApiKeyId: The key_id of the GCP ApiKey associated with this App. If + // set must have no restrictions, or only have restrictions that are + // valid for the associated Firebase App. Cannot be set in create + // requests, instead an existing valid API Key will be chosen, or if no + // valid API Keys exist, one will be provisioned for you. Cannot be set + // to an empty value in update requests. + ApiKeyId string `json:"apiKeyId,omitempty"` + // AppId: Immutable. The globally unique, Firebase-assigned identifier // for the `AndroidApp`. This identifier should be treated as an opaque // token, as the data format is not specified. @@ -500,7 +508,7 @@ type AndroidApp struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AppId") to + // ForceSendFields is a list of field names (e.g. "ApiKeyId") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -508,8 +516,8 @@ type AndroidApp struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AppId") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "ApiKeyId") 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. @@ -805,6 +813,14 @@ func (s *FirebaseProject) MarshalJSON() ([]byte, error) { // IosApp: Details of a Firebase App for iOS. type IosApp struct { + // ApiKeyId: The key_id of the GCP ApiKey associated with this App. If + // set must have no restrictions, or only have restrictions that are + // valid for the associated Firebase App. Cannot be set in create + // requests, instead an existing valid API Key will be chosen, or if no + // valid API Keys exist, one will be provisioned for you. Cannot be set + // to an empty value in update requests. + ApiKeyId string `json:"apiKeyId,omitempty"` + // AppId: Immutable. The globally unique, Firebase-assigned identifier // for the `IosApp`. This identifier should be treated as an opaque // token, as the data format is not specified. @@ -846,7 +862,7 @@ type IosApp struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AppId") to + // ForceSendFields is a list of field names (e.g. "ApiKeyId") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -854,8 +870,8 @@ type IosApp struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AppId") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "ApiKeyId") 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. @@ -1622,6 +1638,14 @@ func (s *StreamMapping) MarshalJSON() ([]byte, error) { // WebApp: Details of a Firebase App for the web. type WebApp struct { + // ApiKeyId: The key_id of the GCP ApiKey associated with this App. If + // set must have no restrictions, or only have restrictions that are + // valid for the associated Firebase App. Cannot be set in create + // requests, instead an existing valid API Key will be chosen, or if no + // valid API Keys exist, one will be provisioned for you. Cannot be set + // to an empty value in update requests. + ApiKeyId string `json:"apiKeyId,omitempty"` + // AppId: Immutable. The globally unique, Firebase-assigned identifier // for the `WebApp`. This identifier should be treated as an opaque // token, as the data format is not specified. @@ -1661,7 +1685,7 @@ type WebApp struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AppId") to + // ForceSendFields is a list of field names (e.g. "ApiKeyId") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1669,8 +1693,8 @@ type WebApp struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AppId") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "ApiKeyId") 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. diff --git a/firestore/v1/firestore-api.json b/firestore/v1/firestore-api.json index 0a65db083c8..d692dbee38e 100644 --- a/firestore/v1/firestore-api.json +++ b/firestore/v1/firestore-api.json @@ -1247,7 +1247,7 @@ } } }, - "revision": "20220110", + "revision": "20220221", "rootUrl": "https://firestore.googleapis.com/", "schemas": { "ArrayValue": { @@ -2742,7 +2742,7 @@ "description": "A structured query." }, "transaction": { - "description": "Reads documents in a transaction.", + "description": "Run the query within an already active transaction. The value here is the opaque transaction ID to execute the query in.", "format": "byte", "type": "string" } @@ -2755,7 +2755,7 @@ "properties": { "document": { "$ref": "Document", - "description": "A query result. Not set when reporting partial progress." + "description": "A query result, not set when reporting partial progress." }, "readTime": { "description": "The time at which the document was read. This may be monotonically increasing; in this case, the previous documents in the result stream are guaranteed not to have changed between their `read_time` and this one. If the query returns no results, a response with `read_time` and no `document` will be sent, and this represents the time at which the query was run.", diff --git a/firestore/v1/firestore-gen.go b/firestore/v1/firestore-gen.go index 88fb5e5a562..712e499e8c7 100644 --- a/firestore/v1/firestore-gen.go +++ b/firestore/v1/firestore-gen.go @@ -2908,7 +2908,8 @@ type RunQueryRequest struct { // StructuredQuery: A structured query. StructuredQuery *StructuredQuery `json:"structuredQuery,omitempty"` - // Transaction: Reads documents in a transaction. + // Transaction: Run the query within an already active transaction. The + // value here is the opaque transaction ID to execute the query in. Transaction string `json:"transaction,omitempty"` // ForceSendFields is a list of field names (e.g. "NewTransaction") to @@ -2937,7 +2938,7 @@ func (s *RunQueryRequest) MarshalJSON() ([]byte, error) { // RunQueryResponse: The response for Firestore.RunQuery. type RunQueryResponse struct { - // Document: A query result. Not set when reporting partial progress. + // Document: A query result, not set when reporting partial progress. Document *Document `json:"document,omitempty"` // ReadTime: The time at which the document was read. This may be diff --git a/firestore/v1beta1/firestore-api.json b/firestore/v1beta1/firestore-api.json index ac8fe3d98d9..4c7928165cc 100644 --- a/firestore/v1beta1/firestore-api.json +++ b/firestore/v1beta1/firestore-api.json @@ -849,7 +849,7 @@ } } }, - "revision": "20220110", + "revision": "20220221", "rootUrl": "https://firestore.googleapis.com/", "schemas": { "ArrayValue": { @@ -2029,7 +2029,7 @@ "description": "A structured query." }, "transaction": { - "description": "Reads documents in a transaction.", + "description": "Run the query within an already active transaction. The value here is the opaque transaction ID to execute the query in.", "format": "byte", "type": "string" } @@ -2042,7 +2042,7 @@ "properties": { "document": { "$ref": "Document", - "description": "A query result. Not set when reporting partial progress." + "description": "A query result, not set when reporting partial progress." }, "readTime": { "description": "The time at which the document was read. This may be monotonically increasing; in this case, the previous documents in the result stream are guaranteed not to have changed between their `read_time` and this one. If the query returns no results, a response with `read_time` and no `document` will be sent, and this represents the time at which the query was run.", diff --git a/firestore/v1beta1/firestore-gen.go b/firestore/v1beta1/firestore-gen.go index 65f0880eddf..bbd19ccf6f1 100644 --- a/firestore/v1beta1/firestore-gen.go +++ b/firestore/v1beta1/firestore-gen.go @@ -2330,7 +2330,8 @@ type RunQueryRequest struct { // StructuredQuery: A structured query. StructuredQuery *StructuredQuery `json:"structuredQuery,omitempty"` - // Transaction: Reads documents in a transaction. + // Transaction: Run the query within an already active transaction. The + // value here is the opaque transaction ID to execute the query in. Transaction string `json:"transaction,omitempty"` // ForceSendFields is a list of field names (e.g. "NewTransaction") to @@ -2359,7 +2360,7 @@ func (s *RunQueryRequest) MarshalJSON() ([]byte, error) { // RunQueryResponse: The response for Firestore.RunQuery. type RunQueryResponse struct { - // Document: A query result. Not set when reporting partial progress. + // Document: A query result, not set when reporting partial progress. Document *Document `json:"document,omitempty"` // ReadTime: The time at which the document was read. This may be diff --git a/managedidentities/v1/managedidentities-api.json b/managedidentities/v1/managedidentities-api.json index 9541d950374..b018f825742 100644 --- a/managedidentities/v1/managedidentities-api.json +++ b/managedidentities/v1/managedidentities-api.json @@ -512,6 +512,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "restore": { + "description": "RestoreDomain restores domain backup mentioned in the RestoreDomainRequest", + "flatPath": "v1/projects/{projectsId}/locations/global/domains/{domainsId}:restore", + "httpMethod": "POST", + "id": "managedidentities.projects.locations.global.domains.restore", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name for the domain to which the backup belongs", + "location": "path", + "pattern": "^projects/[^/]+/locations/global/domains/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:restore", + "request": { + "$ref": "RestoreDomainRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "setIamPolicy": { "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", "flatPath": "v1/projects/{projectsId}/locations/global/domains/{domainsId}:setIamPolicy", @@ -632,6 +660,260 @@ } }, "resources": { + "backups": { + "methods": { + "create": { + "description": "Creates a Backup for a domain.", + "flatPath": "v1/projects/{projectsId}/locations/global/domains/{domainsId}/backups", + "httpMethod": "POST", + "id": "managedidentities.projects.locations.global.domains.backups.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "backupId": { + "description": "Required. Backup Id, unique name to identify the backups with the following restrictions: * Must be lowercase letters, numbers, and hyphens * Must start with a letter. * Must contain between 1-63 characters. * Must end with a number or a letter. * Must be unique within the domain.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The domain resource name using the form: `projects/{project_id}/locations/global/domains/{domain_name}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/global/domains/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/backups", + "request": { + "$ref": "Backup" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes identified Backup.", + "flatPath": "v1/projects/{projectsId}/locations/global/domains/{domainsId}/backups/{backupsId}", + "httpMethod": "DELETE", + "id": "managedidentities.projects.locations.global.domains.backups.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The backup resource name using the form: `projects/{project_id}/locations/global/domains/{domain_name}/backups/{backup_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/global/domains/[^/]+/backups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single Backup.", + "flatPath": "v1/projects/{projectsId}/locations/global/domains/{domainsId}/backups/{backupsId}", + "httpMethod": "GET", + "id": "managedidentities.projects.locations.global.domains.backups.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The backup resource name using the form: `projects/{project_id}/locations/global/domains/{domain_name}/backups/{backup_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/global/domains/[^/]+/backups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Backup" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/global/domains/{domainsId}/backups/{backupsId}:getIamPolicy", + "httpMethod": "GET", + "id": "managedidentities.projects.locations.global.domains.backups.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/global/domains/[^/]+/backups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Backup in a given project.", + "flatPath": "v1/projects/{projectsId}/locations/global/domains/{domainsId}/backups", + "httpMethod": "GET", + "id": "managedidentities.projects.locations.global.domains.backups.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filter specifying constraints of a list operation.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Specifies the ordering of results following syntax at https://cloud.google.com/apis/design/design_patterns#sorting_order.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of items to return. If not specified, a default value of 1000 will be used by the service. Regardless of the page_size value, the response may include a partial list and a caller should only rely on response's next_page_token to determine if there are more instances left to be queried.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The `next_page_token` value returned from a previous List request, if any.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The domain resource name using the form: `projects/{project_id}/locations/global/domains/{domain_name}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/global/domains/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/backups", + "response": { + "$ref": "ListBackupsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the labels for specified Backup.", + "flatPath": "v1/projects/{projectsId}/locations/global/domains/{domainsId}/backups/{backupsId}", + "httpMethod": "PATCH", + "id": "managedidentities.projects.locations.global.domains.backups.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. The unique name of the Backup in the form of `projects/{project_id}/locations/global/domains/{domain_name}/backups/{name}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/global/domains/[^/]+/backups/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Mask of fields to update. At least one path must be supplied in this field. The elements of the repeated paths field may only include these fields from Backup: * `labels`", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "Backup" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1/projects/{projectsId}/locations/global/domains/{domainsId}/backups/{backupsId}:setIamPolicy", + "httpMethod": "POST", + "id": "managedidentities.projects.locations.global.domains.backups.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/global/domains/[^/]+/backups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1/projects/{projectsId}/locations/global/domains/{domainsId}/backups/{backupsId}:testIamPermissions", + "httpMethod": "POST", + "id": "managedidentities.projects.locations.global.domains.backups.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/global/domains/[^/]+/backups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "sqlIntegrations": { "methods": { "get": { @@ -1093,7 +1375,7 @@ } } }, - "revision": "20211108", + "revision": "20220216", "rootUrl": "https://managedidentities.googleapis.com/", "schemas": { "AttachTrustRequest": { @@ -1107,6 +1389,76 @@ }, "type": "object" }, + "Backup": { + "description": "Represents a Managed Microsoft Identities backup.", + "id": "Backup", + "properties": { + "createTime": { + "description": "Output only. The time the backups was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Resource labels to represent user provided metadata.", + "type": "object" + }, + "name": { + "description": "Output only. The unique name of the Backup in the form of `projects/{project_id}/locations/global/domains/{domain_name}/backups/{name}`", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. The current state of the backup.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "ACTIVE", + "FAILED", + "DELETING" + ], + "enumDescriptions": [ + "Not set.", + "Backup is being created.", + "Backup has been created and validated.", + "Backup has been created but failed validation.", + "Backup is being deleted." + ], + "readOnly": true, + "type": "string" + }, + "statusMessage": { + "description": "Output only. Additional information about the current status of this backup, if available.", + "readOnly": true, + "type": "string" + }, + "type": { + "description": "Output only. Indicates whether it’s an on-demand backup or scheduled.", + "enum": [ + "TYPE_UNSPECIFIED", + "ON_DEMAND", + "SCHEDULED" + ], + "enumDescriptions": [ + "Backup was manually created.", + "Backup was manually created.", + "Backup was automatically created." + ], + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Last update time.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "Binding": { "description": "Associates `members`, or principals, with a `role`.", "id": "Binding", @@ -1183,7 +1535,7 @@ "type": "object" }, "Date": { - "description": "Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values * A month and day value, with a zero year, such as an anniversary * A year on its own, with zero month and day values * A year and month value, with a zero day, such as a credit card expiration date Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`.", + "description": "Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values * A month and day, with a zero year (e.g., an anniversary) * A year on its own, with a zero month and a zero day * A year and month, with a zero day (e.g., a credit card expiration date) Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp", "id": "Date", "properties": { "day": { @@ -1492,6 +1844,10 @@ "readOnly": true, "type": "string" }, + "instanceType": { + "description": "Optional. The instance_type of this instance of format: projects/{project_id}/locations/{location_id}/instanceTypes/{instance_type_id}. Instance Type represents a high-level tier or SKU of the service that this instance belong to. When enabled(eg: Maintenance Rollout), Rollout uses 'instance_type' along with 'software_versions' to determine whether instance needs an update or not.", + "type": "string" + }, "labels": { "additionalProperties": { "type": "string" @@ -1521,6 +1877,13 @@ "description": "Unique name of the resource. It uses the form: `projects/{project_id|project_number}/locations/{location_id}/instances/{instance_id}` Note: Either project_id or project_number can be used, but keep it consistent with other APIs (e.g. RescheduleUpdate)", "type": "string" }, + "notificationParameters": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. notification_parameters are information that service producers may like to include that is not relevant to Rollout. This parameter will only be passed to Gamma and Cloud Logging for notification/logging purpose.", + "type": "object" + }, "producerMetadata": { "additionalProperties": { "type": "string" @@ -1775,6 +2138,31 @@ }, "type": "object" }, + "ListBackupsResponse": { + "description": "ListBackupsResponse is the response message for ListBackups method.", + "id": "ListBackupsResponse", + "properties": { + "backups": { + "description": "A list of Cloud AD backups in the domain.", + "items": { + "$ref": "Backup" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "ListDomainsResponse": { "description": "Response message for ListDomains", "id": "ListDomainsResponse", @@ -2186,6 +2574,17 @@ }, "type": "object" }, + "RestoreDomainRequest": { + "description": "RestoreDomainRequest is the request received by RestoreDomain rpc", + "id": "RestoreDomainRequest", + "properties": { + "backupId": { + "description": "Required. ID of the backup to be restored", + "type": "string" + } + }, + "type": "object" + }, "Schedule": { "description": "Configure the schedule.", "id": "Schedule", diff --git a/managedidentities/v1/managedidentities-gen.go b/managedidentities/v1/managedidentities-gen.go index 6f00c8f0281..d1984303b32 100644 --- a/managedidentities/v1/managedidentities-gen.go +++ b/managedidentities/v1/managedidentities-gen.go @@ -181,6 +181,7 @@ type ProjectsLocationsGlobalService struct { func NewProjectsLocationsGlobalDomainsService(s *Service) *ProjectsLocationsGlobalDomainsService { rs := &ProjectsLocationsGlobalDomainsService{s: s} + rs.Backups = NewProjectsLocationsGlobalDomainsBackupsService(s) rs.SqlIntegrations = NewProjectsLocationsGlobalDomainsSqlIntegrationsService(s) return rs } @@ -188,9 +189,20 @@ func NewProjectsLocationsGlobalDomainsService(s *Service) *ProjectsLocationsGlob type ProjectsLocationsGlobalDomainsService struct { s *Service + Backups *ProjectsLocationsGlobalDomainsBackupsService + SqlIntegrations *ProjectsLocationsGlobalDomainsSqlIntegrationsService } +func NewProjectsLocationsGlobalDomainsBackupsService(s *Service) *ProjectsLocationsGlobalDomainsBackupsService { + rs := &ProjectsLocationsGlobalDomainsBackupsService{s: s} + return rs +} + +type ProjectsLocationsGlobalDomainsBackupsService struct { + s *Service +} + func NewProjectsLocationsGlobalDomainsSqlIntegrationsService(s *Service) *ProjectsLocationsGlobalDomainsSqlIntegrationsService { rs := &ProjectsLocationsGlobalDomainsSqlIntegrationsService{s: s} return rs @@ -246,6 +258,73 @@ func (s *AttachTrustRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Backup: Represents a Managed Microsoft Identities backup. +type Backup struct { + // CreateTime: Output only. The time the backups was created. + CreateTime string `json:"createTime,omitempty"` + + // Labels: Optional. Resource labels to represent user provided + // metadata. + Labels map[string]string `json:"labels,omitempty"` + + // Name: Output only. The unique name of the Backup in the form of + // `projects/{project_id}/locations/global/domains/{domain_name}/backups/ + // {name}` + Name string `json:"name,omitempty"` + + // State: Output only. The current state of the backup. + // + // Possible values: + // "STATE_UNSPECIFIED" - Not set. + // "CREATING" - Backup is being created. + // "ACTIVE" - Backup has been created and validated. + // "FAILED" - Backup has been created but failed validation. + // "DELETING" - Backup is being deleted. + State string `json:"state,omitempty"` + + // StatusMessage: Output only. Additional information about the current + // status of this backup, if available. + StatusMessage string `json:"statusMessage,omitempty"` + + // Type: Output only. Indicates whether it’s an on-demand backup or + // scheduled. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Backup was manually created. + // "ON_DEMAND" - Backup was manually created. + // "SCHEDULED" - Backup was automatically created. + Type string `json:"type,omitempty"` + + // UpdateTime: Output only. Last update time. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "CreateTime") 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 *Backup) MarshalJSON() ([]byte, error) { + type NoMethod Backup + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Binding: Associates `members`, or principals, with a `role`. type Binding struct { // Condition: The condition that is associated with this binding. If the @@ -401,11 +480,11 @@ func (s *DailyCycle) MarshalJSON() ([]byte, error) { // birthday. The time of day and time zone are either specified // elsewhere or are insignificant. The date is relative to the Gregorian // Calendar. This can represent one of the following: * A full date, -// with non-zero year, month, and day values * A month and day value, -// with a zero year, such as an anniversary * A year on its own, with -// zero month and day values * A year and month value, with a zero day, -// such as a credit card expiration date Related types are -// google.type.TimeOfDay and `google.protobuf.Timestamp`. +// with non-zero year, month, and day values * A month and day, with a +// zero year (e.g., an anniversary) * A year on its own, with a zero +// month and a zero day * A year and month, with a zero day (e.g., a +// credit card expiration date) Related types: * google.type.TimeOfDay * +// google.type.DateTime * google.protobuf.Timestamp type Date struct { // Day: Day of a month. Must be from 1 to 31 and valid for the year and // month, or 0 to specify a year by itself or a year and month where the @@ -843,6 +922,14 @@ type GoogleCloudSaasacceleratorManagementProvidersV1Instance struct { // CreateTime: Output only. Timestamp when the resource was created. CreateTime string `json:"createTime,omitempty"` + // InstanceType: Optional. The instance_type of this instance of format: + // projects/{project_id}/locations/{location_id}/instanceTypes/{instance_ + // type_id}. Instance Type represents a high-level tier or SKU of the + // service that this instance belong to. When enabled(eg: Maintenance + // Rollout), Rollout uses 'instance_type' along with 'software_versions' + // to determine whether instance needs an update or not. + InstanceType string `json:"instanceType,omitempty"` + // Labels: Optional. Resource labels to represent user provided // metadata. Each label is a key-value pair, where both the key and the // value are arbitrary strings provided by the user. @@ -870,6 +957,12 @@ type GoogleCloudSaasacceleratorManagementProvidersV1Instance struct { // used, but keep it consistent with other APIs (e.g. RescheduleUpdate) Name string `json:"name,omitempty"` + // NotificationParameters: Optional. notification_parameters are + // information that service producers may like to include that is not + // relevant to Rollout. This parameter will only be passed to Gamma and + // Cloud Logging for notification/logging purpose. + NotificationParameters map[string]string `json:"notificationParameters,omitempty"` + // ProducerMetadata: Output only. Custom string attributes used // primarily to expose producer-specific information in monitoring // dashboards. See go/get-instance-metadata. @@ -1323,6 +1416,46 @@ func (s *LDAPSSettings) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListBackupsResponse: ListBackupsResponse is the response message for +// ListBackups method. +type ListBackupsResponse struct { + // Backups: A list of Cloud AD backups in the domain. + Backups []*Backup `json:"backups,omitempty"` + + // NextPageToken: Token to retrieve the next page of results, or empty + // if there are no more results in the list. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Backups") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "Backups") 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 *ListBackupsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListBackupsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListDomainsResponse: Response message for ListDomains type ListDomainsResponse struct { // Domains: A list of Managed Identities Service domains in the project. @@ -2022,6 +2155,35 @@ func (s *ResetAdminPasswordResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// RestoreDomainRequest: RestoreDomainRequest is the request received by +// RestoreDomain rpc +type RestoreDomainRequest struct { + // BackupId: Required. ID of the backup to be restored + BackupId string `json:"backupId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BackupId") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "BackupId") 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 *RestoreDomainRequest) MarshalJSON() ([]byte, error) { + type NoMethod RestoreDomainRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Schedule: Configure the schedule. type Schedule struct { // Day: Allows to define schedule that runs specified day of the week. @@ -4572,6 +4734,149 @@ func (c *ProjectsLocationsGlobalDomainsResetAdminPasswordCall) Do(opts ...google } +// method id "managedidentities.projects.locations.global.domains.restore": + +type ProjectsLocationsGlobalDomainsRestoreCall struct { + s *Service + name string + restoredomainrequest *RestoreDomainRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Restore: RestoreDomain restores domain backup mentioned in the +// RestoreDomainRequest +// +// - name: Resource name for the domain to which the backup belongs. +func (r *ProjectsLocationsGlobalDomainsService) Restore(name string, restoredomainrequest *RestoreDomainRequest) *ProjectsLocationsGlobalDomainsRestoreCall { + c := &ProjectsLocationsGlobalDomainsRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.restoredomainrequest = restoredomainrequest + 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 *ProjectsLocationsGlobalDomainsRestoreCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalDomainsRestoreCall { + 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 *ProjectsLocationsGlobalDomainsRestoreCall) Context(ctx context.Context) *ProjectsLocationsGlobalDomainsRestoreCall { + 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 *ProjectsLocationsGlobalDomainsRestoreCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGlobalDomainsRestoreCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.restoredomainrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:restore") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + 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 "managedidentities.projects.locations.global.domains.restore" 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 *ProjectsLocationsGlobalDomainsRestoreCall) 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": "RestoreDomain restores domain backup mentioned in the RestoreDomainRequest", + // "flatPath": "v1/projects/{projectsId}/locations/global/domains/{domainsId}:restore", + // "httpMethod": "POST", + // "id": "managedidentities.projects.locations.global.domains.restore", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Resource name for the domain to which the backup belongs", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/global/domains/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:restore", + // "request": { + // "$ref": "RestoreDomainRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "managedidentities.projects.locations.global.domains.setIamPolicy": type ProjectsLocationsGlobalDomainsSetIamPolicyCall struct { @@ -5171,6 +5476,1297 @@ func (c *ProjectsLocationsGlobalDomainsValidateTrustCall) Do(opts ...googleapi.C } +// method id "managedidentities.projects.locations.global.domains.backups.create": + +type ProjectsLocationsGlobalDomainsBackupsCreateCall struct { + s *Service + parent string + backup *Backup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a Backup for a domain. +// +// - parent: The domain resource name using the form: +// `projects/{project_id}/locations/global/domains/{domain_name}`. +func (r *ProjectsLocationsGlobalDomainsBackupsService) Create(parent string, backup *Backup) *ProjectsLocationsGlobalDomainsBackupsCreateCall { + c := &ProjectsLocationsGlobalDomainsBackupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.backup = backup + return c +} + +// BackupId sets the optional parameter "backupId": Required. Backup Id, +// unique name to identify the backups with the following restrictions: +// * Must be lowercase letters, numbers, and hyphens * Must start with a +// letter. * Must contain between 1-63 characters. * Must end with a +// number or a letter. * Must be unique within the domain. +func (c *ProjectsLocationsGlobalDomainsBackupsCreateCall) BackupId(backupId string) *ProjectsLocationsGlobalDomainsBackupsCreateCall { + c.urlParams_.Set("backupId", backupId) + 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 *ProjectsLocationsGlobalDomainsBackupsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalDomainsBackupsCreateCall { + 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 *ProjectsLocationsGlobalDomainsBackupsCreateCall) Context(ctx context.Context) *ProjectsLocationsGlobalDomainsBackupsCreateCall { + 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 *ProjectsLocationsGlobalDomainsBackupsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGlobalDomainsBackupsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.backup) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/backups") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + 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 "managedidentities.projects.locations.global.domains.backups.create" 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 *ProjectsLocationsGlobalDomainsBackupsCreateCall) 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": "Creates a Backup for a domain.", + // "flatPath": "v1/projects/{projectsId}/locations/global/domains/{domainsId}/backups", + // "httpMethod": "POST", + // "id": "managedidentities.projects.locations.global.domains.backups.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "backupId": { + // "description": "Required. Backup Id, unique name to identify the backups with the following restrictions: * Must be lowercase letters, numbers, and hyphens * Must start with a letter. * Must contain between 1-63 characters. * Must end with a number or a letter. * Must be unique within the domain.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The domain resource name using the form: `projects/{project_id}/locations/global/domains/{domain_name}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/global/domains/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/backups", + // "request": { + // "$ref": "Backup" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "managedidentities.projects.locations.global.domains.backups.delete": + +type ProjectsLocationsGlobalDomainsBackupsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes identified Backup. +// +// - name: The backup resource name using the form: +// `projects/{project_id}/locations/global/domains/{domain_name}/backup +// s/{backup_id}`. +func (r *ProjectsLocationsGlobalDomainsBackupsService) Delete(name string) *ProjectsLocationsGlobalDomainsBackupsDeleteCall { + c := &ProjectsLocationsGlobalDomainsBackupsDeleteCall{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 *ProjectsLocationsGlobalDomainsBackupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalDomainsBackupsDeleteCall { + 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 *ProjectsLocationsGlobalDomainsBackupsDeleteCall) Context(ctx context.Context) *ProjectsLocationsGlobalDomainsBackupsDeleteCall { + 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 *ProjectsLocationsGlobalDomainsBackupsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGlobalDomainsBackupsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + 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 "managedidentities.projects.locations.global.domains.backups.delete" 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 *ProjectsLocationsGlobalDomainsBackupsDeleteCall) 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": "Deletes identified Backup.", + // "flatPath": "v1/projects/{projectsId}/locations/global/domains/{domainsId}/backups/{backupsId}", + // "httpMethod": "DELETE", + // "id": "managedidentities.projects.locations.global.domains.backups.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The backup resource name using the form: `projects/{project_id}/locations/global/domains/{domain_name}/backups/{backup_id}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/global/domains/[^/]+/backups/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "managedidentities.projects.locations.global.domains.backups.get": + +type ProjectsLocationsGlobalDomainsBackupsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single Backup. +// +// - name: The backup resource name using the form: +// `projects/{project_id}/locations/global/domains/{domain_name}/backup +// s/{backup_id}`. +func (r *ProjectsLocationsGlobalDomainsBackupsService) Get(name string) *ProjectsLocationsGlobalDomainsBackupsGetCall { + c := &ProjectsLocationsGlobalDomainsBackupsGetCall{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 *ProjectsLocationsGlobalDomainsBackupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalDomainsBackupsGetCall { + 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 *ProjectsLocationsGlobalDomainsBackupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalDomainsBackupsGetCall { + 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 *ProjectsLocationsGlobalDomainsBackupsGetCall) Context(ctx context.Context) *ProjectsLocationsGlobalDomainsBackupsGetCall { + 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 *ProjectsLocationsGlobalDomainsBackupsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGlobalDomainsBackupsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + 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 "managedidentities.projects.locations.global.domains.backups.get" call. +// Exactly one of *Backup or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Backup.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 *ProjectsLocationsGlobalDomainsBackupsGetCall) Do(opts ...googleapi.CallOption) (*Backup, 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 := &Backup{ + 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 details of a single Backup.", + // "flatPath": "v1/projects/{projectsId}/locations/global/domains/{domainsId}/backups/{backupsId}", + // "httpMethod": "GET", + // "id": "managedidentities.projects.locations.global.domains.backups.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The backup resource name using the form: `projects/{project_id}/locations/global/domains/{domain_name}/backups/{backup_id}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/global/domains/[^/]+/backups/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Backup" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "managedidentities.projects.locations.global.domains.backups.getIamPolicy": + +type ProjectsLocationsGlobalDomainsBackupsGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. +// +// - resource: REQUIRED: The resource for which the policy is being +// requested. See the operation documentation for the appropriate +// value for this field. +func (r *ProjectsLocationsGlobalDomainsBackupsService) GetIamPolicy(resource string) *ProjectsLocationsGlobalDomainsBackupsGetIamPolicyCall { + c := &ProjectsLocationsGlobalDomainsBackupsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that +// will be used to format the policy. Valid values are 0, 1, and 3. +// Requests specifying an invalid value will be rejected. Requests for +// policies with any conditional role bindings must specify version 3. +// Policies with no conditional role bindings may specify any valid +// value or leave the field unset. The policy in the response might use +// the policy version that you specified, or it might use a lower policy +// version. For example, if you specify version 3, but the policy has no +// conditional role bindings, the response uses version 1. To learn +// which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsGlobalDomainsBackupsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsGlobalDomainsBackupsGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + 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 *ProjectsLocationsGlobalDomainsBackupsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalDomainsBackupsGetIamPolicyCall { + 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 *ProjectsLocationsGlobalDomainsBackupsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalDomainsBackupsGetIamPolicyCall { + 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 *ProjectsLocationsGlobalDomainsBackupsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGlobalDomainsBackupsGetIamPolicyCall { + 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 *ProjectsLocationsGlobalDomainsBackupsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGlobalDomainsBackupsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "managedidentities.projects.locations.global.domains.backups.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.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 *ProjectsLocationsGlobalDomainsBackupsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, 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 := &Policy{ + 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 the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1/projects/{projectsId}/locations/global/domains/{domainsId}/backups/{backupsId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "managedidentities.projects.locations.global.domains.backups.getIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "options.requestedPolicyVersion": { + // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/global/domains/[^/]+/backups/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "managedidentities.projects.locations.global.domains.backups.list": + +type ProjectsLocationsGlobalDomainsBackupsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Backup in a given project. +// +// - parent: The domain resource name using the form: +// `projects/{project_id}/locations/global/domains/{domain_name}`. +func (r *ProjectsLocationsGlobalDomainsBackupsService) List(parent string) *ProjectsLocationsGlobalDomainsBackupsListCall { + c := &ProjectsLocationsGlobalDomainsBackupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filter specifying +// constraints of a list operation. +func (c *ProjectsLocationsGlobalDomainsBackupsListCall) Filter(filter string) *ProjectsLocationsGlobalDomainsBackupsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Specifies the ordering +// of results following syntax at +// https://cloud.google.com/apis/design/design_patterns#sorting_order. +func (c *ProjectsLocationsGlobalDomainsBackupsListCall) OrderBy(orderBy string) *ProjectsLocationsGlobalDomainsBackupsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of items to return. If not specified, a default value of 1000 will be +// used by the service. Regardless of the page_size value, the response +// may include a partial list and a caller should only rely on +// response's next_page_token to determine if there are more instances +// left to be queried. +func (c *ProjectsLocationsGlobalDomainsBackupsListCall) PageSize(pageSize int64) *ProjectsLocationsGlobalDomainsBackupsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The +// `next_page_token` value returned from a previous List request, if +// any. +func (c *ProjectsLocationsGlobalDomainsBackupsListCall) PageToken(pageToken string) *ProjectsLocationsGlobalDomainsBackupsListCall { + 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 *ProjectsLocationsGlobalDomainsBackupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalDomainsBackupsListCall { + 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 *ProjectsLocationsGlobalDomainsBackupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalDomainsBackupsListCall { + 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 *ProjectsLocationsGlobalDomainsBackupsListCall) Context(ctx context.Context) *ProjectsLocationsGlobalDomainsBackupsListCall { + 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 *ProjectsLocationsGlobalDomainsBackupsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGlobalDomainsBackupsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/backups") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + 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 "managedidentities.projects.locations.global.domains.backups.list" call. +// Exactly one of *ListBackupsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListBackupsResponse.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 *ProjectsLocationsGlobalDomainsBackupsListCall) Do(opts ...googleapi.CallOption) (*ListBackupsResponse, 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 := &ListBackupsResponse{ + 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 Backup in a given project.", + // "flatPath": "v1/projects/{projectsId}/locations/global/domains/{domainsId}/backups", + // "httpMethod": "GET", + // "id": "managedidentities.projects.locations.global.domains.backups.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter specifying constraints of a list operation.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Specifies the ordering of results following syntax at https://cloud.google.com/apis/design/design_patterns#sorting_order.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. The maximum number of items to return. If not specified, a default value of 1000 will be used by the service. Regardless of the page_size value, the response may include a partial list and a caller should only rely on response's next_page_token to determine if there are more instances left to be queried.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. The `next_page_token` value returned from a previous List request, if any.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The domain resource name using the form: `projects/{project_id}/locations/global/domains/{domain_name}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/global/domains/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/backups", + // "response": { + // "$ref": "ListBackupsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// 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 *ProjectsLocationsGlobalDomainsBackupsListCall) Pages(ctx context.Context, f func(*ListBackupsResponse) 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 "managedidentities.projects.locations.global.domains.backups.patch": + +type ProjectsLocationsGlobalDomainsBackupsPatchCall struct { + s *Service + name string + backup *Backup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the labels for specified Backup. +// +// - name: Output only. The unique name of the Backup in the form of +// `projects/{project_id}/locations/global/domains/{domain_name}/backup +// s/{name}`. +func (r *ProjectsLocationsGlobalDomainsBackupsService) Patch(name string, backup *Backup) *ProjectsLocationsGlobalDomainsBackupsPatchCall { + c := &ProjectsLocationsGlobalDomainsBackupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.backup = backup + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Mask +// of fields to update. At least one path must be supplied in this +// field. The elements of the repeated paths field may only include +// these fields from Backup: * `labels` +func (c *ProjectsLocationsGlobalDomainsBackupsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGlobalDomainsBackupsPatchCall { + 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 *ProjectsLocationsGlobalDomainsBackupsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalDomainsBackupsPatchCall { + 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 *ProjectsLocationsGlobalDomainsBackupsPatchCall) Context(ctx context.Context) *ProjectsLocationsGlobalDomainsBackupsPatchCall { + 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 *ProjectsLocationsGlobalDomainsBackupsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGlobalDomainsBackupsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.backup) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + 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 "managedidentities.projects.locations.global.domains.backups.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsGlobalDomainsBackupsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the labels for specified Backup.", + // "flatPath": "v1/projects/{projectsId}/locations/global/domains/{domainsId}/backups/{backupsId}", + // "httpMethod": "PATCH", + // "id": "managedidentities.projects.locations.global.domains.backups.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Output only. The unique name of the Backup in the form of `projects/{project_id}/locations/global/domains/{domain_name}/backups/{name}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/global/domains/[^/]+/backups/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Mask of fields to update. At least one path must be supplied in this field. The elements of the repeated paths field may only include these fields from Backup: * `labels`", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "Backup" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "managedidentities.projects.locations.global.domains.backups.setIamPolicy": + +type ProjectsLocationsGlobalDomainsBackupsSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// +// - resource: REQUIRED: The resource for which the policy is being +// specified. See the operation documentation for the appropriate +// value for this field. +func (r *ProjectsLocationsGlobalDomainsBackupsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsGlobalDomainsBackupsSetIamPolicyCall { + c := &ProjectsLocationsGlobalDomainsBackupsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest + 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 *ProjectsLocationsGlobalDomainsBackupsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalDomainsBackupsSetIamPolicyCall { + 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 *ProjectsLocationsGlobalDomainsBackupsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGlobalDomainsBackupsSetIamPolicyCall { + 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 *ProjectsLocationsGlobalDomainsBackupsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGlobalDomainsBackupsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "managedidentities.projects.locations.global.domains.backups.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.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 *ProjectsLocationsGlobalDomainsBackupsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, 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 := &Policy{ + 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 access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1/projects/{projectsId}/locations/global/domains/{domainsId}/backups/{backupsId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "managedidentities.projects.locations.global.domains.backups.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/global/domains/[^/]+/backups/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "managedidentities.projects.locations.global.domains.backups.testIamPermissions": + +type ProjectsLocationsGlobalDomainsBackupsTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a `NOT_FOUND` error. Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See the operation documentation for the +// appropriate value for this field. +func (r *ProjectsLocationsGlobalDomainsBackupsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsGlobalDomainsBackupsTestIamPermissionsCall { + c := &ProjectsLocationsGlobalDomainsBackupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest + 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 *ProjectsLocationsGlobalDomainsBackupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalDomainsBackupsTestIamPermissionsCall { + 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 *ProjectsLocationsGlobalDomainsBackupsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsGlobalDomainsBackupsTestIamPermissionsCall { + 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 *ProjectsLocationsGlobalDomainsBackupsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGlobalDomainsBackupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + 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.testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "managedidentities.projects.locations.global.domains.backups.testIamPermissions" call. +// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.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 *ProjectsLocationsGlobalDomainsBackupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, 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 := &TestIamPermissionsResponse{ + 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 permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1/projects/{projectsId}/locations/global/domains/{domainsId}/backups/{backupsId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "managedidentities.projects.locations.global.domains.backups.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/global/domains/[^/]+/backups/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "managedidentities.projects.locations.global.domains.sqlIntegrations.get": type ProjectsLocationsGlobalDomainsSqlIntegrationsGetCall struct { diff --git a/monitoring/v3/monitoring-api.json b/monitoring/v3/monitoring-api.json index 1ce4fca43ca..d4c3e2888a8 100644 --- a/monitoring/v3/monitoring-api.json +++ b/monitoring/v3/monitoring-api.json @@ -2571,7 +2571,7 @@ } } }, - "revision": "20220214", + "revision": "20220218", "rootUrl": "https://monitoring.googleapis.com/", "schemas": { "Aggregation": { @@ -3043,7 +3043,7 @@ "id": "ContentMatcher", "properties": { "content": { - "description": "String or regex content to match. Maximum 1024 bytes. An empty content string indicates no content matching is to be performed.", + "description": "String, regex or JSON content to match. Maximum 1024 bytes. An empty content string indicates no content matching is to be performed.", "type": "string" }, "matcher": { @@ -3059,7 +3059,7 @@ "No content matcher type specified (maintained for backward compatibility, but deprecated for future use). Treated as CONTAINS_STRING.", "Selects substring matching. The match succeeds if the output contains the content string. This is the default value for checks without a matcher option, or where the value of matcher is CONTENT_MATCHER_OPTION_UNSPECIFIED.", "Selects negation of substring matching. The match succeeds if the output does NOT contain the content string.", - "Selects regular-expression matching. The match succeeds of the output matches the regular expression specified in the content string. Regex matching is only supported for HTTP/HTTPS checks.", + "Selects regular-expression matching. The match succeeds if the output matches the regular expression specified in the content string. Regex matching is only supported for HTTP/HTTPS checks.", "Selects negation of regular-expression matching. The match succeeds if the output does NOT match the regular expression specified in the content string. Regex matching is only supported for HTTP/HTTPS checks." ], "type": "string" @@ -4268,7 +4268,7 @@ "EVALUATION_MISSING_DATA_NO_OP" ], "enumDescriptions": [ - "An unspecified evaluation missing data option, if used, it will default to EVALUATION_MISSING_DATA_ACTIVE.", + "An unspecified evaluation missing data option. Equivalent to EVALUATION_MISSING_DATA_NO_OP.", "If there is no data to evaluate the condition, then evaluate the condition as false.", "If there is no data to evaluate the condition, then evaluate the condition as true. The default for conditions with a duration value.", "Do not evaluate the condition to any value if there is no data." @@ -4403,7 +4403,7 @@ "EVALUATION_MISSING_DATA_NO_OP" ], "enumDescriptions": [ - "An unspecified evaluation missing data option, if used, it will default to EVALUATION_MISSING_DATA_ACTIVE.", + "An unspecified evaluation missing data option. Equivalent to EVALUATION_MISSING_DATA_NO_OP.", "If there is no data to evaluate the condition, then evaluate the condition as false.", "If there is no data to evaluate the condition, then evaluate the condition as true. The default for conditions with a duration value.", "Do not evaluate the condition to any value if there is no data." diff --git a/monitoring/v3/monitoring-gen.go b/monitoring/v3/monitoring-gen.go index df2ca7cd092..a0f2badedd9 100644 --- a/monitoring/v3/monitoring-gen.go +++ b/monitoring/v3/monitoring-gen.go @@ -1312,8 +1312,8 @@ func (s *Condition) MarshalJSON() ([]byte, error) { // response (and the first 1 MB of a TCP check's response) are examined // for purposes of content matching. type ContentMatcher struct { - // Content: String or regex content to match. Maximum 1024 bytes. An - // empty content string indicates no content matching is to be + // Content: String, regex or JSON content to match. Maximum 1024 bytes. + // An empty content string indicates no content matching is to be // performed. Content string `json:"content,omitempty"` @@ -1331,7 +1331,7 @@ type ContentMatcher struct { // "NOT_CONTAINS_STRING" - Selects negation of substring matching. The // match succeeds if the output does NOT contain the content string. // "MATCHES_REGEX" - Selects regular-expression matching. The match - // succeeds of the output matches the regular expression specified in + // succeeds if the output matches the regular expression specified in // the content string. Regex matching is only supported for HTTP/HTTPS // checks. // "NOT_MATCHES_REGEX" - Selects negation of regular-expression @@ -3671,8 +3671,7 @@ type MetricThreshold struct { // // Possible values: // "EVALUATION_MISSING_DATA_UNSPECIFIED" - An unspecified evaluation - // missing data option, if used, it will default to - // EVALUATION_MISSING_DATA_ACTIVE. + // missing data option. Equivalent to EVALUATION_MISSING_DATA_NO_OP. // "EVALUATION_MISSING_DATA_INACTIVE" - If there is no data to // evaluate the condition, then evaluate the condition as false. // "EVALUATION_MISSING_DATA_ACTIVE" - If there is no data to evaluate @@ -3960,8 +3959,7 @@ type MonitoringQueryLanguageCondition struct { // // Possible values: // "EVALUATION_MISSING_DATA_UNSPECIFIED" - An unspecified evaluation - // missing data option, if used, it will default to - // EVALUATION_MISSING_DATA_ACTIVE. + // missing data option. Equivalent to EVALUATION_MISSING_DATA_NO_OP. // "EVALUATION_MISSING_DATA_INACTIVE" - If there is no data to // evaluate the condition, then evaluate the condition as false. // "EVALUATION_MISSING_DATA_ACTIVE" - If there is no data to evaluate diff --git a/sasportal/v1alpha1/sasportal-api.json b/sasportal/v1alpha1/sasportal-api.json index 938246b8e7f..fc8f029eab9 100644 --- a/sasportal/v1alpha1/sasportal-api.json +++ b/sasportal/v1alpha1/sasportal-api.json @@ -2483,7 +2483,7 @@ } } }, - "revision": "20220208", + "revision": "20220224", "rootUrl": "https://sasportal.googleapis.com/", "schemas": { "SasPortalAssignment": { @@ -2872,6 +2872,11 @@ "description": "Output only. Whether a CPI has validated to have coordinated with the National Quiet Zone office.", "readOnly": true, "type": "boolean" + }, + "nrqzValidation": { + "$ref": "SasPortalNrqzValidation", + "description": "Output only. National Radio Quiet Zone validation info.", + "readOnly": true } }, "type": "object" @@ -3179,6 +3184,31 @@ }, "type": "object" }, + "SasPortalNrqzValidation": { + "description": "Information about National Radio Quiet Zone validation. The presence of the field indicates the device has been validated.", + "id": "SasPortalNrqzValidation", + "properties": { + "caseId": { + "description": "Validation case id.", + "type": "string" + }, + "cpiId": { + "description": "CPI who signed the validation.", + "type": "string" + }, + "latitude": { + "description": "Device latitude associated with the validation.", + "format": "double", + "type": "number" + }, + "longitude": { + "description": "Device longitude associated with the validation.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, "SasPortalOperation": { "description": "This resource represents a long-running operation that is the result of a network API call.", "id": "SasPortalOperation", diff --git a/sasportal/v1alpha1/sasportal-gen.go b/sasportal/v1alpha1/sasportal-gen.go index 311492ac0e7..6e628d7f7a5 100644 --- a/sasportal/v1alpha1/sasportal-gen.go +++ b/sasportal/v1alpha1/sasportal-gen.go @@ -867,6 +867,10 @@ type SasPortalDeviceMetadata struct { // coordinated with the National Quiet Zone office. NrqzValidated bool `json:"nrqzValidated,omitempty"` + // NrqzValidation: Output only. National Radio Quiet Zone validation + // info. + NrqzValidation *SasPortalNrqzValidation `json:"nrqzValidation,omitempty"` + // ForceSendFields is a list of field names (e.g. "AntennaModel") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -1496,6 +1500,61 @@ func (s *SasPortalNode) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SasPortalNrqzValidation: Information about National Radio Quiet Zone +// validation. The presence of the field indicates the device has been +// validated. +type SasPortalNrqzValidation struct { + // CaseId: Validation case id. + CaseId string `json:"caseId,omitempty"` + + // CpiId: CPI who signed the validation. + CpiId string `json:"cpiId,omitempty"` + + // Latitude: Device latitude associated with the validation. + Latitude float64 `json:"latitude,omitempty"` + + // Longitude: Device longitude associated with the validation. + Longitude float64 `json:"longitude,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CaseId") to + // unconditionally include in API requests. By default, fields with + // empty or default 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. "CaseId") 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 *SasPortalNrqzValidation) MarshalJSON() ([]byte, error) { + type NoMethod SasPortalNrqzValidation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *SasPortalNrqzValidation) UnmarshalJSON(data []byte) error { + type NoMethod SasPortalNrqzValidation + var s1 struct { + Latitude gensupport.JSONFloat64 `json:"latitude"` + Longitude gensupport.JSONFloat64 `json:"longitude"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Latitude = float64(s1.Latitude) + s.Longitude = float64(s1.Longitude) + return nil +} + // SasPortalOperation: This resource represents a long-running operation // that is the result of a network API call. type SasPortalOperation struct { diff --git a/servicemanagement/v1/servicemanagement-api.json b/servicemanagement/v1/servicemanagement-api.json index 6414bfe4dde..98219113e72 100644 --- a/servicemanagement/v1/servicemanagement-api.json +++ b/servicemanagement/v1/servicemanagement-api.json @@ -829,7 +829,7 @@ } } }, - "revision": "20220128", + "revision": "20220218", "rootUrl": "https://servicemanagement.googleapis.com/", "schemas": { "Advice": { @@ -1482,12 +1482,6 @@ }, "type": "object" }, - "EnableServiceResponse": { - "description": "Operation payload for EnableService method.", - "id": "EnableServiceResponse", - "properties": {}, - "type": "object" - }, "Endpoint": { "description": "`Endpoint` describes a network address of a service that serves a set of APIs. It is commonly known as a service endpoint. A service may expose any number of service endpoints, and all service endpoints share the same service definition, such as quota limits and monitoring metrics. Example: type: google.api.Service name: library-example.googleapis.com endpoints: # Declares network address `https://library-example.googleapis.com` # for service `library-example.googleapis.com`. The `https` scheme # is implicit for all service endpoints. Other schemes may be # supported in the future. - name: library-example.googleapis.com allow_cors: false - name: content-staging-library-example.googleapis.com # Allows HTTP OPTIONS calls to be passed to the API frontend, for it # to decide whether the subsequent cross-origin request is allowed # to proceed. allow_cors: true", "id": "Endpoint", @@ -2643,7 +2637,7 @@ "type": "string" }, "createdBy": { - "description": "This field is deprecated and will be deleted. Please remove usage of this field.", + "description": "The user who created the Rollout. Readonly.", "type": "string" }, "deleteServiceStrategy": { diff --git a/servicemanagement/v1/servicemanagement-gen.go b/servicemanagement/v1/servicemanagement-gen.go index 14bed9731ca..00c60c77257 100644 --- a/servicemanagement/v1/servicemanagement-gen.go +++ b/servicemanagement/v1/servicemanagement-gen.go @@ -1559,10 +1559,6 @@ func (s *DocumentationRule) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// EnableServiceResponse: Operation payload for EnableService method. -type EnableServiceResponse struct { -} - // Endpoint: `Endpoint` describes a network address of a service that // serves a set of APIs. It is commonly known as a service endpoint. A // service may expose any number of service endpoints, and all service @@ -3908,8 +3904,7 @@ type Rollout struct { // CreateTime: Creation time of the rollout. Readonly. CreateTime string `json:"createTime,omitempty"` - // CreatedBy: This field is deprecated and will be deleted. Please - // remove usage of this field. + // CreatedBy: The user who created the Rollout. Readonly. CreatedBy string `json:"createdBy,omitempty"` // DeleteServiceStrategy: The strategy associated with a rollout to diff --git a/spanner/v1/spanner-api.json b/spanner/v1/spanner-api.json index d15c066c700..106d842d738 100644 --- a/spanner/v1/spanner-api.json +++ b/spanner/v1/spanner-api.json @@ -447,7 +447,7 @@ ], "parameters": { "filter": { - "description": "An expression that filters the list of returned backup operations. A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string, a number, or a boolean. The comparison operator must be one of: `\u003c`, `\u003e`, `\u003c=`, `\u003e=`, `!=`, `=`, or `:`. Colon `:` is the contains operator. Filter rules are not case sensitive. The following fields in the operation are eligible for filtering: * `name` - The name of the long-running operation * `done` - False if the operation is in progress, else true. * `metadata.@type` - the type of metadata. For example, the type string for CreateBackupMetadata is `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. * `metadata.` - any field in metadata.value. `metadata.type_url` must be specified if filtering on metadata fields. * `error` - Error associated with the long-running operation. * `response.@type` - the type of response. * `response.` - any field in response.value. You can combine multiple expressions by enclosing each expression in parentheses. By default, expressions are combined with AND logic, but you can specify AND, OR, and NOT logic explicitly. Here are a few examples: * `done:true` - The operation is complete. * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \\ `metadata.database:prod` - Returns operations where: * The operation's metadata type is CreateBackupMetadata. * The database the backup was taken from has a name containing the string \"prod\". * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \\ `(metadata.name:howl) AND` \\ `(metadata.progress.start_time \u003c \\\"2018-03-28T14:50:00Z\\\") AND` \\ `(error:*)` - Returns operations where: * The operation's metadata type is CreateBackupMetadata. * The backup name contains the string \"howl\". * The operation started before 2018-03-28T14:50:00Z. * The operation resulted in an error.", + "description": "An expression that filters the list of returned backup operations. A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string, a number, or a boolean. The comparison operator must be one of: `\u003c`, `\u003e`, `\u003c=`, `\u003e=`, `!=`, `=`, or `:`. Colon `:` is the contains operator. Filter rules are not case sensitive. The following fields in the operation are eligible for filtering: * `name` - The name of the long-running operation * `done` - False if the operation is in progress, else true. * `metadata.@type` - the type of metadata. For example, the type string for CreateBackupMetadata is `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. * `metadata.` - any field in metadata.value. `metadata.@type` must be specified first if filtering on metadata fields. * `error` - Error associated with the long-running operation. * `response.@type` - the type of response. * `response.` - any field in response.value. You can combine multiple expressions by enclosing each expression in parentheses. By default, expressions are combined with AND logic, but you can specify AND, OR, and NOT logic explicitly. Here are a few examples: * `done:true` - The operation is complete. * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \\ `metadata.database:prod` - Returns operations where: * The operation's metadata type is CreateBackupMetadata. * The database the backup was taken from has a name containing the string \"prod\". * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \\ `(metadata.name:howl) AND` \\ `(metadata.progress.start_time \u003c \\\"2018-03-28T14:50:00Z\\\") AND` \\ `(error:*)` - Returns operations where: * The operation's metadata type is CreateBackupMetadata. * The backup name contains the string \"howl\". * The operation started before 2018-03-28T14:50:00Z. * The operation resulted in an error.", "location": "query", "type": "string" }, @@ -895,7 +895,7 @@ ], "parameters": { "filter": { - "description": "An expression that filters the list of returned operations. A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string, a number, or a boolean. The comparison operator must be one of: `\u003c`, `\u003e`, `\u003c=`, `\u003e=`, `!=`, `=`, or `:`. Colon `:` is the contains operator. Filter rules are not case sensitive. The following fields in the Operation are eligible for filtering: * `name` - The name of the long-running operation * `done` - False if the operation is in progress, else true. * `metadata.@type` - the type of metadata. For example, the type string for RestoreDatabaseMetadata is `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. * `metadata.` - any field in metadata.value. * `error` - Error associated with the long-running operation. * `response.@type` - the type of response. * `response.` - any field in response.value. You can combine multiple expressions by enclosing each expression in parentheses. By default, expressions are combined with AND logic. However, you can specify AND, OR, and NOT logic explicitly. Here are a few examples: * `done:true` - The operation is complete. * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata) AND` \\ `(metadata.source_type:BACKUP) AND` \\ `(metadata.backup_info.backup:backup_howl) AND` \\ `(metadata.name:restored_howl) AND` \\ `(metadata.progress.start_time \u003c \\\"2018-03-28T14:50:00Z\\\") AND` \\ `(error:*)` - Return operations where: * The operation's metadata type is RestoreDatabaseMetadata. * The database is restored from a backup. * The backup name contains \"backup_howl\". * The restored database's name contains \"restored_howl\". * The operation started before 2018-03-28T14:50:00Z. * The operation resulted in an error.", + "description": "An expression that filters the list of returned operations. A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string, a number, or a boolean. The comparison operator must be one of: `\u003c`, `\u003e`, `\u003c=`, `\u003e=`, `!=`, `=`, or `:`. Colon `:` is the contains operator. Filter rules are not case sensitive. The following fields in the Operation are eligible for filtering: * `name` - The name of the long-running operation * `done` - False if the operation is in progress, else true. * `metadata.@type` - the type of metadata. For example, the type string for RestoreDatabaseMetadata is `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. * `metadata.` - any field in metadata.value. `metadata.@type` must be specified first, if filtering on metadata fields. * `error` - Error associated with the long-running operation. * `response.@type` - the type of response. * `response.` - any field in response.value. You can combine multiple expressions by enclosing each expression in parentheses. By default, expressions are combined with AND logic. However, you can specify AND, OR, and NOT logic explicitly. Here are a few examples: * `done:true` - The operation is complete. * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata) AND` \\ `(metadata.source_type:BACKUP) AND` \\ `(metadata.backup_info.backup:backup_howl) AND` \\ `(metadata.name:restored_howl) AND` \\ `(metadata.progress.start_time \u003c \\\"2018-03-28T14:50:00Z\\\") AND` \\ `(error:*)` - Return operations where: * The operation's metadata type is RestoreDatabaseMetadata. * The database is restored from a backup. * The backup name contains \"backup_howl\". * The restored database's name contains \"restored_howl\". * The operation started before 2018-03-28T14:50:00Z. * The operation resulted in an error.", "location": "query", "type": "string" }, @@ -2037,7 +2037,7 @@ } } }, - "revision": "20220124", + "revision": "20220212", "rootUrl": "https://spanner.googleapis.com/", "schemas": { "Backup": { diff --git a/spanner/v1/spanner-gen.go b/spanner/v1/spanner-gen.go index a431618d776..291f15f4b5b 100644 --- a/spanner/v1/spanner-gen.go +++ b/spanner/v1/spanner-gen.go @@ -6987,15 +6987,14 @@ func (r *ProjectsInstancesBackupOperationsService) List(parent string) *Projects // `metadata.@type` - the type of metadata. For example, the type string // for CreateBackupMetadata is // `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMeta -// data`. * `metadata.` - any field in metadata.value. -// `metadata.type_url` must be specified if filtering on metadata -// fields. * `error` - Error associated with the long-running operation. -// * `response.@type` - the type of response. * `response.` - any field -// in response.value. You can combine multiple expressions by enclosing -// each expression in parentheses. By default, expressions are combined -// with AND logic, but you can specify AND, OR, and NOT logic -// explicitly. Here are a few examples: * `done:true` - The operation is -// complete. * +// data`. * `metadata.` - any field in metadata.value. `metadata.@type` +// must be specified first if filtering on metadata fields. * `error` - +// Error associated with the long-running operation. * `response.@type` +// - the type of response. * `response.` - any field in response.value. +// You can combine multiple expressions by enclosing each expression in +// parentheses. By default, expressions are combined with AND logic, but +// you can specify AND, OR, and NOT logic explicitly. Here are a few +// examples: * `done:true` - The operation is complete. * // `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1. // CreateBackupMetadata) AND` \ `metadata.database:prod` - Returns // operations where: * The operation's metadata type is @@ -7138,7 +7137,7 @@ func (c *ProjectsInstancesBackupOperationsListCall) Do(opts ...googleapi.CallOpt // ], // "parameters": { // "filter": { - // "description": "An expression that filters the list of returned backup operations. A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string, a number, or a boolean. The comparison operator must be one of: `\u003c`, `\u003e`, `\u003c=`, `\u003e=`, `!=`, `=`, or `:`. Colon `:` is the contains operator. Filter rules are not case sensitive. The following fields in the operation are eligible for filtering: * `name` - The name of the long-running operation * `done` - False if the operation is in progress, else true. * `metadata.@type` - the type of metadata. For example, the type string for CreateBackupMetadata is `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. * `metadata.` - any field in metadata.value. `metadata.type_url` must be specified if filtering on metadata fields. * `error` - Error associated with the long-running operation. * `response.@type` - the type of response. * `response.` - any field in response.value. You can combine multiple expressions by enclosing each expression in parentheses. By default, expressions are combined with AND logic, but you can specify AND, OR, and NOT logic explicitly. Here are a few examples: * `done:true` - The operation is complete. * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \\ `metadata.database:prod` - Returns operations where: * The operation's metadata type is CreateBackupMetadata. * The database the backup was taken from has a name containing the string \"prod\". * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \\ `(metadata.name:howl) AND` \\ `(metadata.progress.start_time \u003c \\\"2018-03-28T14:50:00Z\\\") AND` \\ `(error:*)` - Returns operations where: * The operation's metadata type is CreateBackupMetadata. * The backup name contains the string \"howl\". * The operation started before 2018-03-28T14:50:00Z. * The operation resulted in an error.", + // "description": "An expression that filters the list of returned backup operations. A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string, a number, or a boolean. The comparison operator must be one of: `\u003c`, `\u003e`, `\u003c=`, `\u003e=`, `!=`, `=`, or `:`. Colon `:` is the contains operator. Filter rules are not case sensitive. The following fields in the operation are eligible for filtering: * `name` - The name of the long-running operation * `done` - False if the operation is in progress, else true. * `metadata.@type` - the type of metadata. For example, the type string for CreateBackupMetadata is `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. * `metadata.` - any field in metadata.value. `metadata.@type` must be specified first if filtering on metadata fields. * `error` - Error associated with the long-running operation. * `response.@type` - the type of response. * `response.` - any field in response.value. You can combine multiple expressions by enclosing each expression in parentheses. By default, expressions are combined with AND logic, but you can specify AND, OR, and NOT logic explicitly. Here are a few examples: * `done:true` - The operation is complete. * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \\ `metadata.database:prod` - Returns operations where: * The operation's metadata type is CreateBackupMetadata. * The database the backup was taken from has a name containing the string \"prod\". * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \\ `(metadata.name:howl) AND` \\ `(metadata.progress.start_time \u003c \\\"2018-03-28T14:50:00Z\\\") AND` \\ `(error:*)` - Returns operations where: * The operation's metadata type is CreateBackupMetadata. * The backup name contains the string \"howl\". * The operation started before 2018-03-28T14:50:00Z. * The operation resulted in an error.", // "location": "query", // "type": "string" // }, @@ -9227,13 +9226,15 @@ func (r *ProjectsInstancesDatabaseOperationsService) List(parent string) *Projec // `metadata.@type` - the type of metadata. For example, the type string // for RestoreDatabaseMetadata is // `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseM -// etadata`. * `metadata.` - any field in metadata.value. * `error` - -// Error associated with the long-running operation. * `response.@type` -// - the type of response. * `response.` - any field in response.value. -// You can combine multiple expressions by enclosing each expression in -// parentheses. By default, expressions are combined with AND logic. -// However, you can specify AND, OR, and NOT logic explicitly. Here are -// a few examples: * `done:true` - The operation is complete. * +// etadata`. * `metadata.` - any field in metadata.value. +// `metadata.@type` must be specified first, if filtering on metadata +// fields. * `error` - Error associated with the long-running operation. +// * `response.@type` - the type of response. * `response.` - any field +// in response.value. You can combine multiple expressions by enclosing +// each expression in parentheses. By default, expressions are combined +// with AND logic. However, you can specify AND, OR, and NOT logic +// explicitly. Here are a few examples: * `done:true` - The operation is +// complete. * // `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1. // RestoreDatabaseMetadata) AND` \ `(metadata.source_type:BACKUP) AND` \ // `(metadata.backup_info.backup:backup_howl) AND` \ @@ -9374,7 +9375,7 @@ func (c *ProjectsInstancesDatabaseOperationsListCall) Do(opts ...googleapi.CallO // ], // "parameters": { // "filter": { - // "description": "An expression that filters the list of returned operations. A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string, a number, or a boolean. The comparison operator must be one of: `\u003c`, `\u003e`, `\u003c=`, `\u003e=`, `!=`, `=`, or `:`. Colon `:` is the contains operator. Filter rules are not case sensitive. The following fields in the Operation are eligible for filtering: * `name` - The name of the long-running operation * `done` - False if the operation is in progress, else true. * `metadata.@type` - the type of metadata. For example, the type string for RestoreDatabaseMetadata is `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. * `metadata.` - any field in metadata.value. * `error` - Error associated with the long-running operation. * `response.@type` - the type of response. * `response.` - any field in response.value. You can combine multiple expressions by enclosing each expression in parentheses. By default, expressions are combined with AND logic. However, you can specify AND, OR, and NOT logic explicitly. Here are a few examples: * `done:true` - The operation is complete. * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata) AND` \\ `(metadata.source_type:BACKUP) AND` \\ `(metadata.backup_info.backup:backup_howl) AND` \\ `(metadata.name:restored_howl) AND` \\ `(metadata.progress.start_time \u003c \\\"2018-03-28T14:50:00Z\\\") AND` \\ `(error:*)` - Return operations where: * The operation's metadata type is RestoreDatabaseMetadata. * The database is restored from a backup. * The backup name contains \"backup_howl\". * The restored database's name contains \"restored_howl\". * The operation started before 2018-03-28T14:50:00Z. * The operation resulted in an error.", + // "description": "An expression that filters the list of returned operations. A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string, a number, or a boolean. The comparison operator must be one of: `\u003c`, `\u003e`, `\u003c=`, `\u003e=`, `!=`, `=`, or `:`. Colon `:` is the contains operator. Filter rules are not case sensitive. The following fields in the Operation are eligible for filtering: * `name` - The name of the long-running operation * `done` - False if the operation is in progress, else true. * `metadata.@type` - the type of metadata. For example, the type string for RestoreDatabaseMetadata is `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. * `metadata.` - any field in metadata.value. `metadata.@type` must be specified first, if filtering on metadata fields. * `error` - Error associated with the long-running operation. * `response.@type` - the type of response. * `response.` - any field in response.value. You can combine multiple expressions by enclosing each expression in parentheses. By default, expressions are combined with AND logic. However, you can specify AND, OR, and NOT logic explicitly. Here are a few examples: * `done:true` - The operation is complete. * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata) AND` \\ `(metadata.source_type:BACKUP) AND` \\ `(metadata.backup_info.backup:backup_howl) AND` \\ `(metadata.name:restored_howl) AND` \\ `(metadata.progress.start_time \u003c \\\"2018-03-28T14:50:00Z\\\") AND` \\ `(error:*)` - Return operations where: * The operation's metadata type is RestoreDatabaseMetadata. * The database is restored from a backup. * The backup name contains \"backup_howl\". * The restored database's name contains \"restored_howl\". * The operation started before 2018-03-28T14:50:00Z. * The operation resulted in an error.", // "location": "query", // "type": "string" // }, diff --git a/vault/v1/vault-api.json b/vault/v1/vault-api.json index a2399acb297..6b09e49c4db 100644 --- a/vault/v1/vault-api.json +++ b/vault/v1/vault-api.json @@ -1193,7 +1193,7 @@ } } }, - "revision": "20211101", + "revision": "20220222", "rootUrl": "https://vault.googleapis.com/", "schemas": { "AccountCount": { @@ -2107,6 +2107,10 @@ "showConfidentialModeContent": { "description": "To export confidential mode content, set to **true**.", "type": "boolean" + }, + "useNewExport": { + "description": "To use the new export system, set to **true**.", + "type": "boolean" } }, "type": "object" diff --git a/vault/v1/vault-gen.go b/vault/v1/vault-gen.go index 3e25afcbebd..ffd22eac4ce 100644 --- a/vault/v1/vault-gen.go +++ b/vault/v1/vault-gen.go @@ -1747,6 +1747,9 @@ type MailExportOptions struct { // to **true**. ShowConfidentialModeContent bool `json:"showConfidentialModeContent,omitempty"` + // UseNewExport: To use the new export system, set to **true**. + UseNewExport bool `json:"useNewExport,omitempty"` + // ForceSendFields is a list of field names (e.g. "ExportFormat") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any