diff --git a/vendor/google.golang.org/api/dns/v1/dns-api.json b/vendor/google.golang.org/api/dns/v1/dns-api.json index 38bdda5bd62..ab721983f5c 100644 --- a/vendor/google.golang.org/api/dns/v1/dns-api.json +++ b/vendor/google.golang.org/api/dns/v1/dns-api.json @@ -1,708 +1,1401 @@ { - "kind": "discovery#restDescription", - "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/RqBsQyB2YZT-ZAkK7pcLByI9SZs\"", - "discoveryVersion": "v1", - "id": "dns:v1", - "name": "dns", - "version": "v1", - "revision": "20161110", - "title": "Google Cloud DNS API", - "description": "Configures and serves authoritative DNS records.", - "ownerDomain": "google.com", - "ownerName": "Google", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://developers.google.com/cloud-dns", - "protocol": "rest", - "baseUrl": "https://www.googleapis.com/dns/v1/projects/", - "basePath": "/dns/v1/projects/", - "rootUrl": "https://www.googleapis.com/", - "servicePath": "dns/v1/projects/", - "batchPath": "batch", - "parameters": { - "alt": { - "type": "string", - "description": "Data format for the response.", - "default": "json", - "enum": [ - "json" - ], - "enumDescriptions": [ - "Responses with Content-Type of application/json" - ], - "location": "query" - }, - "fields": { - "type": "string", - "description": "Selector specifying which fields to include in a partial response.", - "location": "query" - }, - "key": { - "type": "string", - "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" - }, - "oauth_token": { - "type": "string", - "description": "OAuth 2.0 token for the current user.", - "location": "query" - }, - "prettyPrint": { - "type": "boolean", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "location": "query" - }, - "quotaUser": { - "type": "string", - "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. Overrides userIp if both are provided.", - "location": "query" - }, - "userIp": { - "type": "string", - "description": "IP address of the site where the request originates. Use this if you want to enforce per-user limits.", - "location": "query" - } - }, - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/cloud-platform.read-only": { - "description": "View your data across Google Cloud Platform services" - }, - "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" - } - } - } - }, - "schemas": { - "Change": { - "id": "Change", - "type": "object", - "description": "An atomic update to a collection of ResourceRecordSets.", - "properties": { - "additions": { - "type": "array", - "description": "Which ResourceRecordSets to add?", - "items": { - "$ref": "ResourceRecordSet" - } - }, - "deletions": { - "type": "array", - "description": "Which ResourceRecordSets to remove? Must match existing data exactly.", - "items": { - "$ref": "ResourceRecordSet" - } - }, - "id": { - "type": "string", - "description": "Unique identifier for the resource; defined by the server (output only)." - }, - "kind": { - "type": "string", - "description": "Identifies what kind of resource this is. Value: the fixed string \"dns#change\".", - "default": "dns#change" - }, - "startTime": { - "type": "string", - "description": "The time that this operation was started by the server (output only). This is in RFC3339 text format." - }, - "status": { - "type": "string", - "description": "Status of the operation (output only).", - "enum": [ - "done", - "pending" - ], - "enumDescriptions": [ - "", - "" - ] + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + }, + "https://www.googleapis.com/auth/cloud-platform.read-only": { + "description": "View your data across Google Cloud Platform services" + }, + "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" + } + } } - } }, - "ChangesListResponse": { - "id": "ChangesListResponse", - "type": "object", - "description": "The response to a request to enumerate Changes to a ResourceRecordSets collection.", - "properties": { - "changes": { - "type": "array", - "description": "The requested changes.", - "items": { - "$ref": "Change" - } - }, - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "dns#changesListResponse" - }, - "nextPageToken": { - "type": "string", - "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.\n\nIn 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 will be an inconsistent view of the collection. There is no way to retrieve a \"snapshot\" of collections larger than the maximum page size." - } - } + "basePath": "/dns/v1/projects/", + "baseUrl": "https://www.googleapis.com/dns/v1/projects/", + "batchPath": "batch/dns/v1", + "description": "Configures and serves authoritative DNS records.", + "discoveryVersion": "v1", + "documentationLink": "https://developers.google.com/cloud-dns", + "etag": "\"J3WqvAcMk4eQjJXvfSI4Yr8VouA/EQMOijfSxjBH7q8fB_7QzVLzbgs\"", + "icons": { + "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", + "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" }, - "ManagedZone": { - "id": "ManagedZone", - "type": "object", - "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.", - "properties": { - "creationTime": { - "type": "string", - "description": "The time that this resource was created on the server. This is in RFC3339 text format. Output only." - }, - "description": { - "type": "string", - "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." - }, - "dnsName": { - "type": "string", - "description": "The DNS name of this managed zone, for instance \"example.com.\"." + "id": "dns:v1", + "kind": "discovery#restDescription", + "name": "dns", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "alt": { + "default": "json", + "description": "Data format for the response.", + "enum": [ + "json" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json" + ], + "location": "query", + "type": "string" }, - "id": { - "type": "string", - "description": "Unique identifier for the resource; defined by the server (output only)", - "format": "uint64" + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" }, - "kind": { - "type": "string", - "description": "Identifies what kind of resource this is. Value: the fixed string \"dns#managedZone\".", - "default": "dns#managedZone" + "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" }, - "name": { - "type": "string", - "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." + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" }, - "nameServerSet": { - "type": "string", - "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 will leave this field unset." + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" }, - "nameServers": { - "type": "array", - "description": "Delegate your managed_zone to these virtual name servers; defined by the server (output only)", - "items": { + "quotaUser": { + "description": "An opaque string that represents a user for quota purposes. Must not exceed 40 characters.", + "location": "query", "type": "string" - } - } - } - }, - "ManagedZonesListResponse": { - "id": "ManagedZonesListResponse", - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "dns#managedZonesListResponse" - }, - "managedZones": { - "type": "array", - "description": "The managed zone resources.", - "items": { - "$ref": "ManagedZone" - } }, - "nextPageToken": { - "type": "string", - "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.\n\nIn 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 will be an inconsistent view of the collection. There is no way to retrieve a consistent snapshot of a collection larger than the maximum page size." + "userIp": { + "description": "Deprecated. Please use quotaUser instead.", + "location": "query", + "type": "string" } - } }, - "Project": { - "id": "Project", - "type": "object", - "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.", - "properties": { - "id": { - "type": "string", - "description": "User assigned unique identifier for the resource (output only)." - }, - "kind": { - "type": "string", - "description": "Identifies what kind of resource this is. Value: the fixed string \"dns#project\".", - "default": "dns#project" + "protocol": "rest", + "resources": { + "changes": { + "methods": { + "create": { + "description": "Atomically update the ResourceRecordSet collection.", + "httpMethod": "POST", + "id": "dns.changes.create", + "parameterOrder": [ + "project", + "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" + }, + "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": "{project}/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": "Fetch the representation of an existing Change.", + "httpMethod": "GET", + "id": "dns.changes.get", + "parameterOrder": [ + "project", + "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" + }, + "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": "{project}/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": "Enumerate Changes to a ResourceRecordSet collection.", + "httpMethod": "GET", + "id": "dns.changes.list", + "parameterOrder": [ + "project", + "managedZone" + ], + "parameters": { + "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 will decide 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": "changeSequence", + "description": "Sorting criterion. The only supported value is change sequence.", + "enum": [ + "changeSequence" + ], + "enumDescriptions": [ + "" + ], + "location": "query", + "type": "string" + }, + "sortOrder": { + "description": "Sorting order direction: 'ascending' or 'descending'.", + "location": "query", + "type": "string" + } + }, + "path": "{project}/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" + ] + } + } }, - "number": { - "type": "string", - "description": "Unique numeric identifier for the resource; defined by the server (output only).", - "format": "uint64" + "dnsKeys": { + "methods": { + "get": { + "description": "Fetch the representation of an existing DnsKey.", + "httpMethod": "GET", + "id": "dns.dnsKeys.get", + "parameterOrder": [ + "project", + "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 will be computed and displayed.", + "location": "query", + "type": "string" + }, + "dnsKeyId": { + "description": "The identifier of the requested DnsKey.", + "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": "{project}/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": "Enumerate DnsKeys to a ResourceRecordSet collection.", + "httpMethod": "GET", + "id": "dns.dnsKeys.list", + "parameterOrder": [ + "project", + "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 will be computed and displayed.", + "location": "query", + "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 will decide 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": "{project}/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" + ] + } + } }, - "quota": { - "$ref": "Quota", - "description": "Quotas assigned to this project (output only)." - } - } - }, - "Quota": { - "id": "Quota", - "type": "object", - "description": "Limits associated with a Project.", - "properties": { - "kind": { - "type": "string", - "description": "Identifies what kind of resource this is. Value: the fixed string \"dns#quota\".", - "default": "dns#quota" + "managedZoneOperations": { + "methods": { + "get": { + "description": "Fetch the representation of an existing Operation.", + "httpMethod": "GET", + "id": "dns.managedZoneOperations.get", + "parameterOrder": [ + "project", + "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" + }, + "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.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Identifies the project addressed by this request.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "{project}/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": "Enumerate Operations for the given ManagedZone.", + "httpMethod": "GET", + "id": "dns.managedZoneOperations.list", + "parameterOrder": [ + "project", + "managedZone" + ], + "parameters": { + "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 will decide 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": "startTime", + "description": "Sorting criterion. The only supported values are START_TIME and ID.", + "enum": [ + "id", + "startTime" + ], + "enumDescriptions": [ + "", + "" + ], + "location": "query", + "type": "string" + } + }, + "path": "{project}/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": { - "type": "integer", - "description": "Maximum allowed number of managed zones in the project.", - "format": "int32" - }, - "resourceRecordsPerRrset": { - "type": "integer", - "description": "Maximum allowed number of ResourceRecords per ResourceRecordSet.", - "format": "int32" - }, - "rrsetAdditionsPerChange": { - "type": "integer", - "description": "Maximum allowed number of ResourceRecordSets to add per ChangesCreateRequest.", - "format": "int32" - }, - "rrsetDeletionsPerChange": { - "type": "integer", - "description": "Maximum allowed number of ResourceRecordSets to delete per ChangesCreateRequest.", - "format": "int32" + "methods": { + "create": { + "description": "Create a new ManagedZone.", + "httpMethod": "POST", + "id": "dns.managedZones.create", + "parameterOrder": [ + "project" + ], + "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" + }, + "project": { + "description": "Identifies the project addressed by this request.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "{project}/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": "Delete a previously created ManagedZone.", + "httpMethod": "DELETE", + "id": "dns.managedZones.delete", + "parameterOrder": [ + "project", + "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" + }, + "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": "{project}/managedZones/{managedZone}", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + ] + }, + "get": { + "description": "Fetch the representation of an existing ManagedZone.", + "httpMethod": "GET", + "id": "dns.managedZones.get", + "parameterOrder": [ + "project", + "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" + }, + "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": "{project}/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": "Enumerate ManagedZones that have been created but not yet deleted.", + "httpMethod": "GET", + "id": "dns.managedZones.list", + "parameterOrder": [ + "project" + ], + "parameters": { + "dnsName": { + "description": "Restricts the list to return only zones with this domain name.", + "location": "query", + "type": "string" + }, + "maxResults": { + "description": "Optional. Maximum number of results to be returned. If unspecified, the server will decide 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": "{project}/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": "Apply a partial update to an existing ManagedZone.", + "httpMethod": "PATCH", + "id": "dns.managedZones.patch", + "parameterOrder": [ + "project", + "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" + }, + "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": "{project}/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": "Update an existing ManagedZone.", + "httpMethod": "PUT", + "id": "dns.managedZones.update", + "parameterOrder": [ + "project", + "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" + }, + "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": "{project}/managedZones/{managedZone}", + "request": { + "$ref": "ManagedZone" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/ndev.clouddns.readwrite" + ] + } + } }, - "rrsetsPerManagedZone": { - "type": "integer", - "description": "Maximum allowed number of ResourceRecordSets per zone in the project.", - "format": "int32" + "projects": { + "methods": { + "get": { + "description": "Fetch the representation of an existing Project.", + "httpMethod": "GET", + "id": "dns.projects.get", + "parameterOrder": [ + "project" + ], + "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" + }, + "project": { + "description": "Identifies the project addressed by this request.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "{project}", + "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" + ] + } + } }, - "totalRrdataSizePerChange": { - "type": "integer", - "description": "Maximum allowed size for total rrdata in one ChangesCreateRequest in bytes.", - "format": "int32" + "resourceRecordSets": { + "methods": { + "list": { + "description": "Enumerate ResourceRecordSets that have been created but not yet deleted.", + "httpMethod": "GET", + "id": "dns.resourceRecordSets.list", + "parameterOrder": [ + "project", + "managedZone" + ], + "parameters": { + "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 will decide 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": "{project}/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" + ] + } + } } - } }, - "ResourceRecordSet": { - "id": "ResourceRecordSet", - "type": "object", - "description": "A unit of data that will be returned by the DNS servers.", - "properties": { - "kind": { - "type": "string", - "description": "Identifies what kind of resource this is. Value: the fixed string \"dns#resourceRecordSet\".", - "default": "dns#resourceRecordSet" - }, - "name": { - "type": "string", - "description": "For example, www.example.com." + "revision": "20180808", + "rootUrl": "https://www.googleapis.com/", + "schemas": { + "Change": { + "description": "An atomic update to a collection of ResourceRecordSets.", + "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", + "description": "Identifies what kind of resource this is. Value: the fixed string \"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).", + "enum": [ + "done", + "pending" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + } + }, + "type": "object" }, - "rrdatas": { - "type": "array", - "description": "As defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1).", - "items": { - "type": "string" - } + "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.\n\nIn 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 will be 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" }, - "ttl": { - "type": "integer", - "description": "Number of seconds that this ResourceRecordSet can be cached by resolvers.", - "format": "int32" + "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": [ + "ecdsap256sha256", + "ecdsap384sha384", + "rsasha1", + "rsasha256", + "rsasha512" + ], + "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 will be used to sign subsequent changes to the ManagedZone. Inactive keys will still be 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 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", + "description": "Identifies what kind of resource this is. Value: the fixed string \"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, will be used to sign only resource record sets of type DNSKEY. Otherwise, the Secure Entry Point flag will be cleared and this key will be used to sign only resource record sets of other types. Immutable after creation time.", + "enum": [ + "keySigning", + "zoneSigning" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + } + }, + "type": "object" }, - "type": { - "type": "string", - "description": "The identifier of a supported record type, for example, A, AAAA, MX, TXT, and so on." - } - } - }, - "ResourceRecordSetsListResponse": { - "id": "ResourceRecordSetsListResponse", - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "Type of resource.", - "default": "dns#resourceRecordSetsListResponse" + "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" }, - "nextPageToken": { - "type": "string", - "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.\n\nIn 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 will be an inconsistent view of the collection. There is no way to retrieve a consistent snapshot of a collection larger than the maximum page size." + "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": [ + "ecdsap256sha256", + "ecdsap384sha384", + "rsasha1", + "rsasha256", + "rsasha512" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "keyLength": { + "description": "Length of the keys in bits.", + "format": "uint32", + "type": "integer" + }, + "keyType": { + "description": "One of \"KEY_SIGNING\" or \"ZONE_SIGNING\". Keys of type KEY_SIGNING have the Secure Entry Point flag set and, when active, will be used to sign only resource record sets of type DNSKEY. Otherwise, the Secure Entry Point flag will be cleared and this key will be used to sign only resource record sets of other types.", + "enum": [ + "keySigning", + "zoneSigning" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "kind": { + "default": "dns#dnsKeySpec", + "description": "Identifies what kind of resource this is. Value: the fixed string \"dns#dnsKeySpec\".", + "type": "string" + } + }, + "type": "object" }, - "rrsets": { - "type": "array", - "description": "The resource record set resources.", - "items": { - "$ref": "ResourceRecordSet" - } - } - } - } - }, - "resources": { - "changes": { - "methods": { - "create": { - "id": "dns.changes.create", - "path": "{project}/managedZones/{managedZone}/changes", - "httpMethod": "POST", - "description": "Atomically update the ResourceRecordSet collection.", - "parameters": { - "managedZone": { - "type": "string", - "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or id.", - "required": true, - "location": "path" + "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.\n\nIn 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 will be an inconsistent view of the collection. There is no way to retrieve a \"snapshot\" of collections larger than the maximum page size.", + "type": "string" + } }, - "project": { - "type": "string", - "description": "Identifies the project addressed by this request.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "managedZone" - ], - "request": { - "$ref": "Change" - }, - "response": { - "$ref": "Change" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/ndev.clouddns.readwrite" - ] + "type": "object" }, - "get": { - "id": "dns.changes.get", - "path": "{project}/managedZones/{managedZone}/changes/{changeId}", - "httpMethod": "GET", - "description": "Fetch the representation of an existing Change.", - "parameters": { - "changeId": { - "type": "string", - "description": "The identifier of the requested change, from a previous ResourceRecordSetsChangeResponse.", - "required": true, - "location": "path" + "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": { + "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." + }, + "id": { + "description": "Unique identifier for the resource; defined by the server (output only)", + "format": "uint64", + "type": "string" + }, + "kind": { + "default": "dns#managedZone", + "description": "Identifies what kind of resource this is. Value: the fixed string \"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 will leave this field unset.", + "type": "string" + }, + "nameServers": { + "description": "Delegate your managed_zone to these virtual name servers; defined by the server (output only)", + "items": { + "type": "string" + }, + "type": "array" + } }, - "managedZone": { - "type": "string", - "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or id.", - "required": true, - "location": "path" + "type": "object" + }, + "ManagedZoneDnsSecConfig": { + "id": "ManagedZoneDnsSecConfig", + "properties": { + "defaultKeySpecs": { + "description": "Specifies parameters that will be used for generating initial DnsKeys for this ManagedZone. Output only while state is not OFF.", + "items": { + "$ref": "DnsKeySpec" + }, + "type": "array" + }, + "kind": { + "default": "dns#managedZoneDnsSecConfig", + "description": "Identifies what kind of resource this is. Value: the fixed string \"dns#managedZoneDnsSecConfig\".", + "type": "string" + }, + "nonExistence": { + "description": "Specifies the mechanism used to provide authenticated denial-of-existence responses. Output only while state is not 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": [ + "", + "", + "" + ], + "type": "string" + } }, - "project": { - "type": "string", - "description": "Identifies the project addressed by this request.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "managedZone", - "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" - ] + "type": "object" }, - "list": { - "id": "dns.changes.list", - "path": "{project}/managedZones/{managedZone}/changes", - "httpMethod": "GET", - "description": "Enumerate Changes to a ResourceRecordSet collection.", - "parameters": { - "managedZone": { - "type": "string", - "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or id.", - "required": true, - "location": "path" + "ManagedZoneOperationsListResponse": { + "id": "ManagedZoneOperationsListResponse", + "properties": { + "header": { + "$ref": "ResponseHeader" + }, + "kind": { + "default": "dns#managedZoneOperationsListResponse", + "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.\n\nIn 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 will be an inconsistent view of the collection. There is no way to 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" + } }, - "maxResults": { - "type": "integer", - "description": "Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return.", - "format": "int32", - "location": "query" + "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.\n\nIn 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 will be an inconsistent view of the collection. There is no way to retrieve a consistent snapshot of a collection larger than the maximum page size.", + "type": "string" + } }, - "pageToken": { - "type": "string", - "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": "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", + "description": "Identifies what kind of resource this is. Value: the fixed string \"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).", + "enum": [ + "done", + "pending" + ], + "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)." + } }, - "project": { - "type": "string", - "description": "Identifies the project addressed by this request.", - "required": true, - "location": "path" + "type": "object" + }, + "OperationDnsKeyContext": { + "id": "OperationDnsKeyContext", + "properties": { + "newValue": { + "$ref": "DnsKey", + "description": "The post-operation DnsKey resource." + }, + "oldValue": { + "$ref": "DnsKey", + "description": "The pre-operation DnsKey resource." + } }, - "sortBy": { - "type": "string", - "description": "Sorting criterion. The only supported value is change sequence.", - "default": "changeSequence", - "enum": [ - "changeSequence" - ], - "enumDescriptions": [ - "" - ], - "location": "query" + "type": "object" + }, + "OperationManagedZoneContext": { + "id": "OperationManagedZoneContext", + "properties": { + "newValue": { + "$ref": "ManagedZone", + "description": "The post-operation ManagedZone resource." + }, + "oldValue": { + "$ref": "ManagedZone", + "description": "The pre-operation ManagedZone resource." + } }, - "sortOrder": { - "type": "string", - "description": "Sorting order direction: 'ascending' or 'descending'.", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "managedZone" - ], - "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" - ] - } - } - }, - "managedZones": { - "methods": { - "create": { - "id": "dns.managedZones.create", - "path": "{project}/managedZones", - "httpMethod": "POST", - "description": "Create a new ManagedZone.", - "parameters": { - "project": { - "type": "string", - "description": "Identifies the project addressed by this request.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "ManagedZone" - }, - "response": { - "$ref": "ManagedZone" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/ndev.clouddns.readwrite" - ] + "type": "object" }, - "delete": { - "id": "dns.managedZones.delete", - "path": "{project}/managedZones/{managedZone}", - "httpMethod": "DELETE", - "description": "Delete a previously created ManagedZone.", - "parameters": { - "managedZone": { - "type": "string", - "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or id.", - "required": true, - "location": "path" + "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.", + "id": "Project", + "properties": { + "id": { + "description": "User assigned unique identifier for the resource (output only).", + "type": "string" + }, + "kind": { + "default": "dns#project", + "description": "Identifies what kind of resource this is. Value: the fixed string \"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)." + } }, - "project": { - "type": "string", - "description": "Identifies the project addressed by this request.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "managedZone" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/ndev.clouddns.readwrite" - ] + "type": "object" }, - "get": { - "id": "dns.managedZones.get", - "path": "{project}/managedZones/{managedZone}", - "httpMethod": "GET", - "description": "Fetch the representation of an existing ManagedZone.", - "parameters": { - "managedZone": { - "type": "string", - "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or id.", - "required": true, - "location": "path" + "Quota": { + "description": "Limits associated with a Project.", + "id": "Quota", + "properties": { + "dnsKeysPerManagedZone": { + "description": "Maximum allowed number of DnsKeys per ManagedZone.", + "format": "int32", + "type": "integer" + }, + "kind": { + "default": "dns#quota", + "description": "Identifies what kind of resource this is. Value: the fixed string \"dns#quota\".", + "type": "string" + }, + "managedZones": { + "description": "Maximum allowed number of managed zones in the 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" + }, + "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" + } }, - "project": { - "type": "string", - "description": "Identifies the project addressed by this request.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project", - "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" - ] + "type": "object" }, - "list": { - "id": "dns.managedZones.list", - "path": "{project}/managedZones", - "httpMethod": "GET", - "description": "Enumerate ManagedZones that have been created but not yet deleted.", - "parameters": { - "dnsName": { - "type": "string", - "description": "Restricts the list to return only zones with this domain name.", - "location": "query" + "ResourceRecordSet": { + "description": "A unit of data that will be returned by the DNS servers.", + "id": "ResourceRecordSet", + "properties": { + "kind": { + "default": "dns#resourceRecordSet", + "description": "Identifies what kind of resource this is. Value: the fixed string \"dns#resourceRecordSet\".", + "type": "string" + }, + "name": { + "description": "For example, www.example.com.", + "type": "string" + }, + "rrdatas": { + "description": "As defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1).", + "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, for example, A, AAAA, MX, TXT, and so on.", + "type": "string" + } }, - "maxResults": { - "type": "integer", - "description": "Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return.", - "format": "int32", - "location": "query" + "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.\n\nIn 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 will be an inconsistent view of the collection. There is no way to 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" + } }, - "pageToken": { - "type": "string", - "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": "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" + } }, - "project": { - "type": "string", - "description": "Identifies the project addressed by this request.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "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" - ] + "type": "object" } - } }, - "projects": { - "methods": { - "get": { - "id": "dns.projects.get", - "path": "{project}", - "httpMethod": "GET", - "description": "Fetch the representation of an existing Project.", - "parameters": { - "project": { - "type": "string", - "description": "Identifies the project addressed by this request.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "project" - ], - "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": { - "list": { - "id": "dns.resourceRecordSets.list", - "path": "{project}/managedZones/{managedZone}/rrsets", - "httpMethod": "GET", - "description": "Enumerate ResourceRecordSets that have been created but not yet deleted.", - "parameters": { - "managedZone": { - "type": "string", - "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or id.", - "required": true, - "location": "path" - }, - "maxResults": { - "type": "integer", - "description": "Optional. Maximum number of results to be returned. If unspecified, the server will decide how many results to return.", - "format": "int32", - "location": "query" - }, - "name": { - "type": "string", - "description": "Restricts the list to return only records with this fully qualified domain name.", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.", - "location": "query" - }, - "project": { - "type": "string", - "description": "Identifies the project addressed by this request.", - "required": true, - "location": "path" - }, - "type": { - "type": "string", - "description": "Restricts the list to return only records of this type. If present, the \"name\" parameter must also be present.", - "location": "query" - } - }, - "parameterOrder": [ - "project", - "managedZone" - ], - "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" - ] - } - } - } - } -} + "servicePath": "dns/v1/projects/", + "title": "Google Cloud DNS API", + "version": "v1" +} \ No newline at end of file diff --git a/vendor/google.golang.org/api/dns/v1/dns-gen.go b/vendor/google.golang.org/api/dns/v1/dns-gen.go index fa66410d622..629e1ebf53a 100644 --- a/vendor/google.golang.org/api/dns/v1/dns-gen.go +++ b/vendor/google.golang.org/api/dns/v1/dns-gen.go @@ -66,6 +66,8 @@ func New(client *http.Client) (*Service, error) { } s := &Service{client: client, BasePath: basePath} s.Changes = NewChangesService(s) + s.DnsKeys = NewDnsKeysService(s) + s.ManagedZoneOperations = NewManagedZoneOperationsService(s) s.ManagedZones = NewManagedZonesService(s) s.Projects = NewProjectsService(s) s.ResourceRecordSets = NewResourceRecordSetsService(s) @@ -79,6 +81,10 @@ type Service struct { Changes *ChangesService + DnsKeys *DnsKeysService + + ManagedZoneOperations *ManagedZoneOperationsService + ManagedZones *ManagedZonesService Projects *ProjectsService @@ -102,6 +108,24 @@ 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 @@ -142,6 +166,9 @@ type Change struct { // only). Id string `json:"id,omitempty"` + // IsServing: If the DNS queries for the zone will be served. + IsServing bool `json:"isServing,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed // string "dns#change". Kind string `json:"kind,omitempty"` @@ -179,8 +206,8 @@ type Change struct { } func (s *Change) MarshalJSON() ([]byte, error) { - type noMethod Change - raw := noMethod(*s) + type NoMethod Change + raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -190,6 +217,8 @@ 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"` @@ -228,56 +257,84 @@ type ChangesListResponse struct { } func (s *ChangesListResponse) MarshalJSON() ([]byte, error) { - type noMethod ChangesListResponse - raw := noMethod(*s) + type NoMethod ChangesListResponse + 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 { - // CreationTime: The time that this resource was created on the server. - // This is in RFC3339 text format. Output only. +// DnsKey: A DNSSEC key pair. +type DnsKey struct { + // Algorithm: String mnemonic specifying the DNSSEC algorithm of this + // key. Immutable after creation time. + // + // Possible values: + // "ecdsap256sha256" + // "ecdsap384sha384" + // "rsasha1" + // "rsasha256" + // "rsasha512" + 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 - // managed zone's function. + // resource's function. Description string `json:"description,omitempty"` - // DnsName: The DNS name of this managed zone, for instance - // "example.com.". - DnsName string `json:"dnsName,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 uint64 `json:"id,omitempty,string"` + // only). + Id string `json:"id,omitempty"` + + // IsActive: Active keys will be used to sign subsequent changes to the + // ManagedZone. Inactive keys will still be 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 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: Identifies what kind of resource this is. Value: the fixed - // string "dns#managedZone". + // string "dns#dnsKey". Kind string `json:"kind,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 will leave this field unset. - NameServerSet string `json:"nameServerSet,omitempty"` + // PublicKey: Base64 encoded public half of this key. Output only. + PublicKey string `json:"publicKey,omitempty"` - // NameServers: Delegate your managed_zone to these virtual name - // servers; defined by the server (output only) - NameServers []string `json:"nameServers,omitempty"` + // Type: One of "KEY_SIGNING" or "ZONE_SIGNING". Keys of type + // KEY_SIGNING have the Secure Entry Point flag set and, when active, + // will be used to sign only resource record sets of type DNSKEY. + // Otherwise, the Secure Entry Point flag will be cleared and this key + // will be used to sign only resource record sets of other types. + // Immutable after creation time. + // + // Possible values: + // "keySigning" + // "zoneSigning" + 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. "CreationTime") to + // ForceSendFields is a list of field names (e.g. "Algorithm") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the @@ -285,46 +342,35 @@ type ManagedZone struct { // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTime") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "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 *ManagedZone) MarshalJSON() ([]byte, error) { - type noMethod ManagedZone - raw := noMethod(*s) +func (s *DnsKey) MarshalJSON() ([]byte, error) { + type NoMethod DnsKey + raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type ManagedZonesListResponse struct { - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // ManagedZones: The managed zone resources. - ManagedZones []*ManagedZone `json:"managedZones,omitempty"` +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"` - // 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. + // Type: Specifies the algorithm used to calculate this digest. // - // 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 will be an inconsistent view of the - // collection. There is no way to 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:"-"` + // Possible values: + // "sha1" + // "sha256" + // "sha384" + Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Kind") to + // ForceSendFields is a list of field names (e.g. "Digest") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the @@ -332,7 +378,7 @@ type ManagedZonesListResponse struct { // 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 + // 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 @@ -341,35 +387,97 @@ type ManagedZonesListResponse struct { NullFields []string `json:"-"` } -func (s *ManagedZonesListResponse) MarshalJSON() ([]byte, error) { - type noMethod ManagedZonesListResponse - raw := noMethod(*s) +func (s *DnsKeyDigest) MarshalJSON() ([]byte, error) { + type NoMethod DnsKeyDigest + 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. -type Project struct { - // Id: User assigned unique identifier for the resource (output only). - Id string `json:"id,omitempty"` +// 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: + // "ecdsap256sha256" + // "ecdsap384sha384" + // "rsasha1" + // "rsasha256" + // "rsasha512" + Algorithm string `json:"algorithm,omitempty"` + + // KeyLength: Length of the keys in bits. + KeyLength int64 `json:"keyLength,omitempty"` + + // KeyType: One of "KEY_SIGNING" or "ZONE_SIGNING". Keys of type + // KEY_SIGNING have the Secure Entry Point flag set and, when active, + // will be used to sign only resource record sets of type DNSKEY. + // Otherwise, the Secure Entry Point flag will be cleared and this key + // will be used to sign only resource record sets of other types. + // + // Possible values: + // "keySigning" + // "zoneSigning" + KeyType string `json:"keyType,omitempty"` // Kind: Identifies what kind of resource this is. Value: the fixed - // string "dns#project". + // string "dns#dnsKeySpec". Kind string `json:"kind,omitempty"` - // Number: Unique numeric identifier for the resource; defined by the - // server (output only). - Number uint64 `json:"number,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "Algorithm") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` - // Quota: Quotas assigned to this project (output only). - Quota *Quota `json:"quota,omitempty"` + // 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 will be 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. "Id") to + // ForceSendFields is a list of field names (e.g. "DnsKeys") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the @@ -377,8 +485,8 @@ type Project struct { // 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 + // 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. @@ -386,42 +494,63 @@ type Project struct { NullFields []string `json:"-"` } -func (s *Project) MarshalJSON() ([]byte, error) { - type noMethod Project - raw := noMethod(*s) +func (s *DnsKeysListResponse) MarshalJSON() ([]byte, error) { + type NoMethod DnsKeysListResponse + raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Quota: Limits associated with a Project. -type Quota struct { +// 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 { + // 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"` + + // Id: Unique identifier for the resource; defined by the server (output + // only) + Id uint64 `json:"id,omitempty,string"` + // Kind: Identifies what kind of resource this is. Value: the fixed - // string "dns#quota". + // string "dns#managedZone". Kind string `json:"kind,omitempty"` - // ManagedZones: Maximum allowed number of managed zones in the project. - ManagedZones int64 `json:"managedZones,omitempty"` - - // ResourceRecordsPerRrset: Maximum allowed number of ResourceRecords - // per ResourceRecordSet. - ResourceRecordsPerRrset int64 `json:"resourceRecordsPerRrset,omitempty"` + // Labels: User labels. + Labels map[string]string `json:"labels,omitempty"` - // RrsetAdditionsPerChange: Maximum allowed number of ResourceRecordSets - // to add per ChangesCreateRequest. - RrsetAdditionsPerChange int64 `json:"rrsetAdditionsPerChange,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"` - // RrsetDeletionsPerChange: Maximum allowed number of ResourceRecordSets - // to delete per ChangesCreateRequest. - RrsetDeletionsPerChange int64 `json:"rrsetDeletionsPerChange,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 will leave this field unset. + NameServerSet string `json:"nameServerSet,omitempty"` - // RrsetsPerManagedZone: Maximum allowed number of ResourceRecordSets - // per zone in the project. - RrsetsPerManagedZone int64 `json:"rrsetsPerManagedZone,omitempty"` + // NameServers: Delegate your managed_zone to these virtual name + // servers; defined by the server (output only) + NameServers []string `json:"nameServers,omitempty"` - // TotalRrdataSizePerChange: Maximum allowed size for total rrdata in - // one ChangesCreateRequest in bytes. - TotalRrdataSizePerChange int64 `json:"totalRrdataSizePerChange,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 + // ForceSendFields is a list of field names (e.g. "CreationTime") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the @@ -429,44 +558,48 @@ type Quota struct { // 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 + // NullFields is a list of field names (e.g. "CreationTime") 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) +func (s *ManagedZone) MarshalJSON() ([]byte, error) { + type NoMethod ManagedZone + raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ResourceRecordSet: A unit of data that will be returned by the DNS -// servers. -type ResourceRecordSet struct { +type ManagedZoneDnsSecConfig struct { + // DefaultKeySpecs: Specifies parameters that will be used for + // generating initial DnsKeys for this ManagedZone. Output only while + // state is not OFF. + DefaultKeySpecs []*DnsKeySpec `json:"defaultKeySpecs,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed - // string "dns#resourceRecordSet". + // string "dns#managedZoneDnsSecConfig". Kind string `json:"kind,omitempty"` - // Name: For example, www.example.com. - Name string `json:"name,omitempty"` - - // Rrdatas: As defined in RFC 1035 (section 5) and RFC 1034 (section - // 3.6.1). - Rrdatas []string `json:"rrdatas,omitempty"` - - // Ttl: Number of seconds that this ResourceRecordSet can be cached by - // resolvers. - Ttl int64 `json:"ttl,omitempty"` + // NonExistence: Specifies the mechanism used to provide authenticated + // denial-of-existence responses. Output only while state is not OFF. + // + // Possible values: + // "nsec" + // "nsec3" + NonExistence string `json:"nonExistence,omitempty"` - // Type: The identifier of a supported record type, for example, A, - // AAAA, MX, TXT, and so on. - Type string `json:"type,omitempty"` + // State: Specifies whether DNSSEC is enabled, and what mode it is in. + // + // Possible values: + // "off" + // "on" + // "transfer" + State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "Kind") to + // ForceSendFields is a list of field names (e.g. "DefaultKeySpecs") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the @@ -474,29 +607,32 @@ type ResourceRecordSet struct { // 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 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 *ResourceRecordSet) MarshalJSON() ([]byte, error) { - type noMethod ResourceRecordSet - raw := noMethod(*s) +func (s *ManagedZoneDnsSecConfig) MarshalJSON() ([]byte, error) { + type NoMethod ManagedZoneDnsSecConfig + raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type ResourceRecordSetsListResponse struct { +type ManagedZoneOperationsListResponse 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. + // page 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 @@ -506,14 +642,14 @@ type ResourceRecordSetsListResponse struct { // collection larger than the maximum page size. NextPageToken string `json:"nextPageToken,omitempty"` - // Rrsets: The resource record set resources. - Rrsets []*ResourceRecordSet `json:"rrsets,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. "Kind") to + // ForceSendFields is a list of field names (e.g. "Header") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the @@ -521,7 +657,7 @@ type ResourceRecordSetsListResponse struct { // 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 + // 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 @@ -530,16 +666,432 @@ type ResourceRecordSetsListResponse struct { NullFields []string `json:"-"` } -func (s *ResourceRecordSetsListResponse) MarshalJSON() ([]byte, error) { - type noMethod ResourceRecordSetsListResponse - raw := noMethod(*s) +func (s *ManagedZoneOperationsListResponse) MarshalJSON() ([]byte, error) { + type NoMethod ManagedZoneOperationsListResponse + raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// method id "dns.changes.create": +type ManagedZonesListResponse struct { + Header *ResponseHeader `json:"header,omitempty"` -type ChangesCreateCall struct { - s *Service + // 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. + // + // 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 will be an inconsistent view of the + // collection. There is no way to 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 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: Identifies what kind of resource this is. Value: the fixed + // string "dns#operation". + 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). + // + // Possible values: + // "done" + // "pending" + 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 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 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 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) +} + +// 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. +type Project struct { + // Id: User assigned unique identifier for the resource (output only). + Id string `json:"id,omitempty"` + + // Kind: Identifies what kind of resource this is. Value: the fixed + // string "dns#project". + 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 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"` + + // Kind: Identifies what kind of resource this is. Value: the fixed + // string "dns#quota". + Kind string `json:"kind,omitempty"` + + // ManagedZones: Maximum allowed number of managed zones in the project. + ManagedZones int64 `json:"managedZones,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"` + + // 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 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) +} + +// ResourceRecordSet: A unit of data that will be returned by the DNS +// servers. +type ResourceRecordSet struct { + // Kind: Identifies what kind of resource this is. Value: the fixed + // string "dns#resourceRecordSet". + Kind string `json:"kind,omitempty"` + + // Name: For example, www.example.com. + Name string `json:"name,omitempty"` + + // Rrdatas: As defined in RFC 1035 (section 5) and RFC 1034 (section + // 3.6.1). + 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, for example, A, + // AAAA, MX, TXT, and so on. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Kind") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "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. + // + // 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 will be an inconsistent view of the + // collection. There is no way to 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 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 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) +} + +// method id "dns.changes.create": + +type ChangesCreateCall struct { + s *Service project string managedZone string change *Change @@ -548,56 +1100,1228 @@ type ChangesCreateCall struct { header_ http.Header } -// Create: Atomically update the ResourceRecordSet collection. -func (r *ChangesService) Create(project string, managedZone string, change *Change) *ChangesCreateCall { - c := &ChangesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// Create: Atomically update the ResourceRecordSet collection. +func (r *ChangesService) Create(project string, managedZone string, change *Change) *ChangesCreateCall { + c := &ChangesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + 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) + 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) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/managedZones/{managedZone}/changes") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "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 update the ResourceRecordSet collection.", + // "httpMethod": "POST", + // "id": "dns.changes.create", + // "parameterOrder": [ + // "project", + // "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" + // }, + // "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": "{project}/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 + managedZone string + changeId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Fetch the representation of an existing Change. +func (r *ChangesService) Get(project string, managedZone string, changeId string) *ChangesGetCall { + c := &ChangesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + 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) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/managedZones/{managedZone}/changes/{changeId}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "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": "Fetch the representation of an existing Change.", + // "httpMethod": "GET", + // "id": "dns.changes.get", + // "parameterOrder": [ + // "project", + // "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" + // }, + // "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": "{project}/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 + managedZone string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Enumerate Changes to a ResourceRecordSet collection. +func (r *ChangesService) List(project string, managedZone string) *ChangesListCall { + c := &ChangesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.managedZone = managedZone + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum number +// of results to be returned. If unspecified, the server will decide 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: +// "changeSequence" (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) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/managedZones/{managedZone}/changes") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "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": "Enumerate Changes to a ResourceRecordSet collection.", + // "httpMethod": "GET", + // "id": "dns.changes.list", + // "parameterOrder": [ + // "project", + // "managedZone" + // ], + // "parameters": { + // "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 will decide 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": "changeSequence", + // "description": "Sorting criterion. The only supported value is change sequence.", + // "enum": [ + // "changeSequence" + // ], + // "enumDescriptions": [ + // "" + // ], + // "location": "query", + // "type": "string" + // }, + // "sortOrder": { + // "description": "Sorting order direction: 'ascending' or 'descending'.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "{project}/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 + managedZone string + dnsKeyId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Fetch the representation of an existing DnsKey. +func (r *DnsKeysService) Get(project string, managedZone string, dnsKeyId string) *DnsKeysGetCall { + c := &DnsKeysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + 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 will be +// 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) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/managedZones/{managedZone}/dnsKeys/{dnsKeyId}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "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": "Fetch the representation of an existing DnsKey.", + // "httpMethod": "GET", + // "id": "dns.dnsKeys.get", + // "parameterOrder": [ + // "project", + // "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 will be computed and displayed.", + // "location": "query", + // "type": "string" + // }, + // "dnsKeyId": { + // "description": "The identifier of the requested DnsKey.", + // "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": "{project}/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 + managedZone string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Enumerate DnsKeys to a ResourceRecordSet collection. +func (r *DnsKeysService) List(project string, managedZone string) *DnsKeysListCall { + c := &DnsKeysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + 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 will be +// 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 will decide 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) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/managedZones/{managedZone}/dnsKeys") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "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": "Enumerate DnsKeys to a ResourceRecordSet collection.", + // "httpMethod": "GET", + // "id": "dns.dnsKeys.list", + // "parameterOrder": [ + // "project", + // "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 will be computed and displayed.", + // "location": "query", + // "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 will decide 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": "{project}/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 + managedZone string + operation string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Fetch the representation of an existing Operation. +func (r *ManagedZoneOperationsService) Get(project string, managedZone string, operation string) *ManagedZoneOperationsGetCall { + c := &ManagedZoneOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.managedZone = managedZone - c.change = change + 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 *ChangesCreateCall) Fields(s ...googleapi.Field) *ChangesCreateCall { +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 *ChangesCreateCall) Context(ctx context.Context) *ChangesCreateCall { +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 *ChangesCreateCall) Header() http.Header { +func (c *ManagedZoneOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ChangesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ManagedZoneOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.change) + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/managedZones/{managedZone}/operations/{operation}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "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 } - reqHeaders.Set("Content-Type", "application/json") + 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": "Fetch the representation of an existing Operation.", + // "httpMethod": "GET", + // "id": "dns.managedZoneOperations.get", + // "parameterOrder": [ + // "project", + // "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" + // }, + // "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.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Identifies the project addressed by this request.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/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 + managedZone string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Enumerate Operations for the given ManagedZone. +func (r *ManagedZoneOperationsService) List(project string, managedZone string) *ManagedZoneOperationsListCall { + c := &ManagedZoneOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.managedZone = managedZone + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum number +// of results to be returned. If unspecified, the server will decide 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: +// "id" +// "startTime" (default) +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) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/managedZones/{managedZone}/changes") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/managedZones/{managedZone}/operations") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -606,14 +2330,15 @@ func (c *ChangesCreateCall) doRequest(alt string) (*http.Response, error) { 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) { +// 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 { @@ -632,142 +2357,183 @@ func (c *ChangesCreateCall) Do(opts ...googleapi.CallOption) (*Change, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &Change{ + ret := &ManagedZoneOperationsListResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, }, } target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { + if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } return ret, nil // { - // "description": "Atomically update the ResourceRecordSet collection.", - // "httpMethod": "POST", - // "id": "dns.changes.create", + // "description": "Enumerate Operations for the given ManagedZone.", + // "httpMethod": "GET", + // "id": "dns.managedZoneOperations.list", // "parameterOrder": [ // "project", // "managedZone" // ], // "parameters": { // "managedZone": { - // "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or id.", + // "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 will decide 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": "{project}/managedZones/{managedZone}/changes", - // "request": { - // "$ref": "Change" + // }, + // "sortBy": { + // "default": "startTime", + // "description": "Sorting criterion. The only supported values are START_TIME and ID.", + // "enum": [ + // "id", + // "startTime" + // ], + // "enumDescriptions": [ + // "", + // "" + // ], + // "location": "query", + // "type": "string" + // } // }, + // "path": "{project}/managedZones/{managedZone}/operations", // "response": { - // "$ref": "Change" + // "$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" // ] // } } -// method id "dns.changes.get": +// 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) + } +} -type ChangesGetCall struct { - s *Service - project string - managedZone string - changeId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "dns.managedZones.create": + +type ManagedZonesCreateCall struct { + s *Service + project string + managedzone *ManagedZone + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Fetch the representation of an existing Change. -func (r *ChangesService) Get(project string, managedZone string, changeId string) *ChangesGetCall { - c := &ChangesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// Create: Create a new ManagedZone. +func (r *ManagedZonesService) Create(project string, managedzone *ManagedZone) *ManagedZonesCreateCall { + c := &ManagedZonesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.managedZone = managedZone - c.changeId = changeId + 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 *ChangesGetCall) Fields(s ...googleapi.Field) *ChangesGetCall { +func (c *ManagedZonesCreateCall) Fields(s ...googleapi.Field) *ManagedZonesCreateCall { 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 { +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 *ChangesGetCall) Header() http.Header { +func (c *ManagedZonesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ChangesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ManagedZonesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.managedzone) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/managedZones/{managedZone}/changes/{changeId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/managedZones") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) + req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "managedZone": c.managedZone, - "changeId": c.changeId, + "project": c.project, }) 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) { +// 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 { @@ -786,37 +2552,28 @@ func (c *ChangesGetCall) Do(opts ...googleapi.CallOption) (*Change, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &Change{ + ret := &ManagedZone{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, }, } target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { + if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } return ret, nil // { - // "description": "Fetch the representation of an existing Change.", - // "httpMethod": "GET", - // "id": "dns.changes.get", + // "description": "Create a new ManagedZone.", + // "httpMethod": "POST", + // "id": "dns.managedZones.create", // "parameterOrder": [ - // "project", - // "managedZone", - // "changeId" + // "project" // ], // "parameters": { - // "changeId": { - // "description": "The identifier of the requested change, from a previous ResourceRecordSetsChangeResponse.", - // "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, + // "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" // }, // "project": { @@ -826,122 +2583,85 @@ func (c *ChangesGetCall) Do(opts ...googleapi.CallOption) (*Change, error) { // "type": "string" // } // }, - // "path": "{project}/managedZones/{managedZone}/changes/{changeId}", + // "path": "{project}/managedZones", + // "request": { + // "$ref": "ManagedZone" + // }, // "response": { - // "$ref": "Change" + // "$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.changes.list": +// method id "dns.managedZones.delete": -type ChangesListCall struct { - s *Service - project string - managedZone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ManagedZonesDeleteCall struct { + s *Service + project string + managedZone string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Enumerate Changes to a ResourceRecordSet collection. -func (r *ChangesService) List(project string, managedZone string) *ChangesListCall { - c := &ChangesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// Delete: Delete a previously created ManagedZone. +func (r *ManagedZonesService) Delete(project string, managedZone string) *ManagedZonesDeleteCall { + c := &ManagedZonesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.managedZone = managedZone return c } -// MaxResults sets the optional parameter "maxResults": Maximum number -// of results to be returned. If unspecified, the server will decide 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: -// "changeSequence" (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) +// 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 *ChangesListCall) Fields(s ...googleapi.Field) *ChangesListCall { +func (c *ManagedZonesDeleteCall) Fields(s ...googleapi.Field) *ManagedZonesDeleteCall { 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 { +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 *ChangesListCall) Header() http.Header { +func (c *ManagedZonesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ChangesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ManagedZonesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/managedZones/{managedZone}/changes") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/managedZones/{managedZone}") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) + req, _ := http.NewRequest("DELETE", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -950,203 +2670,148 @@ func (c *ChangesListCall) doRequest(alt string) (*http.Response, error) { 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) { +// 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 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 + return 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 := json.NewDecoder(res.Body).Decode(target); err != nil { - return nil, err + return err } - return ret, nil + return nil // { - // "description": "Enumerate Changes to a ResourceRecordSet collection.", - // "httpMethod": "GET", - // "id": "dns.changes.list", + // "description": "Delete a previously created ManagedZone.", + // "httpMethod": "DELETE", + // "id": "dns.managedZones.delete", // "parameterOrder": [ // "project", // "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" + // }, // "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 will decide 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": "changeSequence", - // "description": "Sorting criterion. The only supported value is change sequence.", - // "enum": [ - // "changeSequence" - // ], - // "enumDescriptions": [ - // "" - // ], - // "location": "query", - // "type": "string" - // }, - // "sortOrder": { - // "description": "Sorting order direction: 'ascending' or 'descending'.", - // "location": "query", - // "type": "string" // } // }, - // "path": "{project}/managedZones/{managedZone}/changes", - // "response": { - // "$ref": "ChangesListResponse" - // }, + // "path": "{project}/managedZones/{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" // ] // } } -// 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.managedZones.create": +// method id "dns.managedZones.get": -type ManagedZonesCreateCall struct { - s *Service - project string - managedzone *ManagedZone - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ManagedZonesGetCall struct { + s *Service + project string + managedZone string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Create a new ManagedZone. -func (r *ManagedZonesService) Create(project string, managedzone *ManagedZone) *ManagedZonesCreateCall { - c := &ManagedZonesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// Get: Fetch the representation of an existing ManagedZone. +func (r *ManagedZonesService) Get(project string, managedZone string) *ManagedZonesGetCall { + c := &ManagedZonesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - 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 *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 *ManagedZonesCreateCall) Fields(s ...googleapi.Field) *ManagedZonesCreateCall { +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 *ManagedZonesCreateCall) Context(ctx context.Context) *ManagedZonesCreateCall { +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 *ManagedZonesCreateCall) Header() http.Header { +func (c *ManagedZonesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ManagedZonesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ManagedZonesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.managedzone) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/managedZones") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/managedZones/{managedZone}") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("POST", urls, body) + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, + "project": c.project, + "managedZone": c.managedZone, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dns.managedZones.create" call. +// 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 *ManagedZonesCreateCall) Do(opts ...googleapi.CallOption) (*ManagedZone, error) { +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 { @@ -1172,18 +2837,30 @@ func (c *ManagedZonesCreateCall) Do(opts ...googleapi.CallOption) (*ManagedZone, }, } target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { + if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } return ret, nil // { - // "description": "Create a new ManagedZone.", - // "httpMethod": "POST", - // "id": "dns.managedZones.create", + // "description": "Fetch the representation of an existing ManagedZone.", + // "httpMethod": "GET", + // "id": "dns.managedZones.get", // "parameterOrder": [ - // "project" + // "project", + // "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" + // }, + // "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", @@ -1191,109 +2868,177 @@ func (c *ManagedZonesCreateCall) Do(opts ...googleapi.CallOption) (*ManagedZone, // "type": "string" // } // }, - // "path": "{project}/managedZones", - // "request": { - // "$ref": "ManagedZone" - // }, + // "path": "{project}/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.delete": +// method id "dns.managedZones.list": -type ManagedZonesDeleteCall struct { - s *Service - project string - managedZone string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ManagedZonesListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Delete a previously created ManagedZone. -func (r *ManagedZonesService) Delete(project string, managedZone string) *ManagedZonesDeleteCall { - c := &ManagedZonesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// List: Enumerate ManagedZones that have been created but not yet +// deleted. +func (r *ManagedZonesService) List(project string) *ManagedZonesListCall { + c := &ManagedZonesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.managedZone = managedZone + 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 will decide 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 *ManagedZonesDeleteCall) Fields(s ...googleapi.Field) *ManagedZonesDeleteCall { +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 *ManagedZonesDeleteCall) Context(ctx context.Context) *ManagedZonesDeleteCall { +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 *ManagedZonesDeleteCall) Header() http.Header { +func (c *ManagedZonesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ManagedZonesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ManagedZonesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/managedZones/{managedZone}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/managedZones") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("DELETE", urls, body) + req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "managedZone": c.managedZone, + "project": c.project, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dns.managedZones.delete" call. -func (c *ManagedZonesDeleteCall) Do(opts ...googleapi.CallOption) error { +// 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 err + return nil, err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return err + return nil, err } - return nil + 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": "Delete a previously created ManagedZone.", - // "httpMethod": "DELETE", - // "id": "dns.managedZones.delete", + // "description": "Enumerate ManagedZones that have been created but not yet deleted.", + // "httpMethod": "GET", + // "id": "dns.managedZones.list", // "parameterOrder": [ - // "project", - // "managedZone" + // "project" // ], // "parameters": { - // "managedZone": { - // "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or id.", - // "location": "path", - // "required": true, + // "dnsName": { + // "description": "Restricts the list to return only zones with this domain name.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "description": "Optional. Maximum number of results to be returned. If unspecified, the server will decide 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": { @@ -1303,84 +3048,112 @@ func (c *ManagedZonesDeleteCall) Do(opts ...googleapi.CallOption) error { // "type": "string" // } // }, - // "path": "{project}/managedZones/{managedZone}", + // "path": "{project}/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" // ] // } } -// method id "dns.managedZones.get": +// 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) + } +} -type ManagedZonesGetCall struct { - s *Service - project string - managedZone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "dns.managedZones.patch": + +type ManagedZonesPatchCall struct { + s *Service + project string + managedZone string + managedzone *ManagedZone + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Fetch the representation of an existing ManagedZone. -func (r *ManagedZonesService) Get(project string, managedZone string) *ManagedZonesGetCall { - c := &ManagedZonesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// Patch: Apply a partial update to an existing ManagedZone. +func (r *ManagedZonesService) Patch(project string, managedZone string, managedzone *ManagedZone) *ManagedZonesPatchCall { + c := &ManagedZonesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project 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 *ManagedZonesGetCall) Fields(s ...googleapi.Field) *ManagedZonesGetCall { +func (c *ManagedZonesPatchCall) Fields(s ...googleapi.Field) *ManagedZonesPatchCall { 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 { +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 *ManagedZonesGetCall) Header() http.Header { +func (c *ManagedZonesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ManagedZonesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ManagedZonesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.managedzone) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/managedZones/{managedZone}") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) + req, _ := http.NewRequest("PATCH", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, @@ -1389,14 +3162,14 @@ func (c *ManagedZonesGetCall) doRequest(alt string) (*http.Response, error) { 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 +// 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 -// *ManagedZone.ServerResponse.Header or (if a response was returned at +// *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 *ManagedZonesGetCall) Do(opts ...googleapi.CallOption) (*ManagedZone, error) { +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 { @@ -1415,26 +3188,31 @@ func (c *ManagedZonesGetCall) Do(opts ...googleapi.CallOption) (*ManagedZone, er if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &ManagedZone{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, }, } target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { + if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } return ret, nil // { - // "description": "Fetch the representation of an existing ManagedZone.", - // "httpMethod": "GET", - // "id": "dns.managedZones.get", + // "description": "Apply a partial update to an existing ManagedZone.", + // "httpMethod": "PATCH", + // "id": "dns.managedZones.patch", // "parameterOrder": [ // "project", // "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" + // }, // "managedZone": { // "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or id.", // "location": "path", @@ -1449,125 +3227,107 @@ func (c *ManagedZonesGetCall) Do(opts ...googleapi.CallOption) (*ManagedZone, er // } // }, // "path": "{project}/managedZones/{managedZone}", - // "response": { + // "request": { // "$ref": "ManagedZone" // }, + // "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.managedZones.list": +// method id "dns.managedZones.update": -type ManagedZonesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ManagedZonesUpdateCall struct { + s *Service + project string + managedZone string + managedzone *ManagedZone + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Enumerate ManagedZones that have been created but not yet -// deleted. -func (r *ManagedZonesService) List(project string) *ManagedZonesListCall { - c := &ManagedZonesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// Update: Update an existing ManagedZone. +func (r *ManagedZonesService) Update(project string, managedZone string, managedzone *ManagedZone) *ManagedZonesUpdateCall { + c := &ManagedZonesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project + c.managedZone = managedZone + c.managedzone = managedzone 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 will decide 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) +// 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 *ManagedZonesListCall) Fields(s ...googleapi.Field) *ManagedZonesListCall { +func (c *ManagedZonesUpdateCall) Fields(s ...googleapi.Field) *ManagedZonesUpdateCall { 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 { +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 *ManagedZonesListCall) Header() http.Header { +func (c *ManagedZonesUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ManagedZonesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ManagedZonesUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.managedzone) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) - urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/managedZones") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/managedZones/{managedZone}") urls += "?" + c.urlParams_.Encode() - req, _ := http.NewRequest("GET", urls, body) + req, _ := http.NewRequest("PUT", urls, body) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, + "project": c.project, + "managedZone": c.managedZone, }) 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) { +// 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 { @@ -1586,39 +3346,35 @@ func (c *ManagedZonesListCall) Do(opts ...googleapi.CallOption) (*ManagedZonesLi if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &ManagedZonesListResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, }, } target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { + if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } return ret, nil // { - // "description": "Enumerate ManagedZones that have been created but not yet deleted.", - // "httpMethod": "GET", - // "id": "dns.managedZones.list", + // "description": "Update an existing ManagedZone.", + // "httpMethod": "PUT", + // "id": "dns.managedZones.update", // "parameterOrder": [ - // "project" + // "project", + // "managedZone" // ], // "parameters": { - // "dnsName": { - // "description": "Restricts the list to return only zones with this domain name.", + // "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" // }, - // "maxResults": { - // "description": "Optional. Maximum number of results to be returned. If unspecified, the server will decide 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", + // "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": { @@ -1628,41 +3384,21 @@ func (c *ManagedZonesListCall) Do(opts ...googleapi.CallOption) (*ManagedZonesLi // "type": "string" // } // }, - // "path": "{project}/managedZones", + // "path": "{project}/managedZones/{managedZone}", + // "request": { + // "$ref": "ManagedZone" + // }, // "response": { - // "$ref": "ManagedZonesListResponse" + // "$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" // ] // } } -// 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.projects.get": type ProjectsGetCall struct { @@ -1681,6 +3417,15 @@ func (r *ProjectsService) Get(project string) *ProjectsGetCall { 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. @@ -1770,7 +3515,7 @@ func (c *ProjectsGetCall) Do(opts ...googleapi.CallOption) (*Project, error) { }, } target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { + if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } return ret, nil @@ -1782,6 +3527,11 @@ func (c *ProjectsGetCall) Do(opts ...googleapi.CallOption) (*Project, error) { // "project" // ], // "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" + // }, // "project": { // "description": "Identifies the project addressed by this request.", // "location": "path", @@ -1945,7 +3695,7 @@ func (c *ResourceRecordSetsListCall) Do(opts ...googleapi.CallOption) (*Resource }, } target := &ret - if err := json.NewDecoder(res.Body).Decode(target); err != nil { + if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } return ret, nil diff --git a/vendor/vendor.json b/vendor/vendor.json index 3296411b439..5f14858f479 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -1346,10 +1346,10 @@ "revisionTime": "2017-07-18T13:06:16Z" }, { - "checksumSHA1": "JYl35km48fLrIx7YUtzcgd4J7Rk=", + "checksumSHA1": "UyrBKKpY9lX1LW5SpqJ9QKOAOjk=", "path": "google.golang.org/api/dns/v1", - "revision": "3cc2e591b550923a2c5f0ab5a803feda924d5823", - "revisionTime": "2016-11-27T23:54:21Z" + "revision": "0ad5a633fea1d4b64bf5e6a01e30d1fc466038e5", + "revisionTime": "2018-09-04T00:04:47Z" }, { "checksumSHA1": "nU4Iv1WFYka13VAT8ffBzgguGZ0=",