diff --git a/analyticshub/v1/analyticshub-api.json b/analyticshub/v1/analyticshub-api.json index e6a7efc31dd..5d881273206 100644 --- a/analyticshub/v1/analyticshub-api.json +++ b/analyticshub/v1/analyticshub-api.json @@ -964,7 +964,7 @@ } } }, - "revision": "20230803", + "revision": "20230804", "rootUrl": "https://analyticshub.googleapis.com/", "schemas": { "AuditConfig": { @@ -1463,7 +1463,7 @@ "description": "Properties of the object. Contains field @type with type URL.", "type": "any" }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", "type": "object" } }, @@ -1514,7 +1514,7 @@ "type": "object" }, "Policy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", "properties": { "auditConfigs": { diff --git a/analyticshub/v1/analyticshub-gen.go b/analyticshub/v1/analyticshub-gen.go index 414c75b683b..01554ef1cb3 100644 --- a/analyticshub/v1/analyticshub-gen.go +++ b/analyticshub/v1/analyticshub-gen.go @@ -1143,8 +1143,8 @@ type Operation struct { // `operations/{unique_id}`. Name string `json:"name,omitempty"` - // Response: The normal response of the operation in case of success. If - // the original method returns no data on success, such as `Delete`, the + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the // response is `google.protobuf.Empty`. If the original method is // standard `Get`/`Create`/`Update`, the response should be the // resource. For other methods, the response should have the type @@ -1246,7 +1246,7 @@ func (s *OperationMetadata) MarshalJSON() ([]byte, error) { // both. To learn which resources support conditions in their IAM // policies, see the IAM documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -// **JSON example:** { "bindings": [ { "role": +// **JSON example:** ``` { "bindings": [ { "role": // "roles/resourcemanager.organizationAdmin", "members": [ // "user:mike@example.com", "group:admins@example.com", // "domain:google.com", @@ -1255,17 +1255,17 @@ func (s *OperationMetadata) MarshalJSON() ([]byte, error) { // "user:eve@example.com" ], "condition": { "title": "expirable access", // "description": "Does not grant access after Sep 2020", "expression": // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], -// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - -// members: - user:mike@example.com - group:admins@example.com - -// domain:google.com - +// "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` +// bindings: - members: - user:mike@example.com - +// group:admins@example.com - domain:google.com - // serviceAccount:my-project-id@appspot.gserviceaccount.com role: // roles/resourcemanager.organizationAdmin - members: - // user:eve@example.com role: roles/resourcemanager.organizationViewer // condition: title: expirable access description: Does not grant access // after Sep 2020 expression: request.time < // timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 -// For a description of IAM and its features, see the IAM documentation -// (https://cloud.google.com/iam/docs/). +// ``` For a description of IAM and its features, see the IAM +// documentation (https://cloud.google.com/iam/docs/). type Policy struct { // AuditConfigs: Specifies cloud audit logging configuration for this // policy. diff --git a/analyticshub/v1beta1/analyticshub-api.json b/analyticshub/v1beta1/analyticshub-api.json index 93d37c3d140..2ae027cd85d 100644 --- a/analyticshub/v1beta1/analyticshub-api.json +++ b/analyticshub/v1beta1/analyticshub-api.json @@ -695,7 +695,7 @@ } } }, - "revision": "20230803", + "revision": "20230804", "rootUrl": "https://analyticshub.googleapis.com/", "schemas": { "AuditConfig": { @@ -1158,7 +1158,7 @@ "type": "object" }, "Policy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", "properties": { "auditConfigs": { diff --git a/analyticshub/v1beta1/analyticshub-gen.go b/analyticshub/v1beta1/analyticshub-gen.go index 88caacd6e17..bb7daeca575 100644 --- a/analyticshub/v1beta1/analyticshub-gen.go +++ b/analyticshub/v1beta1/analyticshub-gen.go @@ -1086,7 +1086,7 @@ func (s *OperationMetadata) MarshalJSON() ([]byte, error) { // both. To learn which resources support conditions in their IAM // policies, see the IAM documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -// **JSON example:** { "bindings": [ { "role": +// **JSON example:** ``` { "bindings": [ { "role": // "roles/resourcemanager.organizationAdmin", "members": [ // "user:mike@example.com", "group:admins@example.com", // "domain:google.com", @@ -1095,17 +1095,17 @@ func (s *OperationMetadata) MarshalJSON() ([]byte, error) { // "user:eve@example.com" ], "condition": { "title": "expirable access", // "description": "Does not grant access after Sep 2020", "expression": // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], -// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - -// members: - user:mike@example.com - group:admins@example.com - -// domain:google.com - +// "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` +// bindings: - members: - user:mike@example.com - +// group:admins@example.com - domain:google.com - // serviceAccount:my-project-id@appspot.gserviceaccount.com role: // roles/resourcemanager.organizationAdmin - members: - // user:eve@example.com role: roles/resourcemanager.organizationViewer // condition: title: expirable access description: Does not grant access // after Sep 2020 expression: request.time < // timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 -// For a description of IAM and its features, see the IAM documentation -// (https://cloud.google.com/iam/docs/). +// ``` For a description of IAM and its features, see the IAM +// documentation (https://cloud.google.com/iam/docs/). type Policy struct { // AuditConfigs: Specifies cloud audit logging configuration for this // policy. diff --git a/apigateway/v1/apigateway-api.json b/apigateway/v1/apigateway-api.json index ae8ce2fc612..fff19241608 100644 --- a/apigateway/v1/apigateway-api.json +++ b/apigateway/v1/apigateway-api.json @@ -1083,7 +1083,7 @@ } } }, - "revision": "20230426", + "revision": "20230802", "rootUrl": "https://apigateway.googleapis.com/", "schemas": { "ApigatewayApi": { @@ -1617,7 +1617,7 @@ "description": "Properties of the object. Contains field @type with type URL.", "type": "any" }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", "type": "object" } }, @@ -1691,7 +1691,7 @@ "type": "object" }, "ApigatewayPolicy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "ApigatewayPolicy", "properties": { "auditConfigs": { diff --git a/apigateway/v1/apigateway-gen.go b/apigateway/v1/apigateway-gen.go index cada34eeed6..8a082d079ce 100644 --- a/apigateway/v1/apigateway-gen.go +++ b/apigateway/v1/apigateway-gen.go @@ -1047,8 +1047,8 @@ type ApigatewayOperation struct { // `operations/{unique_id}`. Name string `json:"name,omitempty"` - // Response: The normal response of the operation in case of success. If - // the original method returns no data on success, such as `Delete`, the + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the // response is `google.protobuf.Empty`. If the original method is // standard `Get`/`Create`/`Update`, the response should be the // resource. For other methods, the response should have the type @@ -1186,7 +1186,7 @@ func (s *ApigatewayOperationMetadataDiagnostic) MarshalJSON() ([]byte, error) { // both. To learn which resources support conditions in their IAM // policies, see the IAM documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -// **JSON example:** { "bindings": [ { "role": +// **JSON example:** ``` { "bindings": [ { "role": // "roles/resourcemanager.organizationAdmin", "members": [ // "user:mike@example.com", "group:admins@example.com", // "domain:google.com", @@ -1195,17 +1195,17 @@ func (s *ApigatewayOperationMetadataDiagnostic) MarshalJSON() ([]byte, error) { // "user:eve@example.com" ], "condition": { "title": "expirable access", // "description": "Does not grant access after Sep 2020", "expression": // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], -// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - -// members: - user:mike@example.com - group:admins@example.com - -// domain:google.com - +// "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` +// bindings: - members: - user:mike@example.com - +// group:admins@example.com - domain:google.com - // serviceAccount:my-project-id@appspot.gserviceaccount.com role: // roles/resourcemanager.organizationAdmin - members: - // user:eve@example.com role: roles/resourcemanager.organizationViewer // condition: title: expirable access description: Does not grant access // after Sep 2020 expression: request.time < // timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 -// For a description of IAM and its features, see the IAM documentation -// (https://cloud.google.com/iam/docs/). +// ``` For a description of IAM and its features, see the IAM +// documentation (https://cloud.google.com/iam/docs/). type ApigatewayPolicy struct { // AuditConfigs: Specifies cloud audit logging configuration for this // policy. diff --git a/apigateway/v1beta/apigateway-api.json b/apigateway/v1beta/apigateway-api.json index f8538062b63..68a2ed1ff59 100644 --- a/apigateway/v1beta/apigateway-api.json +++ b/apigateway/v1beta/apigateway-api.json @@ -1083,7 +1083,7 @@ } } }, - "revision": "20230621", + "revision": "20230802", "rootUrl": "https://apigateway.googleapis.com/", "schemas": { "ApigatewayApi": { @@ -1645,7 +1645,7 @@ "description": "Properties of the object. Contains field @type with type URL.", "type": "any" }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", "type": "object" } }, @@ -1719,7 +1719,7 @@ "type": "object" }, "ApigatewayPolicy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "ApigatewayPolicy", "properties": { "auditConfigs": { diff --git a/apigateway/v1beta/apigateway-gen.go b/apigateway/v1beta/apigateway-gen.go index 459f2b9e284..b6f41dc8407 100644 --- a/apigateway/v1beta/apigateway-gen.go +++ b/apigateway/v1beta/apigateway-gen.go @@ -1120,8 +1120,8 @@ type ApigatewayOperation struct { // `operations/{unique_id}`. Name string `json:"name,omitempty"` - // Response: The normal response of the operation in case of success. If - // the original method returns no data on success, such as `Delete`, the + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the // response is `google.protobuf.Empty`. If the original method is // standard `Get`/`Create`/`Update`, the response should be the // resource. For other methods, the response should have the type @@ -1259,7 +1259,7 @@ func (s *ApigatewayOperationMetadataDiagnostic) MarshalJSON() ([]byte, error) { // both. To learn which resources support conditions in their IAM // policies, see the IAM documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -// **JSON example:** { "bindings": [ { "role": +// **JSON example:** ``` { "bindings": [ { "role": // "roles/resourcemanager.organizationAdmin", "members": [ // "user:mike@example.com", "group:admins@example.com", // "domain:google.com", @@ -1268,17 +1268,17 @@ func (s *ApigatewayOperationMetadataDiagnostic) MarshalJSON() ([]byte, error) { // "user:eve@example.com" ], "condition": { "title": "expirable access", // "description": "Does not grant access after Sep 2020", "expression": // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], -// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - -// members: - user:mike@example.com - group:admins@example.com - -// domain:google.com - +// "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` +// bindings: - members: - user:mike@example.com - +// group:admins@example.com - domain:google.com - // serviceAccount:my-project-id@appspot.gserviceaccount.com role: // roles/resourcemanager.organizationAdmin - members: - // user:eve@example.com role: roles/resourcemanager.organizationViewer // condition: title: expirable access description: Does not grant access // after Sep 2020 expression: request.time < // timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 -// For a description of IAM and its features, see the IAM documentation -// (https://cloud.google.com/iam/docs/). +// ``` For a description of IAM and its features, see the IAM +// documentation (https://cloud.google.com/iam/docs/). type ApigatewayPolicy struct { // AuditConfigs: Specifies cloud audit logging configuration for this // policy. diff --git a/artifactregistry/v1/artifactregistry-api.json b/artifactregistry/v1/artifactregistry-api.json index 754a042787b..2b993e25db9 100644 --- a/artifactregistry/v1/artifactregistry-api.json +++ b/artifactregistry/v1/artifactregistry-api.json @@ -1661,7 +1661,7 @@ } } }, - "revision": "20230803", + "revision": "20230809", "rootUrl": "https://artifactregistry.googleapis.com/", "schemas": { "AptArtifact": { @@ -1712,6 +1712,17 @@ }, "type": "object" }, + "AptRepository": { + "description": "Configuration for an Apt remote repository.", + "id": "AptRepository", + "properties": { + "publicRepository": { + "$ref": "GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigAptRepositoryPublicRepository", + "description": "One of the publicly available Apt repositories supported by Artifact Registry." + } + }, + "type": "object" + }, "BatchDeleteVersionsMetadata": { "description": "The metadata of an LRO from deleting multiple versions.", "id": "BatchDeleteVersionsMetadata", @@ -2078,6 +2089,64 @@ }, "type": "object" }, + "GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigAptRepositoryPublicRepository": { + "description": "Publicly available Apt repositories constructed from a common repository base and a custom repository path.", + "id": "GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigAptRepositoryPublicRepository", + "properties": { + "repositoryBase": { + "description": "A common public repository base for Apt.", + "enum": [ + "REPOSITORY_BASE_UNSPECIFIED", + "DEBIAN", + "UBUNTU" + ], + "enumDescriptions": [ + "Unspecified repository base.", + "Debian.", + "Ubuntu LTS/Pro." + ], + "type": "string" + }, + "repositoryPath": { + "description": "A custom field to define a path to a specific repository from the base.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigYumRepositoryPublicRepository": { + "description": "Publicly available Yum repositories constructed from a common repository base and a custom repository path.", + "id": "GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigYumRepositoryPublicRepository", + "properties": { + "repositoryBase": { + "description": "A common public repository base for Yum.", + "enum": [ + "REPOSITORY_BASE_UNSPECIFIED", + "CENTOS", + "CENTOS_DEBUG", + "CENTOS_VAULT", + "CENTOS_STREAM", + "ROCKY", + "EPEL" + ], + "enumDescriptions": [ + "Unspecified repository base.", + "CentOS.", + "CentOS Debug.", + "CentOS Vault.", + "CentOS Stream.", + "Rocky.", + "Fedora Extra Packages for Enterprise Linux (EPEL)." + ], + "type": "string" + }, + "repositoryPath": { + "description": "A custom field to define a path to a specific repository from the base.", + "type": "string" + } + }, + "type": "object" + }, "Hash": { "description": "A hash of file content.", "id": "Hash", @@ -2868,6 +2937,10 @@ "description": "Remote repository configuration.", "id": "RemoteRepositoryConfig", "properties": { + "aptRepository": { + "$ref": "AptRepository", + "description": "Specific settings for an Apt remote repository." + }, "description": { "description": "The description of the remote source.", "type": "string" @@ -2887,6 +2960,10 @@ "pythonRepository": { "$ref": "PythonRepository", "description": "Specific settings for a Python remote repository." + }, + "yumRepository": { + "$ref": "YumRepository", + "description": "Specific settings for a Yum remote repository." } }, "type": "object" @@ -3428,6 +3505,17 @@ } }, "type": "object" + }, + "YumRepository": { + "description": "Configuration for a Yum remote repository.", + "id": "YumRepository", + "properties": { + "publicRepository": { + "$ref": "GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigYumRepositoryPublicRepository", + "description": "One of the publicly available Yum repositories supported by Artifact Registry." + } + }, + "type": "object" } }, "servicePath": "", diff --git a/artifactregistry/v1/artifactregistry-gen.go b/artifactregistry/v1/artifactregistry-gen.go index 15e0c49ee84..2c3606a6288 100644 --- a/artifactregistry/v1/artifactregistry-gen.go +++ b/artifactregistry/v1/artifactregistry-gen.go @@ -401,6 +401,36 @@ func (s *AptArtifact) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AptRepository: Configuration for an Apt remote repository. +type AptRepository struct { + // PublicRepository: One of the publicly available Apt repositories + // supported by Artifact Registry. + PublicRepository *GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigAptRepositoryPublicRepository `json:"publicRepository,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PublicRepository") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PublicRepository") 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 *AptRepository) MarshalJSON() ([]byte, error) { + type NoMethod AptRepository + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // BatchDeleteVersionsMetadata: The metadata of an LRO from deleting // multiple versions. type BatchDeleteVersionsMetadata struct { @@ -1018,6 +1048,90 @@ func (s *GoogleDevtoolsArtifactregistryV1File) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigAptRepositoryPub +// licRepository: Publicly available Apt repositories constructed from a +// common repository base and a custom repository path. +type GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigAptRepositoryPublicRepository struct { + // RepositoryBase: A common public repository base for Apt. + // + // Possible values: + // "REPOSITORY_BASE_UNSPECIFIED" - Unspecified repository base. + // "DEBIAN" - Debian. + // "UBUNTU" - Ubuntu LTS/Pro. + RepositoryBase string `json:"repositoryBase,omitempty"` + + // RepositoryPath: A custom field to define a path to a specific + // repository from the base. + RepositoryPath string `json:"repositoryPath,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RepositoryBase") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "RepositoryBase") 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 *GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigAptRepositoryPublicRepository) MarshalJSON() ([]byte, error) { + type NoMethod GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigAptRepositoryPublicRepository + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigYumRepositoryPub +// licRepository: Publicly available Yum repositories constructed from a +// common repository base and a custom repository path. +type GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigYumRepositoryPublicRepository struct { + // RepositoryBase: A common public repository base for Yum. + // + // Possible values: + // "REPOSITORY_BASE_UNSPECIFIED" - Unspecified repository base. + // "CENTOS" - CentOS. + // "CENTOS_DEBUG" - CentOS Debug. + // "CENTOS_VAULT" - CentOS Vault. + // "CENTOS_STREAM" - CentOS Stream. + // "ROCKY" - Rocky. + // "EPEL" - Fedora Extra Packages for Enterprise Linux (EPEL). + RepositoryBase string `json:"repositoryBase,omitempty"` + + // RepositoryPath: A custom field to define a path to a specific + // repository from the base. + RepositoryPath string `json:"repositoryPath,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RepositoryBase") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "RepositoryBase") 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 *GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigYumRepositoryPublicRepository) MarshalJSON() ([]byte, error) { + type NoMethod GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigYumRepositoryPublicRepository + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Hash: A hash of file content. type Hash struct { // Type: The algorithm used to compute the hash value. @@ -2479,6 +2593,9 @@ func (s *PythonRepository) MarshalJSON() ([]byte, error) { // RemoteRepositoryConfig: Remote repository configuration. type RemoteRepositoryConfig struct { + // AptRepository: Specific settings for an Apt remote repository. + AptRepository *AptRepository `json:"aptRepository,omitempty"` + // Description: The description of the remote source. Description string `json:"description,omitempty"` @@ -2494,7 +2611,10 @@ type RemoteRepositoryConfig struct { // PythonRepository: Specific settings for a Python remote repository. PythonRepository *PythonRepository `json:"pythonRepository,omitempty"` - // ForceSendFields is a list of field names (e.g. "Description") to + // YumRepository: Specific settings for a Yum remote repository. + YumRepository *YumRepository `json:"yumRepository,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AptRepository") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2502,7 +2622,7 @@ type RemoteRepositoryConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include + // NullFields is a list of field names (e.g. "AptRepository") 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 @@ -3414,6 +3534,36 @@ func (s *YumArtifact) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// YumRepository: Configuration for a Yum remote repository. +type YumRepository struct { + // PublicRepository: One of the publicly available Yum repositories + // supported by Artifact Registry. + PublicRepository *GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigYumRepositoryPublicRepository `json:"publicRepository,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PublicRepository") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PublicRepository") 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 *YumRepository) MarshalJSON() ([]byte, error) { + type NoMethod YumRepository + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // method id "artifactregistry.projects.getProjectSettings": type ProjectsGetProjectSettingsCall struct { diff --git a/batch/v1/batch-api.json b/batch/v1/batch-api.json index 5be6b78b23f..088b2b54cff 100644 --- a/batch/v1/batch-api.json +++ b/batch/v1/batch-api.json @@ -561,7 +561,7 @@ } } }, - "revision": "20230726", + "revision": "20230804", "rootUrl": "https://batch.googleapis.com/", "schemas": { "Accelerator": { @@ -1091,7 +1091,7 @@ "type": "string" }, "image": { - "description": "Name of an image used as the data source. For example, the following are all valid URLs: * Specify the image by its family name: projects/project/global/images/family/image_family * Specify the image version: projects/project/global/images/image_version You can also use Batch customized image in short names. The following image values are supported for a boot disk: * `batch-debian`: use Batch Debian images. * `batch-centos`: use Batch CentOS images. * `batch-cos`: use Batch Container-Optimized images. * `batch-hpc-centos`: use Batch HPC CentOS images.", + "description": "URL for a VM image to use as the data source for this disk. For example, the following are all valid URLs: * Specify the image by its family name: projects/{project}/global/images/family/{image_family} * Specify the image version: projects/{project}/global/images/{image_version} You can also use Batch customized image in short names. The following image values are supported for a boot disk: * `batch-debian`: use Batch Debian images. * `batch-centos`: use Batch CentOS images. * `batch-cos`: use Batch Container-Optimized images. * `batch-hpc-centos`: use Batch HPC CentOS images.", "type": "string" }, "sizeGb": { @@ -1168,7 +1168,7 @@ "description": "Boot disk to be created and attached to each VM by this InstancePolicy. Boot disk will be deleted when the VM is deleted. Batch API now only supports booting from image." }, "disks": { - "description": "Non-boot disks to be attached for each VM created by this InstancePolicy. New disks will be deleted when the VM is deleted. A non bootable disk is a disk that can be of a device with a file system or a raw storage drive that is not ready for data storage and accessing.", + "description": "Non-boot disks to be attached for each VM created by this InstancePolicy. New disks will be deleted when the VM is deleted. A non-boot disk is a disk that can be of a device with a file system or a raw storage drive that is not ready for data storage and accessing.", "items": { "$ref": "AttachedDisk" }, @@ -1669,7 +1669,7 @@ "id": "NetworkInterface", "properties": { "network": { - "description": "The URL of an existing network resource. You can specify the network as a full or partial URL. For example, the following are all valid URLs: https://www.googleapis.com/compute/v1/projects/project/global/networks/network projects/project/global/networks/network global/networks/network ", + "description": "The URL of an existing network resource. You can specify the network as a full or partial URL. For example, the following are all valid URLs: * https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} * projects/{project}/global/networks/{network} * global/networks/{network}", "type": "string" }, "noExternalIpAddress": { @@ -1677,7 +1677,7 @@ "type": "boolean" }, "subnetwork": { - "description": "The URL of an existing subnetwork resource in the network. You can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs: https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork projects/project/regions/region/subnetworks/subnetwork regions/region/subnetworks/subnetwork ", + "description": "The URL of an existing subnetwork resource in the network. You can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs: * https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetwork} * projects/{project}/regions/{region}/subnetworks/{subnetwork} * regions/{region}/subnetworks/{subnetwork}", "type": "string" } }, @@ -1726,7 +1726,7 @@ "description": "Properties of the object. Contains field @type with type URL.", "type": "any" }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", "type": "object" } }, diff --git a/batch/v1/batch-gen.go b/batch/v1/batch-gen.go index b9af5891b4d..cf1da5f88d3 100644 --- a/batch/v1/batch-gen.go +++ b/batch/v1/batch-gen.go @@ -1064,13 +1064,14 @@ type Disk struct { // for local ssds. We only support "SCSI" for persistent disks now. DiskInterface string `json:"diskInterface,omitempty"` - // Image: Name of an image used as the data source. For example, the - // following are all valid URLs: * Specify the image by its family name: - // projects/project/global/images/family/image_family * Specify the - // image version: projects/project/global/images/image_version You can - // also use Batch customized image in short names. The following image - // values are supported for a boot disk: * `batch-debian`: use Batch - // Debian images. * `batch-centos`: use Batch CentOS images. * + // Image: URL for a VM image to use as the data source for this disk. + // For example, the following are all valid URLs: * Specify the image by + // its family name: + // projects/{project}/global/images/family/{image_family} * Specify the + // image version: projects/{project}/global/images/{image_version} You + // can also use Batch customized image in short names. The following + // image values are supported for a boot disk: * `batch-debian`: use + // Batch Debian images. * `batch-centos`: use Batch CentOS images. * // `batch-cos`: use Batch Container-Optimized images. * // `batch-hpc-centos`: use Batch HPC CentOS images. Image string `json:"image,omitempty"` @@ -1209,9 +1210,8 @@ type InstancePolicy struct { // Disks: Non-boot disks to be attached for each VM created by this // InstancePolicy. New disks will be deleted when the VM is deleted. A - // non bootable disk is a disk that can be of a device with a file - // system or a raw storage drive that is not ready for data storage and - // accessing. + // non-boot disk is a disk that can be of a device with a file system or + // a raw storage drive that is not ready for data storage and accessing. Disks []*AttachedDisk `json:"disks,omitempty"` // MachineType: The Compute Engine machine type. @@ -1975,9 +1975,10 @@ func (s *NFS) MarshalJSON() ([]byte, error) { type NetworkInterface struct { // Network: The URL of an existing network resource. You can specify the // network as a full or partial URL. For example, the following are all - // valid URLs: - // https://www.googleapis.com/compute/v1/projects/project/global/networks/network - // projects/project/global/networks/network global/networks/network + // valid URLs: * + // https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} + // * projects/{project}/global/networks/{network} * + // global/networks/{network} Network string `json:"network,omitempty"` // NoExternalIpAddress: Default is false (with an external IP address). @@ -1991,10 +1992,10 @@ type NetworkInterface struct { // Subnetwork: The URL of an existing subnetwork resource in the // network. You can specify the subnetwork as a full or partial URL. For - // example, the following are all valid URLs: - // https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork - // projects/project/regions/region/subnetworks/subnetwork - // regions/region/subnetworks/subnetwork + // example, the following are all valid URLs: * + // https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetwork} + // * projects/{project}/regions/{region}/subnetworks/{subnetwork} * + // regions/{region}/subnetworks/{subnetwork} Subnetwork string `json:"subnetwork,omitempty"` // ForceSendFields is a list of field names (e.g. "Network") to @@ -2075,8 +2076,8 @@ type Operation struct { // `operations/{unique_id}`. Name string `json:"name,omitempty"` - // Response: The normal response of the operation in case of success. If - // the original method returns no data on success, such as `Delete`, the + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the // response is `google.protobuf.Empty`. If the original method is // standard `Get`/`Create`/`Update`, the response should be the // resource. For other methods, the response should have the type diff --git a/compute/v0.beta/compute-api.json b/compute/v0.beta/compute-api.json index 34cdf25f6e7..db43ad80fa7 100644 --- a/compute/v0.beta/compute-api.json +++ b/compute/v0.beta/compute-api.json @@ -4893,6 +4893,358 @@ } } }, + "futureReservations": { + "methods": { + "aggregatedList": { + "description": "Retrieves an aggregated list of future reservations.", + "flatPath": "projects/{project}/aggregated/futureReservations", + "httpMethod": "GET", + "id": "compute.futureReservations.aggregatedList", + "parameterOrder": [ + "project" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + "location": "query", + "type": "string" + }, + "includeAllScopes": { + "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", + "location": "query", + "type": "boolean" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "returnPartialSuccess": { + "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + "location": "query", + "type": "boolean" + } + }, + "path": "projects/{project}/aggregated/futureReservations", + "response": { + "$ref": "FutureReservationsAggregatedListResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "cancel": { + "description": "Cancel the specified future reservation.", + "flatPath": "projects/{project}/zones/{zone}/futureReservations/{futureReservation}/cancel", + "httpMethod": "POST", + "id": "compute.futureReservations.cancel", + "parameterOrder": [ + "project", + "zone", + "futureReservation" + ], + "parameters": { + "futureReservation": { + "description": "Name of the future reservation to retrieve. Name should conform to RFC1035.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "zone": { + "description": "Name of the zone for this request. Name should conform to RFC1035.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/zones/{zone}/futureReservations/{futureReservation}/cancel", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "delete": { + "description": "Deletes the specified future reservation.", + "flatPath": "projects/{project}/zones/{zone}/futureReservations/{futureReservation}", + "httpMethod": "DELETE", + "id": "compute.futureReservations.delete", + "parameterOrder": [ + "project", + "zone", + "futureReservation" + ], + "parameters": { + "futureReservation": { + "description": "Name of the future reservation to retrieve. Name should conform to RFC1035.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "zone": { + "description": "Name of the zone for this request. Name should conform to RFC1035.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/zones/{zone}/futureReservations/{futureReservation}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "description": "Retrieves information about the specified future reservation.", + "flatPath": "projects/{project}/zones/{zone}/futureReservations/{futureReservation}", + "httpMethod": "GET", + "id": "compute.futureReservations.get", + "parameterOrder": [ + "project", + "zone", + "futureReservation" + ], + "parameters": { + "futureReservation": { + "description": "Name of the future reservation to retrieve. Name should conform to RFC1035.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "zone": { + "description": "Name of the zone for this request. Name should conform to RFC1035.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/zones/{zone}/futureReservations/{futureReservation}", + "response": { + "$ref": "FutureReservation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "description": "Creates a new Future Reservation.", + "flatPath": "projects/{project}/zones/{zone}/futureReservations", + "httpMethod": "POST", + "id": "compute.futureReservations.insert", + "parameterOrder": [ + "project", + "zone" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "zone": { + "description": "Name of the zone for this request. Name should conform to RFC1035.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/zones/{zone}/futureReservations", + "request": { + "$ref": "FutureReservation" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "description": "A list of all the future reservations that have been configured for the specified project in specified zone.", + "flatPath": "projects/{project}/zones/{zone}/futureReservations", + "httpMethod": "GET", + "id": "compute.futureReservations.list", + "parameterOrder": [ + "project", + "zone" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "returnPartialSuccess": { + "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + "location": "query", + "type": "boolean" + }, + "zone": { + "description": "Name of the zone for this request. Name should conform to RFC1035.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/zones/{zone}/futureReservations", + "response": { + "$ref": "FutureReservationsListResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "update": { + "description": "Updates the specified future reservation.", + "flatPath": "projects/{project}/zones/{zone}/futureReservations/{futureReservation}", + "httpMethod": "PATCH", + "id": "compute.futureReservations.update", + "parameterOrder": [ + "project", + "zone", + "futureReservation" + ], + "parameters": { + "futureReservation": { + "description": "Name of the reservation to update. Name should conform to RFC1035.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "update_mask indicates fields to be updated as part of this request.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "zone": { + "description": "Name of the zone for this request. Name should conform to RFC1035.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/zones/{zone}/futureReservations/{futureReservation}", + "request": { + "$ref": "FutureReservation" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + } + } + }, "globalAddresses": { "methods": { "delete": { @@ -38788,7 +39140,7 @@ } } }, - "revision": "20230725", + "revision": "20230801", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AWSV4Signature": { @@ -47819,6 +48171,757 @@ }, "type": "object" }, + "FutureReservation": { + "id": "FutureReservation", + "properties": { + "autoCreatedReservationsDeleteTime": { + "description": "Future timestamp when the FR auto-created reservations will be deleted by GCE. Format of this field must be a valid href=\"https://www.ietf.org/rfc/rfc3339.txt\"\u003eRFC3339 value.", + "type": "string" + }, + "autoCreatedReservationsDuration": { + "$ref": "Duration", + "description": "Specifies the duration of auto-created reservations. It represents relative time to future reservation start_time when auto-created reservations will be automatically deleted by GCE. Duration time unit is represented as a count of seconds and fractions of seconds at nanosecond resolution." + }, + "autoDeleteAutoCreatedReservations": { + "description": "Setting for enabling or disabling automatic deletion for auto-created reservation. If omitted or set to true, auto-created reservations will be deleted at Future Reservation's end time (default) or at user's defined timestamp if any of the [auto_created_reservations_delete_time, auto_created_reservations_duration] values is specified. For keeping auto-created reservation indefinitely, this value should be set to false.", + "type": "boolean" + }, + "creationTimestamp": { + "description": "[Output Only] The creation timestamp for this future reservation in RFC3339 text format.", + "type": "string" + }, + "description": { + "description": "An optional description of this resource. Provide this property when you create the future reservation.", + "type": "string" + }, + "id": { + "description": "[Output Only] A unique identifier for this future reservation. The server defines this identifier.", + "format": "uint64", + "type": "string" + }, + "kind": { + "default": "compute#futureReservation", + "description": "[Output Only] Type of the resource. Always compute#futureReservation for future reservations.", + "type": "string" + }, + "name": { + "annotations": { + "required": [ + "compute.instances.insert" + ] + }, + "description": "The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "type": "string" + }, + "namePrefix": { + "description": "Name prefix for the reservations to be created at the time of delivery. The name prefix must comply with RFC1035. Maximum allowed length for name prefix is 20. Automatically created reservations name format will be -date-####.", + "type": "string" + }, + "planningStatus": { + "description": "Planning state before being submitted for evaluation", + "enum": [ + "DRAFT", + "PLANNING_STATUS_UNSPECIFIED", + "SUBMITTED" + ], + "enumDescriptions": [ + "Future Reservation is being drafted.", + "", + "Future Reservation has been submitted for evaluation by GCP." + ], + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined fully-qualified URL for this resource.", + "type": "string" + }, + "selfLinkWithId": { + "description": "[Output Only] Server-defined URL for this resource with the resource id.", + "type": "string" + }, + "shareSettings": { + "$ref": "ShareSettings", + "description": "List of Projects/Folders to share with." + }, + "specificSkuProperties": { + "$ref": "FutureReservationSpecificSKUProperties", + "description": "Future Reservation configuration to indicate instance properties and total count." + }, + "status": { + "$ref": "FutureReservationStatus", + "description": "[Output only] Status of the Future Reservation" + }, + "timeWindow": { + "$ref": "FutureReservationTimeWindow", + "description": "Time window for this Future Reservation." + }, + "zone": { + "description": "[Output Only] URL of the Zone where this future reservation resides.", + "type": "string" + } + }, + "type": "object" + }, + "FutureReservationSpecificSKUProperties": { + "id": "FutureReservationSpecificSKUProperties", + "properties": { + "instanceProperties": { + "$ref": "AllocationSpecificSKUAllocationReservedInstanceProperties", + "description": "Properties of the SKU instances being reserved." + }, + "sourceInstanceTemplate": { + "description": "The instance template that will be used to populate the ReservedInstanceProperties of the future reservation", + "type": "string" + }, + "totalCount": { + "description": "Total number of instances for which capacity assurance is requested at a future time period.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "FutureReservationStatus": { + "description": "[Output only] Represents status related to the future reservation.", + "id": "FutureReservationStatus", + "properties": { + "amendmentStatus": { + "description": "[Output Only] The current status of the requested amendment.", + "enum": [ + "AMENDMENT_APPROVED", + "AMENDMENT_DECLINED", + "AMENDMENT_IN_REVIEW", + "AMENDMENT_STATUS_UNSPECIFIED" + ], + "enumDescriptions": [ + "The requested amendment to the Future Resevation has been approved and applied by GCP.", + "The requested amendment to the Future Reservation has been declined by GCP and the original state was restored.", + "The requested amendment to the Future Reservation is currently being reviewd by GCP.", + "" + ], + "type": "string" + }, + "autoCreatedReservations": { + "description": "Fully qualified urls of the automatically created reservations at start_time.", + "items": { + "type": "string" + }, + "type": "array" + }, + "fulfilledCount": { + "description": "This count indicates the fulfilled capacity so far. This is set during \"PROVISIONING\" state. This count also includes capacity delivered as part of existing matching reservations.", + "format": "int64", + "type": "string" + }, + "lastKnownGoodState": { + "$ref": "FutureReservationStatusLastKnownGoodState", + "description": "[Output Only] This field represents the future reservation before an amendment was requested. If the amendment is declined, the Future Reservation will be reverted to the last known good state. The last known good state is not set when updating a future reservation whose Procurement Status is DRAFTING." + }, + "lockTime": { + "description": "Time when Future Reservation would become LOCKED, after which no modifications to Future Reservation will be allowed. Applicable only after the Future Reservation is in the APPROVED state. The lock_time is an RFC3339 string. The procurement_status will transition to PROCURING state at this time.", + "type": "string" + }, + "procurementStatus": { + "description": "Current state of this Future Reservation", + "enum": [ + "APPROVED", + "CANCELLED", + "COMMITTED", + "DECLINED", + "DRAFTING", + "FAILED", + "FAILED_PARTIALLY_FULFILLED", + "FULFILLED", + "PENDING_AMENDMENT_APPROVAL", + "PENDING_APPROVAL", + "PROCUREMENT_STATUS_UNSPECIFIED", + "PROCURING", + "PROVISIONING" + ], + "enumDescriptions": [ + "Future reservation is approved by GCP.", + "Future reservation is cancelled by the customer.", + "Future reservation is committed by the customer.", + "Future reservation is rejected by GCP.", + "Related status for PlanningStatus.Draft. Transitions to PENDING_APPROVAL upon user submitting FR.", + "Future reservation failed. No additional reservations were provided.", + "Future reservation is partially fulfilled. Additional reservations were provided but did not reach total_count reserved instance slots.", + "Future reservation is fulfilled completely.", + "An Amendment to the Future Reservation has been requested. If the Amendment is declined, the Future Reservation will be restored to the last known good state.", + "Future reservation is pending approval by GCP.", + "", + "Future reservation is being procured by GCP. Beyond this point, Future reservation is locked and no further modifications are allowed.", + "Future reservation capacity is being provisioned. This state will be entered after start_time, while reservations are being created to provide total_count reserved instance slots. This state will not persist past start_time + 24h." + ], + "type": "string" + }, + "specificSkuProperties": { + "$ref": "FutureReservationStatusSpecificSKUProperties" + } + }, + "type": "object" + }, + "FutureReservationStatusLastKnownGoodState": { + "description": "The state that the future reservation will be reverted to should the amendment be declined.", + "id": "FutureReservationStatusLastKnownGoodState", + "properties": { + "description": { + "description": "[Output Only] The description of the FutureReservation before an amendment was requested.", + "type": "string" + }, + "futureReservationSpecs": { + "$ref": "FutureReservationStatusLastKnownGoodStateFutureReservationSpecs" + }, + "lockTime": { + "description": "[Output Only] The lock time of the FutureReservation before an amendment was requested.", + "type": "string" + }, + "namePrefix": { + "description": "[Output Only] The name prefix of the Future Reservation before an amendment was requested.", + "type": "string" + }, + "procurementStatus": { + "description": "[Output Only] The status of the last known good state for the Future Reservation.", + "enum": [ + "APPROVED", + "CANCELLED", + "COMMITTED", + "DECLINED", + "DRAFTING", + "FAILED", + "FAILED_PARTIALLY_FULFILLED", + "FULFILLED", + "PENDING_AMENDMENT_APPROVAL", + "PENDING_APPROVAL", + "PROCUREMENT_STATUS_UNSPECIFIED", + "PROCURING", + "PROVISIONING" + ], + "enumDescriptions": [ + "Future reservation is approved by GCP.", + "Future reservation is cancelled by the customer.", + "Future reservation is committed by the customer.", + "Future reservation is rejected by GCP.", + "Related status for PlanningStatus.Draft. Transitions to PENDING_APPROVAL upon user submitting FR.", + "Future reservation failed. No additional reservations were provided.", + "Future reservation is partially fulfilled. Additional reservations were provided but did not reach total_count reserved instance slots.", + "Future reservation is fulfilled completely.", + "An Amendment to the Future Reservation has been requested. If the Amendment is declined, the Future Reservation will be restored to the last known good state.", + "Future reservation is pending approval by GCP.", + "", + "Future reservation is being procured by GCP. Beyond this point, Future reservation is locked and no further modifications are allowed.", + "Future reservation capacity is being provisioned. This state will be entered after start_time, while reservations are being created to provide total_count reserved instance slots. This state will not persist past start_time + 24h." + ], + "type": "string" + } + }, + "type": "object" + }, + "FutureReservationStatusLastKnownGoodStateFutureReservationSpecs": { + "description": "The properties of the last known good state for the Future Reservation.", + "id": "FutureReservationStatusLastKnownGoodStateFutureReservationSpecs", + "properties": { + "shareSettings": { + "$ref": "ShareSettings", + "description": "[Output Only] The previous share settings of the Future Reservation." + }, + "specificSkuProperties": { + "$ref": "FutureReservationSpecificSKUProperties", + "description": "[Output Only] The previous instance related properties of the Future Reservation." + }, + "timeWindow": { + "$ref": "FutureReservationTimeWindow", + "description": "[Output Only] The previous time window of the Future Reservation." + } + }, + "type": "object" + }, + "FutureReservationStatusSpecificSKUProperties": { + "description": "Properties to be set for the Future Reservation.", + "id": "FutureReservationStatusSpecificSKUProperties", + "properties": { + "sourceInstanceTemplateId": { + "description": "ID of the instance template used to populate the Future Reservation properties.", + "type": "string" + } + }, + "type": "object" + }, + "FutureReservationTimeWindow": { + "id": "FutureReservationTimeWindow", + "properties": { + "duration": { + "$ref": "Duration" + }, + "endTime": { + "type": "string" + }, + "startTime": { + "description": "Start time of the Future Reservation. The start_time is an RFC3339 string.", + "type": "string" + } + }, + "type": "object" + }, + "FutureReservationsAggregatedListResponse": { + "description": "Contains a list of future reservations.", + "id": "FutureReservationsAggregatedListResponse", + "properties": { + "etag": { + "type": "string" + }, + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "additionalProperties": { + "$ref": "FutureReservationsScopedList", + "description": "Name of the scope containing this set of future reservations." + }, + "description": "A list of Future reservation resources.", + "type": "object" + }, + "kind": { + "default": "compute#futureReservationsAggregatedListResponse", + "description": "[Output Only] Type of resource. Always compute#futureReservationsAggregatedListResponse for future resevation aggregated list response.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "unreachables": { + "description": "[Output Only] Unreachable resources.", + "items": { + "type": "string" + }, + "type": "array" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", + "LARGE_DEPLOYMENT_WARNING", + "LIST_OVERHEAD_QUOTA_EXCEED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "PARTIAL_SUCCESS", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDeprecated": [ + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false + ], + "enumDescriptions": [ + "Warning about failed cleanup of transient changes made by a failed operation.", + "A link to a deprecated resource was created.", + "When deploying and at least one of the resources has a type marked as deprecated", + "The user created a boot disk that is larger than image size.", + "When deploying and at least one of the resources has a type marked as experimental", + "Warning that is present in an external api call", + "Warning that value of a field has been overridden. Deprecated unused field.", + "The operation involved use of an injected kernel, which is deprecated.", + "A WEIGHTED_MAGLEV backend service is associated with a health check that is not of type HTTP/HTTPS/HTTP2.", + "When deploying a deployment with a exceedingly large number of resources", + "Resource can't be retrieved due to list overhead quota exceed which captures the amount of resources filtered out by user-defined list filter.", + "A resource depends on a missing type", + "The route's nextHopIp address is not assigned to an instance on the network.", + "The route's next hop instance cannot ip forward.", + "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route.", + "The route's nextHopInstance URL refers to an instance that does not exist.", + "The route's nextHopInstance URL refers to an instance that is not on the same network as the route.", + "The route's next hop instance does not have a status of RUNNING.", + "Error which is not critical. We decided to continue the process despite the mentioned error.", + "No results are present on a particular list page.", + "Success is reported, but some results may be missing due to errors", + "The user attempted to use a resource that requires a TOS they have not accepted.", + "Warning that a resource is in use.", + "One or more of the resources set to auto-delete could not be deleted because they were in use.", + "When a resource schema validation is ignored.", + "Instance template used in instance group manager is valid as such, but its application does not make a lot of sense, because it allows only single instance in instance group.", + "When undeclared properties in the schema are present", + "A given scope cannot be reached." + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example: \"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" } ", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "FutureReservationsListResponse": { + "id": "FutureReservationsListResponse", + "properties": { + "etag": { + "type": "string" + }, + "id": { + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "type": "string" + }, + "items": { + "description": "[Output Only] A list of future reservation resources.", + "items": { + "$ref": "FutureReservation" + }, + "type": "array" + }, + "kind": { + "default": "compute#futureReservationsListResponse", + "description": "[Output Only] Type of resource.Always compute#FutureReservationsListResponse for lists of reservations", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "unreachables": { + "description": "[Output Only] Unreachable resources.", + "items": { + "type": "string" + }, + "type": "array" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", + "LARGE_DEPLOYMENT_WARNING", + "LIST_OVERHEAD_QUOTA_EXCEED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "PARTIAL_SUCCESS", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDeprecated": [ + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false + ], + "enumDescriptions": [ + "Warning about failed cleanup of transient changes made by a failed operation.", + "A link to a deprecated resource was created.", + "When deploying and at least one of the resources has a type marked as deprecated", + "The user created a boot disk that is larger than image size.", + "When deploying and at least one of the resources has a type marked as experimental", + "Warning that is present in an external api call", + "Warning that value of a field has been overridden. Deprecated unused field.", + "The operation involved use of an injected kernel, which is deprecated.", + "A WEIGHTED_MAGLEV backend service is associated with a health check that is not of type HTTP/HTTPS/HTTP2.", + "When deploying a deployment with a exceedingly large number of resources", + "Resource can't be retrieved due to list overhead quota exceed which captures the amount of resources filtered out by user-defined list filter.", + "A resource depends on a missing type", + "The route's nextHopIp address is not assigned to an instance on the network.", + "The route's next hop instance cannot ip forward.", + "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route.", + "The route's nextHopInstance URL refers to an instance that does not exist.", + "The route's nextHopInstance URL refers to an instance that is not on the same network as the route.", + "The route's next hop instance does not have a status of RUNNING.", + "Error which is not critical. We decided to continue the process despite the mentioned error.", + "No results are present on a particular list page.", + "Success is reported, but some results may be missing due to errors", + "The user attempted to use a resource that requires a TOS they have not accepted.", + "Warning that a resource is in use.", + "One or more of the resources set to auto-delete could not be deleted because they were in use.", + "When a resource schema validation is ignored.", + "Instance template used in instance group manager is valid as such, but its application does not make a lot of sense, because it allows only single instance in instance group.", + "When undeclared properties in the schema are present", + "A given scope cannot be reached." + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example: \"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" } ", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "FutureReservationsScopedList": { + "id": "FutureReservationsScopedList", + "properties": { + "futureReservations": { + "description": "A list of future reservations contained in this scope.", + "items": { + "$ref": "FutureReservation" + }, + "type": "array" + }, + "warning": { + "description": "Informational warning which replaces the list of future reservations when the list is empty.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", + "LARGE_DEPLOYMENT_WARNING", + "LIST_OVERHEAD_QUOTA_EXCEED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "PARTIAL_SUCCESS", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDeprecated": [ + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false + ], + "enumDescriptions": [ + "Warning about failed cleanup of transient changes made by a failed operation.", + "A link to a deprecated resource was created.", + "When deploying and at least one of the resources has a type marked as deprecated", + "The user created a boot disk that is larger than image size.", + "When deploying and at least one of the resources has a type marked as experimental", + "Warning that is present in an external api call", + "Warning that value of a field has been overridden. Deprecated unused field.", + "The operation involved use of an injected kernel, which is deprecated.", + "A WEIGHTED_MAGLEV backend service is associated with a health check that is not of type HTTP/HTTPS/HTTP2.", + "When deploying a deployment with a exceedingly large number of resources", + "Resource can't be retrieved due to list overhead quota exceed which captures the amount of resources filtered out by user-defined list filter.", + "A resource depends on a missing type", + "The route's nextHopIp address is not assigned to an instance on the network.", + "The route's next hop instance cannot ip forward.", + "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route.", + "The route's nextHopInstance URL refers to an instance that does not exist.", + "The route's nextHopInstance URL refers to an instance that is not on the same network as the route.", + "The route's next hop instance does not have a status of RUNNING.", + "Error which is not critical. We decided to continue the process despite the mentioned error.", + "No results are present on a particular list page.", + "Success is reported, but some results may be missing due to errors", + "The user attempted to use a resource that requires a TOS they have not accepted.", + "Warning that a resource is in use.", + "One or more of the resources set to auto-delete could not be deleted because they were in use.", + "When a resource schema validation is ignored.", + "Instance template used in instance group manager is valid as such, but its application does not make a lot of sense, because it allows only single instance in instance group.", + "When undeclared properties in the schema are present", + "A given scope cannot be reached." + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example: \"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" } ", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, "GRPCHealthCheck": { "id": "GRPCHealthCheck", "properties": { @@ -65531,7 +66634,7 @@ "type": "object" }, "Policy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", "properties": { "auditConfigs": { @@ -68764,6 +69867,14 @@ "description": "[Output Only] Creation timestamp in RFC3339 text format.", "type": "string" }, + "deleteAfterDuration": { + "$ref": "Duration", + "description": "Duration time relative to reservation creation when GCE will automatically delete this resource." + }, + "deleteAtTime": { + "description": "Absolute time in future when the reservation will be auto-deleted by GCE. Timestamp is represented in RFC3339 text format.", + "type": "string" + }, "description": { "description": "An optional description of this resource. Provide this property when you create the resource.", "type": "string" @@ -70262,7 +71373,7 @@ "compute.routes.insert" ] }, - "description": "The destination range of outgoing packets that this route applies to. Both IPv4 and IPv6 are supported.", + "description": "The destination range of outgoing packets that this route applies to. Both IPv4 and IPv6 are supported. Must specify an IPv4 range (e.g. 192.0.2.0/24) or an IPv6 range in RFC 4291 format (e.g. 2001:db8::/32). IPv6 range will be displayed using RFC 5952 compressed format.", "type": "string" }, "id": { @@ -70315,7 +71426,7 @@ "type": "string" }, "nextHopIp": { - "description": "The network IP address of an instance that should handle matching packets. Only IPv4 is supported.", + "description": "The network IP address of an instance that should handle matching packets. Both IPv6 address and IPv4 addresses are supported. Must specify an IPv4 address in dot-decimal notation (e.g. 192.0.2.99) or an IPv6 address in RFC 4291 format (e.g. 2001:db8::2d9:51:0:0 or 2001:db8:0:0:2d9:51:0:0). IPv6 addresses will be displayed using RFC 5952 compressed format (e.g. 2001:db8::2d9:51:0:0). Should never be an IPv4-mapped IPv6 address.", "type": "string" }, "nextHopNetwork": { diff --git a/compute/v0.beta/compute-gen.go b/compute/v0.beta/compute-gen.go index 60d4ef19e0b..df5c97f76be 100644 --- a/compute/v0.beta/compute-gen.go +++ b/compute/v0.beta/compute-gen.go @@ -156,6 +156,7 @@ func New(client *http.Client) (*Service, error) { s.FirewallPolicies = NewFirewallPoliciesService(s) s.Firewalls = NewFirewallsService(s) s.ForwardingRules = NewForwardingRulesService(s) + s.FutureReservations = NewFutureReservationsService(s) s.GlobalAddresses = NewGlobalAddressesService(s) s.GlobalForwardingRules = NewGlobalForwardingRulesService(s) s.GlobalNetworkEndpointGroups = NewGlobalNetworkEndpointGroupsService(s) @@ -273,6 +274,8 @@ type Service struct { ForwardingRules *ForwardingRulesService + FutureReservations *FutureReservationsService + GlobalAddresses *GlobalAddressesService GlobalForwardingRules *GlobalForwardingRulesService @@ -554,6 +557,15 @@ type ForwardingRulesService struct { s *Service } +func NewFutureReservationsService(s *Service) *FutureReservationsService { + rs := &FutureReservationsService{s: s} + return rs +} + +type FutureReservationsService struct { + s *Service +} + func NewGlobalAddressesService(s *Service) *GlobalAddressesService { rs := &GlobalAddressesService{s: s} return rs @@ -14497,130 +14509,146 @@ func (s *ForwardingRulesScopedListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type GRPCHealthCheck struct { - // GrpcServiceName: The gRPC service name for the health check. This - // field is optional. The value of grpc_service_name has the following - // meanings by convention: - Empty service_name means the overall status - // of all services at the backend. - Non-empty service_name means the - // health of that gRPC service, as defined by the owner of the service. - // The grpc_service_name can only be ASCII. - GrpcServiceName string `json:"grpcServiceName,omitempty"` +type FutureReservation struct { + // AutoCreatedReservationsDeleteTime: Future timestamp when the FR + // auto-created reservations will be deleted by GCE. Format of this + // field must be a valid + // href="https://www.ietf.org/rfc/rfc3339.txt">RFC3339 value. + AutoCreatedReservationsDeleteTime string `json:"autoCreatedReservationsDeleteTime,omitempty"` - // Port: The TCP port number to which the health check prober sends - // packets. Valid values are 1 through 65535. - Port int64 `json:"port,omitempty"` + // AutoCreatedReservationsDuration: Specifies the duration of + // auto-created reservations. It represents relative time to future + // reservation start_time when auto-created reservations will be + // automatically deleted by GCE. Duration time unit is represented as a + // count of seconds and fractions of seconds at nanosecond resolution. + AutoCreatedReservationsDuration *Duration `json:"autoCreatedReservationsDuration,omitempty"` - // PortName: Not supported. - PortName string `json:"portName,omitempty"` + // AutoDeleteAutoCreatedReservations: Setting for enabling or disabling + // automatic deletion for auto-created reservation. If omitted or set to + // true, auto-created reservations will be deleted at Future + // Reservation's end time (default) or at user's defined timestamp if + // any of the [auto_created_reservations_delete_time, + // auto_created_reservations_duration] values is specified. For keeping + // auto-created reservation indefinitely, this value should be set to + // false. + AutoDeleteAutoCreatedReservations bool `json:"autoDeleteAutoCreatedReservations,omitempty"` - // PortSpecification: Specifies how a port is selected for health - // checking. Can be one of the following values: USE_FIXED_PORT: - // Specifies a port number explicitly using the port field in the health - // check. Supported by backend services for pass-through load balancers - // and backend services for proxy load balancers. Not supported by - // target pools. The health check supports all backends supported by the - // backend service provided the backend can be health checked. For - // example, GCE_VM_IP network endpoint groups, GCE_VM_IP_PORT network - // endpoint groups, and instance group backends. USE_NAMED_PORT: Not - // supported. USE_SERVING_PORT: Provides an indirect method of - // specifying the health check port by referring to the backend service. - // Only supported by backend services for proxy load balancers. Not - // supported by target pools. Not supported by backend services for - // pass-through load balancers. Supports all backends that can be health - // checked; for example, GCE_VM_IP_PORT network endpoint groups and - // instance group backends. For GCE_VM_IP_PORT network endpoint group - // backends, the health check uses the port number specified for each - // endpoint in the network endpoint group. For instance group backends, - // the health check uses the port number determined by looking up the - // backend service's named port in the instance group's list of named - // ports. + // CreationTimestamp: [Output Only] The creation timestamp for this + // future reservation in RFC3339 text format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: An optional description of this resource. Provide this + // property when you create the future reservation. + Description string `json:"description,omitempty"` + + // Id: [Output Only] A unique identifier for this future reservation. + // The server defines this identifier. + Id uint64 `json:"id,omitempty,string"` + + // Kind: [Output Only] Type of the resource. Always + // compute#futureReservation for future reservations. + Kind string `json:"kind,omitempty"` + + // Name: The name of the resource, provided by the client when initially + // creating the resource. The resource name must be 1-63 characters + // long, and comply with RFC1035. Specifically, the name must be 1-63 + // characters long and match the regular expression + // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be + // a lowercase letter, and all following characters must be a dash, + // lowercase letter, or digit, except the last character, which cannot + // be a dash. + Name string `json:"name,omitempty"` + + // NamePrefix: Name prefix for the reservations to be created at the + // time of delivery. The name prefix must comply with RFC1035. Maximum + // allowed length for name prefix is 20. Automatically created + // reservations name format will be -date-####. + NamePrefix string `json:"namePrefix,omitempty"` + + // PlanningStatus: Planning state before being submitted for evaluation // // Possible values: - // "USE_FIXED_PORT" - The port number in the health check's port is - // used for health checking. Applies to network endpoint group and - // instance group backends. - // "USE_NAMED_PORT" - Not supported. - // "USE_SERVING_PORT" - For network endpoint group backends, the - // health check uses the port number specified on each endpoint in the - // network endpoint group. For instance group backends, the health check - // uses the port number specified for the backend service's named port - // defined in the instance group's named ports. - PortSpecification string `json:"portSpecification,omitempty"` + // "DRAFT" - Future Reservation is being drafted. + // "PLANNING_STATUS_UNSPECIFIED" + // "SUBMITTED" - Future Reservation has been submitted for evaluation + // by GCP. + PlanningStatus string `json:"planningStatus,omitempty"` - // ForceSendFields is a list of field names (e.g. "GrpcServiceName") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` + // SelfLink: [Output Only] Server-defined fully-qualified URL for this + // resource. + SelfLink string `json:"selfLink,omitempty"` - // NullFields is a list of field names (e.g. "GrpcServiceName") 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:"-"` -} + // SelfLinkWithId: [Output Only] Server-defined URL for this resource + // with the resource id. + SelfLinkWithId string `json:"selfLinkWithId,omitempty"` -func (s *GRPCHealthCheck) MarshalJSON() ([]byte, error) { - type NoMethod GRPCHealthCheck - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // ShareSettings: List of Projects/Folders to share with. + ShareSettings *ShareSettings `json:"shareSettings,omitempty"` -type GlobalAddressesMoveRequest struct { - // Description: An optional destination address description if intended - // to be different from the source. - Description string `json:"description,omitempty"` + // SpecificSkuProperties: Future Reservation configuration to indicate + // instance properties and total count. + SpecificSkuProperties *FutureReservationSpecificSKUProperties `json:"specificSkuProperties,omitempty"` - // DestinationAddress: The URL of the destination address to move to. - // This can be a full or partial URL. For example, the following are all - // valid URLs to a address: - - // https://www.googleapis.com/compute/v1/projects/project - // /global/addresses/address - projects/project/global/addresses/address - // Note that destination project must be different from the source - // project. So /global/addresses/address is not valid partial url. - DestinationAddress string `json:"destinationAddress,omitempty"` + // Status: [Output only] Status of the Future Reservation + Status *FutureReservationStatus `json:"status,omitempty"` - // ForceSendFields is a list of field names (e.g. "Description") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // TimeWindow: Time window for this Future Reservation. + TimeWindow *FutureReservationTimeWindow `json:"timeWindow,omitempty"` + + // Zone: [Output Only] URL of the Zone where this future reservation + // resides. + Zone string `json:"zone,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "AutoCreatedReservationsDeleteTime") to unconditionally include in + // API requests. By default, fields with empty or default values are + // omitted from API requests. However, any non-pointer, non-interface + // field appearing in ForceSendFields will be sent to the server + // regardless of whether the field is empty or not. This may be used to + // include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. + // "AutoCreatedReservationsDeleteTime") 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 *GlobalAddressesMoveRequest) MarshalJSON() ([]byte, error) { - type NoMethod GlobalAddressesMoveRequest +func (s *FutureReservation) MarshalJSON() ([]byte, error) { + type NoMethod FutureReservation raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type GlobalNetworkEndpointGroupsAttachEndpointsRequest struct { - // NetworkEndpoints: The list of network endpoints to be attached. - NetworkEndpoints []*NetworkEndpoint `json:"networkEndpoints,omitempty"` +type FutureReservationSpecificSKUProperties struct { + // InstanceProperties: Properties of the SKU instances being reserved. + InstanceProperties *AllocationSpecificSKUAllocationReservedInstanceProperties `json:"instanceProperties,omitempty"` - // ForceSendFields is a list of field names (e.g. "NetworkEndpoints") to - // unconditionally include in API requests. By default, fields with + // SourceInstanceTemplate: The instance template that will be used to + // populate the ReservedInstanceProperties of the future reservation + SourceInstanceTemplate string `json:"sourceInstanceTemplate,omitempty"` + + // TotalCount: Total number of instances for which capacity assurance is + // requested at a future time period. + TotalCount int64 `json:"totalCount,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "InstanceProperties") + // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NetworkEndpoints") to + // NullFields is a list of field names (e.g. "InstanceProperties") 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 @@ -14630,17 +14658,84 @@ type GlobalNetworkEndpointGroupsAttachEndpointsRequest struct { NullFields []string `json:"-"` } -func (s *GlobalNetworkEndpointGroupsAttachEndpointsRequest) MarshalJSON() ([]byte, error) { - type NoMethod GlobalNetworkEndpointGroupsAttachEndpointsRequest +func (s *FutureReservationSpecificSKUProperties) MarshalJSON() ([]byte, error) { + type NoMethod FutureReservationSpecificSKUProperties raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type GlobalNetworkEndpointGroupsDetachEndpointsRequest struct { - // NetworkEndpoints: The list of network endpoints to be detached. - NetworkEndpoints []*NetworkEndpoint `json:"networkEndpoints,omitempty"` +// FutureReservationStatus: [Output only] Represents status related to +// the future reservation. +type FutureReservationStatus struct { + // AmendmentStatus: [Output Only] The current status of the requested + // amendment. + // + // Possible values: + // "AMENDMENT_APPROVED" - The requested amendment to the Future + // Resevation has been approved and applied by GCP. + // "AMENDMENT_DECLINED" - The requested amendment to the Future + // Reservation has been declined by GCP and the original state was + // restored. + // "AMENDMENT_IN_REVIEW" - The requested amendment to the Future + // Reservation is currently being reviewd by GCP. + // "AMENDMENT_STATUS_UNSPECIFIED" + AmendmentStatus string `json:"amendmentStatus,omitempty"` + + // AutoCreatedReservations: Fully qualified urls of the automatically + // created reservations at start_time. + AutoCreatedReservations []string `json:"autoCreatedReservations,omitempty"` + + // FulfilledCount: This count indicates the fulfilled capacity so far. + // This is set during "PROVISIONING" state. This count also includes + // capacity delivered as part of existing matching reservations. + FulfilledCount int64 `json:"fulfilledCount,omitempty,string"` + + // LastKnownGoodState: [Output Only] This field represents the future + // reservation before an amendment was requested. If the amendment is + // declined, the Future Reservation will be reverted to the last known + // good state. The last known good state is not set when updating a + // future reservation whose Procurement Status is DRAFTING. + LastKnownGoodState *FutureReservationStatusLastKnownGoodState `json:"lastKnownGoodState,omitempty"` + + // LockTime: Time when Future Reservation would become LOCKED, after + // which no modifications to Future Reservation will be allowed. + // Applicable only after the Future Reservation is in the APPROVED + // state. The lock_time is an RFC3339 string. The procurement_status + // will transition to PROCURING state at this time. + LockTime string `json:"lockTime,omitempty"` + + // ProcurementStatus: Current state of this Future Reservation + // + // Possible values: + // "APPROVED" - Future reservation is approved by GCP. + // "CANCELLED" - Future reservation is cancelled by the customer. + // "COMMITTED" - Future reservation is committed by the customer. + // "DECLINED" - Future reservation is rejected by GCP. + // "DRAFTING" - Related status for PlanningStatus.Draft. Transitions + // to PENDING_APPROVAL upon user submitting FR. + // "FAILED" - Future reservation failed. No additional reservations + // were provided. + // "FAILED_PARTIALLY_FULFILLED" - Future reservation is partially + // fulfilled. Additional reservations were provided but did not reach + // total_count reserved instance slots. + // "FULFILLED" - Future reservation is fulfilled completely. + // "PENDING_AMENDMENT_APPROVAL" - An Amendment to the Future + // Reservation has been requested. If the Amendment is declined, the + // Future Reservation will be restored to the last known good state. + // "PENDING_APPROVAL" - Future reservation is pending approval by GCP. + // "PROCUREMENT_STATUS_UNSPECIFIED" + // "PROCURING" - Future reservation is being procured by GCP. Beyond + // this point, Future reservation is locked and no further modifications + // are allowed. + // "PROVISIONING" - Future reservation capacity is being provisioned. + // This state will be entered after start_time, while reservations are + // being created to provide total_count reserved instance slots. This + // state will not persist past start_time + 24h. + ProcurementStatus string `json:"procurementStatus,omitempty"` - // ForceSendFields is a list of field names (e.g. "NetworkEndpoints") to + SpecificSkuProperties *FutureReservationStatusSpecificSKUProperties `json:"specificSkuProperties,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AmendmentStatus") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -14648,7 +14743,7 @@ type GlobalNetworkEndpointGroupsDetachEndpointsRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NetworkEndpoints") to + // NullFields is a list of field names (e.g. "AmendmentStatus") 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 @@ -14658,28 +14753,60 @@ type GlobalNetworkEndpointGroupsDetachEndpointsRequest struct { NullFields []string `json:"-"` } -func (s *GlobalNetworkEndpointGroupsDetachEndpointsRequest) MarshalJSON() ([]byte, error) { - type NoMethod GlobalNetworkEndpointGroupsDetachEndpointsRequest +func (s *FutureReservationStatus) MarshalJSON() ([]byte, error) { + type NoMethod FutureReservationStatus raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type GlobalOrganizationSetPolicyRequest struct { - // Bindings: Flatten Policy to create a backward compatible wire-format. - // Deprecated. Use 'policy' to specify bindings. - Bindings []*Binding `json:"bindings,omitempty"` +// FutureReservationStatusLastKnownGoodState: The state that the future +// reservation will be reverted to should the amendment be declined. +type FutureReservationStatusLastKnownGoodState struct { + // Description: [Output Only] The description of the FutureReservation + // before an amendment was requested. + Description string `json:"description,omitempty"` - // Etag: Flatten Policy to create a backward compatible wire-format. - // Deprecated. Use 'policy' to specify the etag. - Etag string `json:"etag,omitempty"` + FutureReservationSpecs *FutureReservationStatusLastKnownGoodStateFutureReservationSpecs `json:"futureReservationSpecs,omitempty"` - // Policy: REQUIRED: The complete policy to be applied to the - // 'resource'. The size of the policy is limited to a few 10s of KB. An - // empty policy is in general a valid policy but certain services (like - // Projects) might reject them. - Policy *Policy `json:"policy,omitempty"` + // LockTime: [Output Only] The lock time of the FutureReservation before + // an amendment was requested. + LockTime string `json:"lockTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "Bindings") to + // NamePrefix: [Output Only] The name prefix of the Future Reservation + // before an amendment was requested. + NamePrefix string `json:"namePrefix,omitempty"` + + // ProcurementStatus: [Output Only] The status of the last known good + // state for the Future Reservation. + // + // Possible values: + // "APPROVED" - Future reservation is approved by GCP. + // "CANCELLED" - Future reservation is cancelled by the customer. + // "COMMITTED" - Future reservation is committed by the customer. + // "DECLINED" - Future reservation is rejected by GCP. + // "DRAFTING" - Related status for PlanningStatus.Draft. Transitions + // to PENDING_APPROVAL upon user submitting FR. + // "FAILED" - Future reservation failed. No additional reservations + // were provided. + // "FAILED_PARTIALLY_FULFILLED" - Future reservation is partially + // fulfilled. Additional reservations were provided but did not reach + // total_count reserved instance slots. + // "FULFILLED" - Future reservation is fulfilled completely. + // "PENDING_AMENDMENT_APPROVAL" - An Amendment to the Future + // Reservation has been requested. If the Amendment is declined, the + // Future Reservation will be restored to the last known good state. + // "PENDING_APPROVAL" - Future reservation is pending approval by GCP. + // "PROCUREMENT_STATUS_UNSPECIFIED" + // "PROCURING" - Future reservation is being procured by GCP. Beyond + // this point, Future reservation is locked and no further modifications + // are allowed. + // "PROVISIONING" - Future reservation capacity is being provisioned. + // This state will be entered after start_time, while reservations are + // being created to provide total_count reserved instance slots. This + // state will not persist past start_time + 24h. + ProcurementStatus string `json:"procurementStatus,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -14687,38 +14814,37 @@ type GlobalOrganizationSetPolicyRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Bindings") 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. "Description") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GlobalOrganizationSetPolicyRequest) MarshalJSON() ([]byte, error) { - type NoMethod GlobalOrganizationSetPolicyRequest +func (s *FutureReservationStatusLastKnownGoodState) MarshalJSON() ([]byte, error) { + type NoMethod FutureReservationStatusLastKnownGoodState raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type GlobalSetLabelsRequest struct { - // LabelFingerprint: The fingerprint of the previous set of labels for - // this resource, used to detect conflicts. The fingerprint is initially - // generated by Compute Engine and changes after every request to modify - // or update labels. You must always provide an up-to-date fingerprint - // hash when updating or changing labels, otherwise the request will - // fail with error 412 conditionNotMet. Make a get() request to the - // resource to get the latest fingerprint. - LabelFingerprint string `json:"labelFingerprint,omitempty"` +// FutureReservationStatusLastKnownGoodStateFutureReservationSpecs: The +// properties of the last known good state for the Future Reservation. +type FutureReservationStatusLastKnownGoodStateFutureReservationSpecs struct { + // ShareSettings: [Output Only] The previous share settings of the + // Future Reservation. + ShareSettings *ShareSettings `json:"shareSettings,omitempty"` - // Labels: A list of labels to apply for this resource. Each label must - // comply with the requirements for labels. For example, - // "webserver-frontend": "images". A label value can also be empty (e.g. - // "my-label": ""). - Labels map[string]string `json:"labels,omitempty"` + // SpecificSkuProperties: [Output Only] The previous instance related + // properties of the Future Reservation. + SpecificSkuProperties *FutureReservationSpecificSKUProperties `json:"specificSkuProperties,omitempty"` - // ForceSendFields is a list of field names (e.g. "LabelFingerprint") to + // TimeWindow: [Output Only] The previous time window of the Future + // Reservation. + TimeWindow *FutureReservationTimeWindow `json:"timeWindow,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ShareSettings") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -14726,38 +14852,63 @@ type GlobalSetLabelsRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LabelFingerprint") 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 + // NullFields is a list of field names (e.g. "ShareSettings") 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 *FutureReservationStatusLastKnownGoodStateFutureReservationSpecs) MarshalJSON() ([]byte, error) { + type NoMethod FutureReservationStatusLastKnownGoodStateFutureReservationSpecs + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// FutureReservationStatusSpecificSKUProperties: Properties to be set +// for the Future Reservation. +type FutureReservationStatusSpecificSKUProperties struct { + // SourceInstanceTemplateId: ID of the instance template used to + // populate the Future Reservation properties. + SourceInstanceTemplateId string `json:"sourceInstanceTemplateId,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "SourceInstanceTemplateId") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "SourceInstanceTemplateId") + // 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 *GlobalSetLabelsRequest) MarshalJSON() ([]byte, error) { - type NoMethod GlobalSetLabelsRequest +func (s *FutureReservationStatusSpecificSKUProperties) MarshalJSON() ([]byte, error) { + type NoMethod FutureReservationStatusSpecificSKUProperties raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type GlobalSetPolicyRequest struct { - // Bindings: Flatten Policy to create a backward compatible wire-format. - // Deprecated. Use 'policy' to specify bindings. - Bindings []*Binding `json:"bindings,omitempty"` +type FutureReservationTimeWindow struct { + Duration *Duration `json:"duration,omitempty"` - // Etag: Flatten Policy to create a backward compatible wire-format. - // Deprecated. Use 'policy' to specify the etag. - Etag string `json:"etag,omitempty"` + EndTime string `json:"endTime,omitempty"` - // Policy: REQUIRED: The complete policy to be applied to the - // 'resource'. The size of the policy is limited to a few 10s of KB. An - // empty policy is in general a valid policy but certain services (like - // Projects) might reject them. - Policy *Policy `json:"policy,omitempty"` + // StartTime: Start time of the Future Reservation. The start_time is an + // RFC3339 string. + StartTime string `json:"startTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "Bindings") to + // ForceSendFields is a list of field names (e.g. "Duration") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -14765,7 +14916,7 @@ type GlobalSetPolicyRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Bindings") to include in + // NullFields is a list of field names (e.g. "Duration") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -14774,39 +14925,51 @@ type GlobalSetPolicyRequest struct { NullFields []string `json:"-"` } -func (s *GlobalSetPolicyRequest) MarshalJSON() ([]byte, error) { - type NoMethod GlobalSetPolicyRequest +func (s *FutureReservationTimeWindow) MarshalJSON() ([]byte, error) { + type NoMethod FutureReservationTimeWindow raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GuestAttributes: A guest attributes entry. -type GuestAttributes struct { - // Kind: [Output Only] Type of the resource. Always - // compute#guestAttributes for guest attributes entry. - Kind string `json:"kind,omitempty"` +// FutureReservationsAggregatedListResponse: Contains a list of future +// reservations. +type FutureReservationsAggregatedListResponse struct { + Etag string `json:"etag,omitempty"` - // QueryPath: The path to be queried. This can be the default namespace - // ('') or a nested namespace ('\/') or a specified key ('\/\'). - QueryPath string `json:"queryPath,omitempty"` + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` - // QueryValue: [Output Only] The value of the requested queried path. - QueryValue *GuestAttributesValue `json:"queryValue,omitempty"` + // Items: A list of Future reservation resources. + Items map[string]FutureReservationsScopedList `json:"items,omitempty"` + + // Kind: [Output Only] Type of resource. Always + // compute#futureReservationsAggregatedListResponse for future + // resevation aggregated list response. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` - // VariableKey: The key to search for. - VariableKey string `json:"variableKey,omitempty"` + // Unreachables: [Output Only] Unreachable resources. + Unreachables []string `json:"unreachables,omitempty"` - // VariableValue: [Output Only] The value found for the requested key. - VariableValue string `json:"variableValue,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *FutureReservationsAggregatedListResponseWarning `json:"warning,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. "Etag") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -14814,7 +14977,7 @@ type GuestAttributes struct { // 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 + // NullFields is a list of field names (e.g. "Etag") 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 @@ -14823,24 +14986,92 @@ type GuestAttributes struct { NullFields []string `json:"-"` } -func (s *GuestAttributes) MarshalJSON() ([]byte, error) { - type NoMethod GuestAttributes +func (s *FutureReservationsAggregatedListResponse) MarshalJSON() ([]byte, error) { + type NoMethod FutureReservationsAggregatedListResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GuestAttributesEntry: A guest attributes namespace/key/value entry. -type GuestAttributesEntry struct { - // Key: Key for the guest attribute entry. - Key string `json:"key,omitempty"` +// FutureReservationsAggregatedListResponseWarning: [Output Only] +// Informational warning message. +type FutureReservationsAggregatedListResponseWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient + // changes made by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was + // created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk + // that is larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api + // call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an + // injected kernel, which is deprecated. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV + // backend service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to + // list overhead quota exceed which captures the amount of resources + // filtered out by user-defined list filter. + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is + // not assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot + // ip forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's + // nextHopInstance URL refers to an instance that does not have an ipv6 + // interface on the same network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL + // refers to an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance + // URL refers to an instance that is not on the same network as the + // route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not + // have a status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to + // continue the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list + // page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be + // missing due to errors + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource + // that requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a + // resource is in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to + // auto-delete could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in + // instance group manager is valid as such, but its application does not + // make a lot of sense, because it allows only single instance in + // instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema + // are present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` - // Namespace: Namespace for the guest attribute entry. - Namespace string `json:"namespace,omitempty"` + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" + // } + Data []*FutureReservationsAggregatedListResponseWarningData `json:"data,omitempty"` - // Value: Value for the guest attribute entry. - Value string `json:"value,omitempty"` + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to + // ForceSendFields is a list of field names (e.g. "Code") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -14848,7 +15079,7 @@ type GuestAttributesEntry struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API + // NullFields is a list of field names (e.g. "Code") 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 @@ -14857,18 +15088,27 @@ type GuestAttributesEntry struct { NullFields []string `json:"-"` } -func (s *GuestAttributesEntry) MarshalJSON() ([]byte, error) { - type NoMethod GuestAttributesEntry +func (s *FutureReservationsAggregatedListResponseWarning) MarshalJSON() ([]byte, error) { + type NoMethod FutureReservationsAggregatedListResponseWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GuestAttributesValue: Array of guest attribute namespace/key/value -// tuples. -type GuestAttributesValue struct { - Items []*GuestAttributesEntry `json:"items,omitempty"` +type FutureReservationsAggregatedListResponseWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` - // ForceSendFields is a list of field names (e.g. "Items") to + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -14876,7 +15116,7 @@ type GuestAttributesValue struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Items") to include in API + // NullFields is a list of field names (e.g. "Key") 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 @@ -14885,35 +15125,48 @@ type GuestAttributesValue struct { NullFields []string `json:"-"` } -func (s *GuestAttributesValue) MarshalJSON() ([]byte, error) { - type NoMethod GuestAttributesValue +func (s *FutureReservationsAggregatedListResponseWarningData) MarshalJSON() ([]byte, error) { + type NoMethod FutureReservationsAggregatedListResponseWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GuestOsFeature: Guest OS features. -type GuestOsFeature struct { - // Type: The ID of a supported feature. To add multiple values, use - // commas to separate values. Set to one or more of the following - // values: - VIRTIO_SCSI_MULTIQUEUE - WINDOWS - MULTI_IP_SUBNET - - // UEFI_COMPATIBLE - GVNIC - SEV_CAPABLE - SUSPEND_RESUME_COMPATIBLE - - // SEV_LIVE_MIGRATABLE - SEV_SNP_CAPABLE For more information, see - // Enabling guest operating system features. - // - // Possible values: - // "FEATURE_TYPE_UNSPECIFIED" - // "GVNIC" - // "MULTI_IP_SUBNET" - // "SECURE_BOOT" - // "SEV_CAPABLE" - // "SEV_LIVE_MIGRATABLE" - // "SEV_SNP_CAPABLE" - // "UEFI_COMPATIBLE" - // "VIRTIO_SCSI_MULTIQUEUE" - // "WINDOWS" - Type string `json:"type,omitempty"` +type FutureReservationsListResponse struct { + Etag string `json:"etag,omitempty"` - // ForceSendFields is a list of field names (e.g. "Type") to + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id string `json:"id,omitempty"` + + // Items: [Output Only] A list of future reservation resources. + Items []*FutureReservation `json:"items,omitempty"` + + // Kind: [Output Only] Type of resource.Always + // compute#FutureReservationsListResponse for lists of reservations + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Unreachables: [Output Only] Unreachable resources. + Unreachables []string `json:"unreachables,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *FutureReservationsListResponseWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Etag") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -14921,7 +15174,7 @@ type GuestOsFeature struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Type") to include in API + // NullFields is a list of field names (e.g. "Etag") 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 @@ -14930,178 +15183,92 @@ type GuestOsFeature struct { NullFields []string `json:"-"` } -func (s *GuestOsFeature) MarshalJSON() ([]byte, error) { - type NoMethod GuestOsFeature +func (s *FutureReservationsListResponse) MarshalJSON() ([]byte, error) { + type NoMethod FutureReservationsListResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type HTTP2HealthCheck struct { - // Host: The value of the host header in the HTTP/2 health check - // request. If left empty (default value), the host header is set to the - // destination IP address to which health check packets are sent. The - // destination IP address depends on the type of load balancer. For - // details, see: - // https://cloud.google.com/load-balancing/docs/health-check-concepts#hc-packet-dest - Host string `json:"host,omitempty"` - - // Port: The TCP port number to which the health check prober sends - // packets. The default value is 443. Valid values are 1 through 65535. - Port int64 `json:"port,omitempty"` - - // PortName: Not supported. - PortName string `json:"portName,omitempty"` - - // PortSpecification: Specifies how a port is selected for health - // checking. Can be one of the following values: USE_FIXED_PORT: - // Specifies a port number explicitly using the port field in the health - // check. Supported by backend services for pass-through load balancers - // and backend services for proxy load balancers. Not supported by - // target pools. The health check supports all backends supported by the - // backend service provided the backend can be health checked. For - // example, GCE_VM_IP network endpoint groups, GCE_VM_IP_PORT network - // endpoint groups, and instance group backends. USE_NAMED_PORT: Not - // supported. USE_SERVING_PORT: Provides an indirect method of - // specifying the health check port by referring to the backend service. - // Only supported by backend services for proxy load balancers. Not - // supported by target pools. Not supported by backend services for - // pass-through load balancers. Supports all backends that can be health - // checked; for example, GCE_VM_IP_PORT network endpoint groups and - // instance group backends. For GCE_VM_IP_PORT network endpoint group - // backends, the health check uses the port number specified for each - // endpoint in the network endpoint group. For instance group backends, - // the health check uses the port number determined by looking up the - // backend service's named port in the instance group's list of named - // ports. - // - // Possible values: - // "USE_FIXED_PORT" - The port number in the health check's port is - // used for health checking. Applies to network endpoint group and - // instance group backends. - // "USE_NAMED_PORT" - Not supported. - // "USE_SERVING_PORT" - For network endpoint group backends, the - // health check uses the port number specified on each endpoint in the - // network endpoint group. For instance group backends, the health check - // uses the port number specified for the backend service's named port - // defined in the instance group's named ports. - PortSpecification string `json:"portSpecification,omitempty"` - - // ProxyHeader: Specifies the type of proxy header to append before - // sending data to the backend, either NONE or PROXY_V1. The default is - // NONE. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - - // RequestPath: The request path of the HTTP/2 health check request. The - // default value is /. - RequestPath string `json:"requestPath,omitempty"` - - // Response: Creates a content-based HTTP/2 health check. In addition to - // the required HTTP 200 (OK) status code, you can configure the health - // check to pass only when the backend sends this specific ASCII - // response string within the first 1024 bytes of the HTTP response - // body. For details, see: - // https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-http - Response string `json:"response,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Host") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Host") 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 *HTTP2HealthCheck) MarshalJSON() ([]byte, error) { - type NoMethod HTTP2HealthCheck - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type HTTPHealthCheck struct { - // Host: The value of the host header in the HTTP health check request. - // If left empty (default value), the host header is set to the - // destination IP address to which health check packets are sent. The - // destination IP address depends on the type of load balancer. For - // details, see: - // https://cloud.google.com/load-balancing/docs/health-check-concepts#hc-packet-dest - Host string `json:"host,omitempty"` - - // Port: The TCP port number to which the health check prober sends - // packets. The default value is 80. Valid values are 1 through 65535. - Port int64 `json:"port,omitempty"` - - // PortName: Not supported. - PortName string `json:"portName,omitempty"` - - // PortSpecification: Specifies how a port is selected for health - // checking. Can be one of the following values: USE_FIXED_PORT: - // Specifies a port number explicitly using the port field in the health - // check. Supported by backend services for pass-through load balancers - // and backend services for proxy load balancers. Also supported in - // legacy HTTP health checks for target pools. The health check supports - // all backends supported by the backend service provided the backend - // can be health checked. For example, GCE_VM_IP network endpoint - // groups, GCE_VM_IP_PORT network endpoint groups, and instance group - // backends. USE_NAMED_PORT: Not supported. USE_SERVING_PORT: Provides - // an indirect method of specifying the health check port by referring - // to the backend service. Only supported by backend services for proxy - // load balancers. Not supported by target pools. Not supported by - // backend services for pass-through load balancers. Supports all - // backends that can be health checked; for example, GCE_VM_IP_PORT - // network endpoint groups and instance group backends. For - // GCE_VM_IP_PORT network endpoint group backends, the health check uses - // the port number specified for each endpoint in the network endpoint - // group. For instance group backends, the health check uses the port - // number determined by looking up the backend service's named port in - // the instance group's list of named ports. - // - // Possible values: - // "USE_FIXED_PORT" - The port number in the health check's port is - // used for health checking. Applies to network endpoint group and - // instance group backends. - // "USE_NAMED_PORT" - Not supported. - // "USE_SERVING_PORT" - For network endpoint group backends, the - // health check uses the port number specified on each endpoint in the - // network endpoint group. For instance group backends, the health check - // uses the port number specified for the backend service's named port - // defined in the instance group's named ports. - PortSpecification string `json:"portSpecification,omitempty"` - - // ProxyHeader: Specifies the type of proxy header to append before - // sending data to the backend, either NONE or PROXY_V1. The default is - // NONE. +// FutureReservationsListResponseWarning: [Output Only] Informational +// warning message. +type FutureReservationsListResponseWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. // // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` + // "CLEANUP_FAILED" - Warning about failed cleanup of transient + // changes made by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was + // created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk + // that is larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api + // call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an + // injected kernel, which is deprecated. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV + // backend service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to + // list overhead quota exceed which captures the amount of resources + // filtered out by user-defined list filter. + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is + // not assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot + // ip forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's + // nextHopInstance URL refers to an instance that does not have an ipv6 + // interface on the same network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL + // refers to an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance + // URL refers to an instance that is not on the same network as the + // route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not + // have a status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to + // continue the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list + // page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be + // missing due to errors + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource + // that requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a + // resource is in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to + // auto-delete could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in + // instance group manager is valid as such, but its application does not + // make a lot of sense, because it allows only single instance in + // instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema + // are present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` - // RequestPath: The request path of the HTTP health check request. The - // default value is /. - RequestPath string `json:"requestPath,omitempty"` + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" + // } + Data []*FutureReservationsListResponseWarningData `json:"data,omitempty"` - // Response: Creates a content-based HTTP health check. In addition to - // the required HTTP 200 (OK) status code, you can configure the health - // check to pass only when the backend sends this specific ASCII - // response string within the first 1024 bytes of the HTTP response - // body. For details, see: - // https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-http - Response string `json:"response,omitempty"` + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` - // ForceSendFields is a list of field names (e.g. "Host") to + // ForceSendFields is a list of field names (e.g. "Code") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -15109,7 +15276,7 @@ type HTTPHealthCheck struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Host") to include in API + // NullFields is a list of field names (e.g. "Code") 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 @@ -15118,84 +15285,27 @@ type HTTPHealthCheck struct { NullFields []string `json:"-"` } -func (s *HTTPHealthCheck) MarshalJSON() ([]byte, error) { - type NoMethod HTTPHealthCheck +func (s *FutureReservationsListResponseWarning) MarshalJSON() ([]byte, error) { + type NoMethod FutureReservationsListResponseWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type HTTPSHealthCheck struct { - // Host: The value of the host header in the HTTPS health check request. - // If left empty (default value), the host header is set to the - // destination IP address to which health check packets are sent. The - // destination IP address depends on the type of load balancer. For - // details, see: - // https://cloud.google.com/load-balancing/docs/health-check-concepts#hc-packet-dest - Host string `json:"host,omitempty"` - - // Port: The TCP port number to which the health check prober sends - // packets. The default value is 443. Valid values are 1 through 65535. - Port int64 `json:"port,omitempty"` - - // PortName: Not supported. - PortName string `json:"portName,omitempty"` - - // PortSpecification: Specifies how a port is selected for health - // checking. Can be one of the following values: USE_FIXED_PORT: - // Specifies a port number explicitly using the port field in the health - // check. Supported by backend services for pass-through load balancers - // and backend services for proxy load balancers. Not supported by - // target pools. The health check supports all backends supported by the - // backend service provided the backend can be health checked. For - // example, GCE_VM_IP network endpoint groups, GCE_VM_IP_PORT network - // endpoint groups, and instance group backends. USE_NAMED_PORT: Not - // supported. USE_SERVING_PORT: Provides an indirect method of - // specifying the health check port by referring to the backend service. - // Only supported by backend services for proxy load balancers. Not - // supported by target pools. Not supported by backend services for - // pass-through load balancers. Supports all backends that can be health - // checked; for example, GCE_VM_IP_PORT network endpoint groups and - // instance group backends. For GCE_VM_IP_PORT network endpoint group - // backends, the health check uses the port number specified for each - // endpoint in the network endpoint group. For instance group backends, - // the health check uses the port number determined by looking up the - // backend service's named port in the instance group's list of named - // ports. - // - // Possible values: - // "USE_FIXED_PORT" - The port number in the health check's port is - // used for health checking. Applies to network endpoint group and - // instance group backends. - // "USE_NAMED_PORT" - Not supported. - // "USE_SERVING_PORT" - For network endpoint group backends, the - // health check uses the port number specified on each endpoint in the - // network endpoint group. For instance group backends, the health check - // uses the port number specified for the backend service's named port - // defined in the instance group's named ports. - PortSpecification string `json:"portSpecification,omitempty"` - - // ProxyHeader: Specifies the type of proxy header to append before - // sending data to the backend, either NONE or PROXY_V1. The default is - // NONE. - // - // Possible values: - // "NONE" - // "PROXY_V1" - ProxyHeader string `json:"proxyHeader,omitempty"` - - // RequestPath: The request path of the HTTPS health check request. The - // default value is /. - RequestPath string `json:"requestPath,omitempty"` +type FutureReservationsListResponseWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` - // Response: Creates a content-based HTTPS health check. In addition to - // the required HTTP 200 (OK) status code, you can configure the health - // check to pass only when the backend sends this specific ASCII - // response string within the first 1024 bytes of the HTTP response - // body. For details, see: - // https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-http - Response string `json:"response,omitempty"` + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Host") to + // ForceSendFields is a list of field names (e.g. "Key") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -15203,7 +15313,7 @@ type HTTPSHealthCheck struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Host") to include in API + // NullFields is a list of field names (e.g. "Key") 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 @@ -15212,122 +15322,30 @@ type HTTPSHealthCheck struct { NullFields []string `json:"-"` } -func (s *HTTPSHealthCheck) MarshalJSON() ([]byte, error) { - type NoMethod HTTPSHealthCheck +func (s *FutureReservationsListResponseWarningData) MarshalJSON() ([]byte, error) { + type NoMethod FutureReservationsListResponseWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// HealthCheck: Represents a Health Check resource. Google Compute -// Engine has two Health Check resources: * Global -// (/compute/docs/reference/rest/beta/healthChecks) * Regional -// (/compute/docs/reference/rest/beta/regionHealthChecks) Internal -// HTTP(S) load balancers must use regional health checks -// (`compute.v1.regionHealthChecks`). Traffic Director must use global -// health checks (`compute.v1.healthChecks`). Internal TCP/UDP load -// balancers can use either regional or global health checks -// (`compute.v1.regionHealthChecks` or `compute.v1.healthChecks`). -// External HTTP(S), TCP proxy, and SSL proxy load balancers as well as -// managed instance group auto-healing must use global health checks -// (`compute.v1.healthChecks`). Backend service-based network load -// balancers must use regional health checks -// (`compute.v1.regionHealthChecks`). Target pool-based network load -// balancers must use legacy HTTP health checks -// (`compute.v1.httpHealthChecks`). For more information, see Health -// checks overview. -type HealthCheck struct { - // CheckIntervalSec: How often (in seconds) to send a health check. The - // default value is 5 seconds. - CheckIntervalSec int64 `json:"checkIntervalSec,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in 3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - GrpcHealthCheck *GRPCHealthCheck `json:"grpcHealthCheck,omitempty"` - - // HealthyThreshold: A so-far unhealthy instance will be marked healthy - // after this many consecutive successes. The default value is 2. - HealthyThreshold int64 `json:"healthyThreshold,omitempty"` - - Http2HealthCheck *HTTP2HealthCheck `json:"http2HealthCheck,omitempty"` - - HttpHealthCheck *HTTPHealthCheck `json:"httpHealthCheck,omitempty"` - - HttpsHealthCheck *HTTPSHealthCheck `json:"httpsHealthCheck,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: Type of the resource. - Kind string `json:"kind,omitempty"` - - // LogConfig: Configure logging on this health check. - LogConfig *HealthCheckLogConfig `json:"logConfig,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. For example, a name that is 1-63 characters long, matches - // the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?`, and otherwise - // complies with RFC1035. This regular expression describes a name where - // the first character is a lowercase letter, and all following - // characters are a dash, lowercase letter, or digit, except the last - // character, which isn't a dash. - Name string `json:"name,omitempty"` - - // Region: [Output Only] Region where the health check resides. Not - // applicable to global health checks. - Region string `json:"region,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - SslHealthCheck *SSLHealthCheck `json:"sslHealthCheck,omitempty"` - - TcpHealthCheck *TCPHealthCheck `json:"tcpHealthCheck,omitempty"` - - // TimeoutSec: How long (in seconds) to wait before claiming failure. - // The default value is 5 seconds. It is invalid for timeoutSec to have - // greater value than checkIntervalSec. - TimeoutSec int64 `json:"timeoutSec,omitempty"` - - // Type: Specifies the type of the healthCheck, either TCP, SSL, HTTP, - // HTTPS, HTTP2 or GRPC. Exactly one of the protocol-specific health - // check fields must be specified, which must match type field. - // - // Possible values: - // "GRPC" - // "HTTP" - // "HTTP2" - // "HTTPS" - // "INVALID" - // "SSL" - // "TCP" - Type string `json:"type,omitempty"` - - // UnhealthyThreshold: A so-far healthy instance will be marked - // unhealthy after this many consecutive failures. The default value is - // 2. - UnhealthyThreshold int64 `json:"unhealthyThreshold,omitempty"` +type FutureReservationsScopedList struct { + // FutureReservations: A list of future reservations contained in this + // scope. + FutureReservations []*FutureReservation `json:"futureReservations,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // Warning: Informational warning which replaces the list of future + // reservations when the list is empty. + Warning *FutureReservationsScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "CheckIntervalSec") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "FutureReservations") + // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CheckIntervalSec") to + // NullFields is a list of field names (e.g. "FutureReservations") 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 @@ -15337,67 +15355,15 @@ type HealthCheck struct { NullFields []string `json:"-"` } -func (s *HealthCheck) MarshalJSON() ([]byte, error) { - type NoMethod HealthCheck - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// HealthCheckList: Contains a list of HealthCheck resources. -type HealthCheckList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of HealthCheck resources. - Items []*HealthCheck `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // Warning: [Output Only] Informational warning message. - Warning *HealthCheckListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *HealthCheckList) MarshalJSON() ([]byte, error) { - type NoMethod HealthCheckList +func (s *FutureReservationsScopedList) MarshalJSON() ([]byte, error) { + type NoMethod FutureReservationsScopedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// HealthCheckListWarning: [Output Only] Informational warning message. -type HealthCheckListWarning struct { +// FutureReservationsScopedListWarning: Informational warning which +// replaces the list of future reservations when the list is empty. +type FutureReservationsScopedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -15468,7 +15434,7 @@ type HealthCheckListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*HealthCheckListWarningData `json:"data,omitempty"` + Data []*FutureReservationsScopedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -15491,13 +15457,13 @@ type HealthCheckListWarning struct { NullFields []string `json:"-"` } -func (s *HealthCheckListWarning) MarshalJSON() ([]byte, error) { - type NoMethod HealthCheckListWarning +func (s *FutureReservationsScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod FutureReservationsScopedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type HealthCheckListWarningData struct { +type FutureReservationsScopedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -15528,20 +15494,63 @@ type HealthCheckListWarningData struct { NullFields []string `json:"-"` } -func (s *HealthCheckListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod HealthCheckListWarningData +func (s *FutureReservationsScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod FutureReservationsScopedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// HealthCheckLogConfig: Configuration of logging on a health check. If -// logging is enabled, logs will be exported to Stackdriver. -type HealthCheckLogConfig struct { - // Enable: Indicates whether or not to export logs. This is false by - // default, which means no health check logging will be done. - Enable bool `json:"enable,omitempty"` +type GRPCHealthCheck struct { + // GrpcServiceName: The gRPC service name for the health check. This + // field is optional. The value of grpc_service_name has the following + // meanings by convention: - Empty service_name means the overall status + // of all services at the backend. - Non-empty service_name means the + // health of that gRPC service, as defined by the owner of the service. + // The grpc_service_name can only be ASCII. + GrpcServiceName string `json:"grpcServiceName,omitempty"` - // ForceSendFields is a list of field names (e.g. "Enable") to + // Port: The TCP port number to which the health check prober sends + // packets. Valid values are 1 through 65535. + Port int64 `json:"port,omitempty"` + + // PortName: Not supported. + PortName string `json:"portName,omitempty"` + + // PortSpecification: Specifies how a port is selected for health + // checking. Can be one of the following values: USE_FIXED_PORT: + // Specifies a port number explicitly using the port field in the health + // check. Supported by backend services for pass-through load balancers + // and backend services for proxy load balancers. Not supported by + // target pools. The health check supports all backends supported by the + // backend service provided the backend can be health checked. For + // example, GCE_VM_IP network endpoint groups, GCE_VM_IP_PORT network + // endpoint groups, and instance group backends. USE_NAMED_PORT: Not + // supported. USE_SERVING_PORT: Provides an indirect method of + // specifying the health check port by referring to the backend service. + // Only supported by backend services for proxy load balancers. Not + // supported by target pools. Not supported by backend services for + // pass-through load balancers. Supports all backends that can be health + // checked; for example, GCE_VM_IP_PORT network endpoint groups and + // instance group backends. For GCE_VM_IP_PORT network endpoint group + // backends, the health check uses the port number specified for each + // endpoint in the network endpoint group. For instance group backends, + // the health check uses the port number determined by looking up the + // backend service's named port in the instance group's list of named + // ports. + // + // Possible values: + // "USE_FIXED_PORT" - The port number in the health check's port is + // used for health checking. Applies to network endpoint group and + // instance group backends. + // "USE_NAMED_PORT" - Not supported. + // "USE_SERVING_PORT" - For network endpoint group backends, the + // health check uses the port number specified on each endpoint in the + // network endpoint group. For instance group backends, the health check + // uses the port number specified for the backend service's named port + // defined in the instance group's named ports. + PortSpecification string `json:"portSpecification,omitempty"` + + // ForceSendFields is a list of field names (e.g. "GrpcServiceName") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -15549,30 +15558,37 @@ type HealthCheckLogConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enable") 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. "GrpcServiceName") 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 *HealthCheckLogConfig) MarshalJSON() ([]byte, error) { - type NoMethod HealthCheckLogConfig +func (s *GRPCHealthCheck) MarshalJSON() ([]byte, error) { + type NoMethod GRPCHealthCheck raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// HealthCheckReference: A full or valid partial URL to a health check. -// For example, the following are valid URLs: - -// https://www.googleapis.com/compute/beta/projects/project-id/global/httpHealthChecks/health-check -// - projects/project-id/global/httpHealthChecks/health-check - -// global/httpHealthChecks/health-check -type HealthCheckReference struct { - HealthCheck string `json:"healthCheck,omitempty"` +type GlobalAddressesMoveRequest struct { + // Description: An optional destination address description if intended + // to be different from the source. + Description string `json:"description,omitempty"` - // ForceSendFields is a list of field names (e.g. "HealthCheck") to + // DestinationAddress: The URL of the destination address to move to. + // This can be a full or partial URL. For example, the following are all + // valid URLs to a address: - + // https://www.googleapis.com/compute/v1/projects/project + // /global/addresses/address - projects/project/global/addresses/address + // Note that destination project must be different from the source + // project. So /global/addresses/address is not valid partial url. + DestinationAddress string `json:"destinationAddress,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -15580,7 +15596,7 @@ type HealthCheckReference struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HealthCheck") to include + // NullFields is a list of field names (e.g. "Description") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -15589,140 +15605,131 @@ type HealthCheckReference struct { NullFields []string `json:"-"` } -func (s *HealthCheckReference) MarshalJSON() ([]byte, error) { - type NoMethod HealthCheckReference +func (s *GlobalAddressesMoveRequest) MarshalJSON() ([]byte, error) { + type NoMethod GlobalAddressesMoveRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// HealthCheckService: Represents a Health-Check as a Service resource. -type HealthCheckService struct { - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` +type GlobalNetworkEndpointGroupsAttachEndpointsRequest struct { + // NetworkEndpoints: The list of network endpoints to be attached. + NetworkEndpoints []*NetworkEndpoint `json:"networkEndpoints,omitempty"` - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` + // ForceSendFields is a list of field names (e.g. "NetworkEndpoints") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` - // Fingerprint: Fingerprint of this resource. A hash of the contents - // stored in this object. This field is used in optimistic locking. This - // field will be ignored when inserting a HealthCheckService. An - // up-to-date fingerprint must be provided in order to patch/update the - // HealthCheckService; Otherwise, the request will fail with error 412 - // conditionNotMet. To see the latest fingerprint, make a get() request - // to retrieve the HealthCheckService. - Fingerprint string `json:"fingerprint,omitempty"` + // NullFields is a list of field names (e.g. "NetworkEndpoints") 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:"-"` +} - // HealthChecks: A list of URLs to the HealthCheck resources. Must have - // at least one HealthCheck, and not more than 10 for regional - // HealthCheckService, and not more than 1 for global - // HealthCheckService. HealthCheck resources must have - // portSpecification=USE_SERVING_PORT or - // portSpecification=USE_FIXED_PORT. For regional HealthCheckService, - // the HealthCheck must be regional and in the same region. For global - // HealthCheckService, HealthCheck must be global. Mix of regional and - // global HealthChecks is not supported. Multiple regional HealthChecks - // must belong to the same region. Regional HealthChecks must belong to - // the same region as zones of NetworkEndpointGroups. For global - // HealthCheckService using global INTERNET_IP_PORT - // NetworkEndpointGroups, the global HealthChecks must specify - // sourceRegions, and HealthChecks that specify sourceRegions can only - // be used with global INTERNET_IP_PORT NetworkEndpointGroups. - HealthChecks []string `json:"healthChecks,omitempty"` +func (s *GlobalNetworkEndpointGroupsAttachEndpointsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GlobalNetworkEndpointGroupsAttachEndpointsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // HealthStatusAggregationPolicy: Optional. Policy for how the results - // from multiple health checks for the same endpoint are aggregated. - // Defaults to NO_AGGREGATION if unspecified. - NO_AGGREGATION. An - // EndpointHealth message is returned for each pair in the health check - // service. - AND. If any health check of an endpoint reports UNHEALTHY, - // then UNHEALTHY is the HealthState of the endpoint. If all health - // checks report HEALTHY, the HealthState of the endpoint is HEALTHY. . - // This is only allowed with regional HealthCheckService. - // - // Possible values: - // "AND" - If any backend's health check reports UNHEALTHY, then - // UNHEALTHY is the HealthState of the entire health check service. If - // all backend's are healthy, the HealthState of the health check - // service is HEALTHY. - // "NO_AGGREGATION" - An EndpointHealth message is returned for each - // backend in the health check service. - HealthStatusAggregationPolicy string `json:"healthStatusAggregationPolicy,omitempty"` +type GlobalNetworkEndpointGroupsDetachEndpointsRequest struct { + // NetworkEndpoints: The list of network endpoints to be detached. + NetworkEndpoints []*NetworkEndpoint `json:"networkEndpoints,omitempty"` - // HealthStatusAggregationStrategy: This field is deprecated. Use - // health_status_aggregation_policy instead. Policy for how the results - // from multiple health checks for the same endpoint are aggregated. - - // NO_AGGREGATION. An EndpointHealth message is returned for each - // backend in the health check service. - AND. If any backend's health - // check reports UNHEALTHY, then UNHEALTHY is the HealthState of the - // entire health check service. If all backend's are healthy, the - // HealthState of the health check service is HEALTHY. . - // - // Possible values: - // "AND" - This is deprecated. Use health_status_aggregation_policy - // instead. If any backend's health check reports UNHEALTHY, then - // UNHEALTHY is the HealthState of the entire health check service. If - // all backend's are healthy, the HealthState of the health check - // service is HEALTHY. - // "NO_AGGREGATION" - This is deprecated. Use - // health_status_aggregation_policy instead. An EndpointHealth message - // is returned for each backend in the health check service. - HealthStatusAggregationStrategy string `json:"healthStatusAggregationStrategy,omitempty"` + // ForceSendFields is a list of field names (e.g. "NetworkEndpoints") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` + // NullFields is a list of field names (e.g. "NetworkEndpoints") 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:"-"` +} - // Kind: [Output only] Type of the resource. Always - // compute#healthCheckServicefor health check services. - Kind string `json:"kind,omitempty"` +func (s *GlobalNetworkEndpointGroupsDetachEndpointsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GlobalNetworkEndpointGroupsDetachEndpointsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // Name: Name of the resource. The name must be 1-63 characters long, - // and comply with RFC1035. Specifically, the name must be 1-63 - // characters long and match the regular expression - // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be - // a lowercase letter, and all following characters must be a dash, - // lowercase letter, or digit, except the last character, which cannot - // be a dash. - Name string `json:"name,omitempty"` +type GlobalOrganizationSetPolicyRequest struct { + // Bindings: Flatten Policy to create a backward compatible wire-format. + // Deprecated. Use 'policy' to specify bindings. + Bindings []*Binding `json:"bindings,omitempty"` - // NetworkEndpointGroups: A list of URLs to the NetworkEndpointGroup - // resources. Must not have more than 100. For regional - // HealthCheckService, NEGs must be in zones in the region of the - // HealthCheckService. For global HealthCheckServices, the - // NetworkEndpointGroups must be global INTERNET_IP_PORT. - NetworkEndpointGroups []string `json:"networkEndpointGroups,omitempty"` + // Etag: Flatten Policy to create a backward compatible wire-format. + // Deprecated. Use 'policy' to specify the etag. + Etag string `json:"etag,omitempty"` - // NotificationEndpoints: A list of URLs to the NotificationEndpoint - // resources. Must not have more than 10. A list of endpoints for - // receiving notifications of change in health status. For regional - // HealthCheckService, NotificationEndpoint must be regional and in the - // same region. For global HealthCheckService, NotificationEndpoint must - // be global. - NotificationEndpoints []string `json:"notificationEndpoints,omitempty"` + // Policy: REQUIRED: The complete policy to be applied to the + // 'resource'. The size of the policy is limited to a few 10s of KB. An + // empty policy is in general a valid policy but certain services (like + // Projects) might reject them. + Policy *Policy `json:"policy,omitempty"` - // Region: [Output Only] URL of the region where the health check - // service resides. This field is not applicable to global health check - // services. You must specify this field as part of the HTTP request - // URL. It is not settable as a field in the request body. - Region string `json:"region,omitempty"` + // ForceSendFields is a list of field names (e.g. "Bindings") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` + // NullFields is a list of field names (e.g. "Bindings") 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:"-"` +} - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` +func (s *GlobalOrganizationSetPolicyRequest) MarshalJSON() ([]byte, error) { + type NoMethod GlobalOrganizationSetPolicyRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with +type GlobalSetLabelsRequest struct { + // LabelFingerprint: The fingerprint of the previous set of labels for + // this resource, used to detect conflicts. The fingerprint is initially + // generated by Compute Engine and changes after every request to modify + // or update labels. You must always provide an up-to-date fingerprint + // hash when updating or changing labels, otherwise the request will + // fail with error 412 conditionNotMet. Make a get() request to the + // resource to get the latest fingerprint. + LabelFingerprint string `json:"labelFingerprint,omitempty"` + + // Labels: A list of labels to apply for this resource. Each label must + // comply with the requirements for labels. For example, + // "webserver-frontend": "images". A label value can also be empty (e.g. + // "my-label": ""). + Labels map[string]string `json:"labels,omitempty"` + + // ForceSendFields is a list of field names (e.g. "LabelFingerprint") to + // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to + // NullFields is a list of field names (e.g. "LabelFingerprint") 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 @@ -15732,76 +15739,77 @@ type HealthCheckService struct { NullFields []string `json:"-"` } -func (s *HealthCheckService) MarshalJSON() ([]byte, error) { - type NoMethod HealthCheckService +func (s *GlobalSetLabelsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GlobalSetLabelsRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// HealthCheckServiceReference: A full or valid partial URL to a health -// check service. For example, the following are valid URLs: - -// https://www.googleapis.com/compute/beta/projects/project-id/regions/us-west1/healthCheckServices/health-check-service -// - -// projects/project-id/regions/us-west1/healthCheckServices/health-check- -// service - regions/us-west1/healthCheckServices/health-check-service -type HealthCheckServiceReference struct { - HealthCheckService string `json:"healthCheckService,omitempty"` +type GlobalSetPolicyRequest struct { + // Bindings: Flatten Policy to create a backward compatible wire-format. + // Deprecated. Use 'policy' to specify bindings. + Bindings []*Binding `json:"bindings,omitempty"` - // ForceSendFields is a list of field names (e.g. "HealthCheckService") - // to unconditionally include in API requests. By default, fields with + // Etag: Flatten Policy to create a backward compatible wire-format. + // Deprecated. Use 'policy' to specify the etag. + Etag string `json:"etag,omitempty"` + + // Policy: REQUIRED: The complete policy to be applied to the + // 'resource'. The size of the policy is limited to a few 10s of KB. An + // empty policy is in general a valid policy but certain services (like + // Projects) might reject them. + Policy *Policy `json:"policy,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Bindings") to + // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HealthCheckService") 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. "Bindings") 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 *HealthCheckServiceReference) MarshalJSON() ([]byte, error) { - type NoMethod HealthCheckServiceReference +func (s *GlobalSetPolicyRequest) MarshalJSON() ([]byte, error) { + type NoMethod GlobalSetPolicyRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type HealthCheckServicesList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of HealthCheckService resources. - Items []*HealthCheckService `json:"items,omitempty"` - +// GuestAttributes: A guest attributes entry. +type GuestAttributes struct { // Kind: [Output Only] Type of the resource. Always - // compute#healthCheckServicesList for lists of HealthCheckServices. + // compute#guestAttributes for guest attributes entry. Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` + // QueryPath: The path to be queried. This can be the default namespace + // ('') or a nested namespace ('\/') or a specified key ('\/\'). + QueryPath string `json:"queryPath,omitempty"` + + // QueryValue: [Output Only] The value of the requested queried path. + QueryValue *GuestAttributesValue `json:"queryValue,omitempty"` // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *HealthCheckServicesListWarning `json:"warning,omitempty"` + // VariableKey: The key to search for. + VariableKey string `json:"variableKey,omitempty"` + + // VariableValue: [Output Only] The value found for the requested key. + VariableValue string `json:"variableValue,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. "Kind") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -15809,7 +15817,7 @@ type HealthCheckServicesList struct { // 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 + // 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 @@ -15818,92 +15826,24 @@ type HealthCheckServicesList struct { NullFields []string `json:"-"` } -func (s *HealthCheckServicesList) MarshalJSON() ([]byte, error) { - type NoMethod HealthCheckServicesList +func (s *GuestAttributes) MarshalJSON() ([]byte, error) { + type NoMethod GuestAttributes raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// HealthCheckServicesListWarning: [Output Only] Informational warning -// message. -type HealthCheckServicesListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient - // changes made by a failed operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was - // created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk - // that is larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api - // call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an - // injected kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV - // backend service is associated with a health check that is not of type - // HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to - // list overhead quota exceed which captures the amount of resources - // filtered out by user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is - // not assigned to an instance on the network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot - // ip forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's - // nextHopInstance URL refers to an instance that does not have an ipv6 - // interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL - // refers to an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance - // URL refers to an instance that is not on the same network as the - // route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not - // have a status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to - // continue the process despite the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list - // page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be - // missing due to errors - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource - // that requires a TOS they have not accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a - // resource is in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to - // auto-delete could not be deleted because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in - // instance group manager is valid as such, but its application does not - // make a lot of sense, because it allows only single instance in - // instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema - // are present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` +// GuestAttributesEntry: A guest attributes namespace/key/value entry. +type GuestAttributesEntry struct { + // Key: Key for the guest attribute entry. + Key string `json:"key,omitempty"` - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" - // } - Data []*HealthCheckServicesListWarningData `json:"data,omitempty"` + // Namespace: Namespace for the guest attribute entry. + Namespace string `json:"namespace,omitempty"` - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` + // Value: Value for the guest attribute entry. + Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Code") to + // ForceSendFields is a list of field names (e.g. "Key") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -15911,7 +15851,7 @@ type HealthCheckServicesListWarning struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API + // NullFields is a list of field names (e.g. "Key") 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 @@ -15920,27 +15860,18 @@ type HealthCheckServicesListWarning struct { NullFields []string `json:"-"` } -func (s *HealthCheckServicesListWarning) MarshalJSON() ([]byte, error) { - type NoMethod HealthCheckServicesListWarning +func (s *GuestAttributesEntry) MarshalJSON() ([]byte, error) { + type NoMethod GuestAttributesEntry raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type HealthCheckServicesListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` - - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` +// GuestAttributesValue: Array of guest attribute namespace/key/value +// tuples. +type GuestAttributesValue struct { + Items []*GuestAttributesEntry `json:"items,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to + // ForceSendFields is a list of field names (e.g. "Items") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -15948,7 +15879,7 @@ type HealthCheckServicesListWarningData struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API + // NullFields is a list of field names (e.g. "Items") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -15957,45 +15888,35 @@ type HealthCheckServicesListWarningData struct { NullFields []string `json:"-"` } -func (s *HealthCheckServicesListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod HealthCheckServicesListWarningData +func (s *GuestAttributesValue) MarshalJSON() ([]byte, error) { + type NoMethod GuestAttributesValue raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type HealthChecksAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of HealthChecksScopedList resources. - Items map[string]HealthChecksScopedList `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - - // Warning: [Output Only] Informational warning message. - Warning *HealthChecksAggregatedListWarning `json:"warning,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` +// GuestOsFeature: Guest OS features. +type GuestOsFeature struct { + // Type: The ID of a supported feature. To add multiple values, use + // commas to separate values. Set to one or more of the following + // values: - VIRTIO_SCSI_MULTIQUEUE - WINDOWS - MULTI_IP_SUBNET - + // UEFI_COMPATIBLE - GVNIC - SEV_CAPABLE - SUSPEND_RESUME_COMPATIBLE - + // SEV_LIVE_MIGRATABLE - SEV_SNP_CAPABLE For more information, see + // Enabling guest operating system features. + // + // Possible values: + // "FEATURE_TYPE_UNSPECIFIED" + // "GVNIC" + // "MULTI_IP_SUBNET" + // "SECURE_BOOT" + // "SEV_CAPABLE" + // "SEV_LIVE_MIGRATABLE" + // "SEV_SNP_CAPABLE" + // "UEFI_COMPATIBLE" + // "VIRTIO_SCSI_MULTIQUEUE" + // "WINDOWS" + Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to + // ForceSendFields is a list of field names (e.g. "Type") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -16003,7 +15924,7 @@ type HealthChecksAggregatedList struct { // 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 + // NullFields is a list of field names (e.g. "Type") 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 @@ -16012,92 +15933,84 @@ type HealthChecksAggregatedList struct { NullFields []string `json:"-"` } -func (s *HealthChecksAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod HealthChecksAggregatedList +func (s *GuestOsFeature) MarshalJSON() ([]byte, error) { + type NoMethod GuestOsFeature raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// HealthChecksAggregatedListWarning: [Output Only] Informational -// warning message. -type HealthChecksAggregatedListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. +type HTTP2HealthCheck struct { + // Host: The value of the host header in the HTTP/2 health check + // request. If left empty (default value), the host header is set to the + // destination IP address to which health check packets are sent. The + // destination IP address depends on the type of load balancer. For + // details, see: + // https://cloud.google.com/load-balancing/docs/health-check-concepts#hc-packet-dest + Host string `json:"host,omitempty"` + + // Port: The TCP port number to which the health check prober sends + // packets. The default value is 443. Valid values are 1 through 65535. + Port int64 `json:"port,omitempty"` + + // PortName: Not supported. + PortName string `json:"portName,omitempty"` + + // PortSpecification: Specifies how a port is selected for health + // checking. Can be one of the following values: USE_FIXED_PORT: + // Specifies a port number explicitly using the port field in the health + // check. Supported by backend services for pass-through load balancers + // and backend services for proxy load balancers. Not supported by + // target pools. The health check supports all backends supported by the + // backend service provided the backend can be health checked. For + // example, GCE_VM_IP network endpoint groups, GCE_VM_IP_PORT network + // endpoint groups, and instance group backends. USE_NAMED_PORT: Not + // supported. USE_SERVING_PORT: Provides an indirect method of + // specifying the health check port by referring to the backend service. + // Only supported by backend services for proxy load balancers. Not + // supported by target pools. Not supported by backend services for + // pass-through load balancers. Supports all backends that can be health + // checked; for example, GCE_VM_IP_PORT network endpoint groups and + // instance group backends. For GCE_VM_IP_PORT network endpoint group + // backends, the health check uses the port number specified for each + // endpoint in the network endpoint group. For instance group backends, + // the health check uses the port number determined by looking up the + // backend service's named port in the instance group's list of named + // ports. // // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient - // changes made by a failed operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was - // created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk - // that is larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api - // call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an - // injected kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV - // backend service is associated with a health check that is not of type - // HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to - // list overhead quota exceed which captures the amount of resources - // filtered out by user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is - // not assigned to an instance on the network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot - // ip forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's - // nextHopInstance URL refers to an instance that does not have an ipv6 - // interface on the same network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL - // refers to an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance - // URL refers to an instance that is not on the same network as the - // route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not - // have a status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to - // continue the process despite the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list - // page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be - // missing due to errors - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource - // that requires a TOS they have not accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a - // resource is in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to - // auto-delete could not be deleted because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in - // instance group manager is valid as such, but its application does not - // make a lot of sense, because it allows only single instance in - // instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema - // are present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` + // "USE_FIXED_PORT" - The port number in the health check's port is + // used for health checking. Applies to network endpoint group and + // instance group backends. + // "USE_NAMED_PORT" - Not supported. + // "USE_SERVING_PORT" - For network endpoint group backends, the + // health check uses the port number specified on each endpoint in the + // network endpoint group. For instance group backends, the health check + // uses the port number specified for the backend service's named port + // defined in the instance group's named ports. + PortSpecification string `json:"portSpecification,omitempty"` - // Data: [Output Only] Metadata about this warning in key: value format. - // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" - // } - Data []*HealthChecksAggregatedListWarningData `json:"data,omitempty"` + // ProxyHeader: Specifies the type of proxy header to append before + // sending data to the backend, either NONE or PROXY_V1. The default is + // NONE. + // + // Possible values: + // "NONE" + // "PROXY_V1" + ProxyHeader string `json:"proxyHeader,omitempty"` - // Message: [Output Only] A human-readable description of the warning - // code. - Message string `json:"message,omitempty"` + // RequestPath: The request path of the HTTP/2 health check request. The + // default value is /. + RequestPath string `json:"requestPath,omitempty"` - // ForceSendFields is a list of field names (e.g. "Code") to + // Response: Creates a content-based HTTP/2 health check. In addition to + // the required HTTP 200 (OK) status code, you can configure the health + // check to pass only when the backend sends this specific ASCII + // response string within the first 1024 bytes of the HTTP response + // body. For details, see: + // https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-http + Response string `json:"response,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Host") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -16105,7 +16018,7 @@ type HealthChecksAggregatedListWarning struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API + // NullFields is a list of field names (e.g. "Host") 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 @@ -16114,27 +16027,84 @@ type HealthChecksAggregatedListWarning struct { NullFields []string `json:"-"` } -func (s *HealthChecksAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod HealthChecksAggregatedListWarning +func (s *HTTP2HealthCheck) MarshalJSON() ([]byte, error) { + type NoMethod HTTP2HealthCheck raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type HealthChecksAggregatedListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning - // being returned. For example, for warnings where there are no results - // in a list request for a particular zone, this key might be scope and - // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource and a suggested replacement, or a - // warning about invalid network settings (for example, if an instance - // attempts to perform IP forwarding but is not enabled for IP - // forwarding). - Key string `json:"key,omitempty"` +type HTTPHealthCheck struct { + // Host: The value of the host header in the HTTP health check request. + // If left empty (default value), the host header is set to the + // destination IP address to which health check packets are sent. The + // destination IP address depends on the type of load balancer. For + // details, see: + // https://cloud.google.com/load-balancing/docs/health-check-concepts#hc-packet-dest + Host string `json:"host,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` + // Port: The TCP port number to which the health check prober sends + // packets. The default value is 80. Valid values are 1 through 65535. + Port int64 `json:"port,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to + // PortName: Not supported. + PortName string `json:"portName,omitempty"` + + // PortSpecification: Specifies how a port is selected for health + // checking. Can be one of the following values: USE_FIXED_PORT: + // Specifies a port number explicitly using the port field in the health + // check. Supported by backend services for pass-through load balancers + // and backend services for proxy load balancers. Also supported in + // legacy HTTP health checks for target pools. The health check supports + // all backends supported by the backend service provided the backend + // can be health checked. For example, GCE_VM_IP network endpoint + // groups, GCE_VM_IP_PORT network endpoint groups, and instance group + // backends. USE_NAMED_PORT: Not supported. USE_SERVING_PORT: Provides + // an indirect method of specifying the health check port by referring + // to the backend service. Only supported by backend services for proxy + // load balancers. Not supported by target pools. Not supported by + // backend services for pass-through load balancers. Supports all + // backends that can be health checked; for example, GCE_VM_IP_PORT + // network endpoint groups and instance group backends. For + // GCE_VM_IP_PORT network endpoint group backends, the health check uses + // the port number specified for each endpoint in the network endpoint + // group. For instance group backends, the health check uses the port + // number determined by looking up the backend service's named port in + // the instance group's list of named ports. + // + // Possible values: + // "USE_FIXED_PORT" - The port number in the health check's port is + // used for health checking. Applies to network endpoint group and + // instance group backends. + // "USE_NAMED_PORT" - Not supported. + // "USE_SERVING_PORT" - For network endpoint group backends, the + // health check uses the port number specified on each endpoint in the + // network endpoint group. For instance group backends, the health check + // uses the port number specified for the backend service's named port + // defined in the instance group's named ports. + PortSpecification string `json:"portSpecification,omitempty"` + + // ProxyHeader: Specifies the type of proxy header to append before + // sending data to the backend, either NONE or PROXY_V1. The default is + // NONE. + // + // Possible values: + // "NONE" + // "PROXY_V1" + ProxyHeader string `json:"proxyHeader,omitempty"` + + // RequestPath: The request path of the HTTP health check request. The + // default value is /. + RequestPath string `json:"requestPath,omitempty"` + + // Response: Creates a content-based HTTP health check. In addition to + // the required HTTP 200 (OK) status code, you can configure the health + // check to pass only when the backend sends this specific ASCII + // response string within the first 1024 bytes of the HTTP response + // body. For details, see: + // https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-http + Response string `json:"response,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Host") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -16142,7 +16112,7 @@ type HealthChecksAggregatedListWarningData struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API + // NullFields is a list of field names (e.g. "Host") 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 @@ -16151,21 +16121,84 @@ type HealthChecksAggregatedListWarningData struct { NullFields []string `json:"-"` } -func (s *HealthChecksAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod HealthChecksAggregatedListWarningData +func (s *HTTPHealthCheck) MarshalJSON() ([]byte, error) { + type NoMethod HTTPHealthCheck raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type HealthChecksScopedList struct { - // HealthChecks: A list of HealthChecks contained in this scope. - HealthChecks []*HealthCheck `json:"healthChecks,omitempty"` +type HTTPSHealthCheck struct { + // Host: The value of the host header in the HTTPS health check request. + // If left empty (default value), the host header is set to the + // destination IP address to which health check packets are sent. The + // destination IP address depends on the type of load balancer. For + // details, see: + // https://cloud.google.com/load-balancing/docs/health-check-concepts#hc-packet-dest + Host string `json:"host,omitempty"` - // Warning: Informational warning which replaces the list of backend - // services when the list is empty. - Warning *HealthChecksScopedListWarning `json:"warning,omitempty"` + // Port: The TCP port number to which the health check prober sends + // packets. The default value is 443. Valid values are 1 through 65535. + Port int64 `json:"port,omitempty"` - // ForceSendFields is a list of field names (e.g. "HealthChecks") to + // PortName: Not supported. + PortName string `json:"portName,omitempty"` + + // PortSpecification: Specifies how a port is selected for health + // checking. Can be one of the following values: USE_FIXED_PORT: + // Specifies a port number explicitly using the port field in the health + // check. Supported by backend services for pass-through load balancers + // and backend services for proxy load balancers. Not supported by + // target pools. The health check supports all backends supported by the + // backend service provided the backend can be health checked. For + // example, GCE_VM_IP network endpoint groups, GCE_VM_IP_PORT network + // endpoint groups, and instance group backends. USE_NAMED_PORT: Not + // supported. USE_SERVING_PORT: Provides an indirect method of + // specifying the health check port by referring to the backend service. + // Only supported by backend services for proxy load balancers. Not + // supported by target pools. Not supported by backend services for + // pass-through load balancers. Supports all backends that can be health + // checked; for example, GCE_VM_IP_PORT network endpoint groups and + // instance group backends. For GCE_VM_IP_PORT network endpoint group + // backends, the health check uses the port number specified for each + // endpoint in the network endpoint group. For instance group backends, + // the health check uses the port number determined by looking up the + // backend service's named port in the instance group's list of named + // ports. + // + // Possible values: + // "USE_FIXED_PORT" - The port number in the health check's port is + // used for health checking. Applies to network endpoint group and + // instance group backends. + // "USE_NAMED_PORT" - Not supported. + // "USE_SERVING_PORT" - For network endpoint group backends, the + // health check uses the port number specified on each endpoint in the + // network endpoint group. For instance group backends, the health check + // uses the port number specified for the backend service's named port + // defined in the instance group's named ports. + PortSpecification string `json:"portSpecification,omitempty"` + + // ProxyHeader: Specifies the type of proxy header to append before + // sending data to the backend, either NONE or PROXY_V1. The default is + // NONE. + // + // Possible values: + // "NONE" + // "PROXY_V1" + ProxyHeader string `json:"proxyHeader,omitempty"` + + // RequestPath: The request path of the HTTPS health check request. The + // default value is /. + RequestPath string `json:"requestPath,omitempty"` + + // Response: Creates a content-based HTTPS health check. In addition to + // the required HTTP 200 (OK) status code, you can configure the health + // check to pass only when the backend sends this specific ASCII + // response string within the first 1024 bytes of the HTTP response + // body. For details, see: + // https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-http + Response string `json:"response,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Host") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -16173,24 +16206,201 @@ type HealthChecksScopedList struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HealthChecks") 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. "Host") 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 *HealthChecksScopedList) MarshalJSON() ([]byte, error) { - type NoMethod HealthChecksScopedList +func (s *HTTPSHealthCheck) MarshalJSON() ([]byte, error) { + type NoMethod HTTPSHealthCheck raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// HealthChecksScopedListWarning: Informational warning which replaces -// the list of backend services when the list is empty. -type HealthChecksScopedListWarning struct { +// HealthCheck: Represents a Health Check resource. Google Compute +// Engine has two Health Check resources: * Global +// (/compute/docs/reference/rest/beta/healthChecks) * Regional +// (/compute/docs/reference/rest/beta/regionHealthChecks) Internal +// HTTP(S) load balancers must use regional health checks +// (`compute.v1.regionHealthChecks`). Traffic Director must use global +// health checks (`compute.v1.healthChecks`). Internal TCP/UDP load +// balancers can use either regional or global health checks +// (`compute.v1.regionHealthChecks` or `compute.v1.healthChecks`). +// External HTTP(S), TCP proxy, and SSL proxy load balancers as well as +// managed instance group auto-healing must use global health checks +// (`compute.v1.healthChecks`). Backend service-based network load +// balancers must use regional health checks +// (`compute.v1.regionHealthChecks`). Target pool-based network load +// balancers must use legacy HTTP health checks +// (`compute.v1.httpHealthChecks`). For more information, see Health +// checks overview. +type HealthCheck struct { + // CheckIntervalSec: How often (in seconds) to send a health check. The + // default value is 5 seconds. + CheckIntervalSec int64 `json:"checkIntervalSec,omitempty"` + + // CreationTimestamp: [Output Only] Creation timestamp in 3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: An optional description of this resource. Provide this + // property when you create the resource. + Description string `json:"description,omitempty"` + + GrpcHealthCheck *GRPCHealthCheck `json:"grpcHealthCheck,omitempty"` + + // HealthyThreshold: A so-far unhealthy instance will be marked healthy + // after this many consecutive successes. The default value is 2. + HealthyThreshold int64 `json:"healthyThreshold,omitempty"` + + Http2HealthCheck *HTTP2HealthCheck `json:"http2HealthCheck,omitempty"` + + HttpHealthCheck *HTTPHealthCheck `json:"httpHealthCheck,omitempty"` + + HttpsHealthCheck *HTTPSHealthCheck `json:"httpsHealthCheck,omitempty"` + + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` + + // Kind: Type of the resource. + Kind string `json:"kind,omitempty"` + + // LogConfig: Configure logging on this health check. + LogConfig *HealthCheckLogConfig `json:"logConfig,omitempty"` + + // Name: Name of the resource. Provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. For example, a name that is 1-63 characters long, matches + // the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?`, and otherwise + // complies with RFC1035. This regular expression describes a name where + // the first character is a lowercase letter, and all following + // characters are a dash, lowercase letter, or digit, except the last + // character, which isn't a dash. + Name string `json:"name,omitempty"` + + // Region: [Output Only] Region where the health check resides. Not + // applicable to global health checks. + Region string `json:"region,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + SslHealthCheck *SSLHealthCheck `json:"sslHealthCheck,omitempty"` + + TcpHealthCheck *TCPHealthCheck `json:"tcpHealthCheck,omitempty"` + + // TimeoutSec: How long (in seconds) to wait before claiming failure. + // The default value is 5 seconds. It is invalid for timeoutSec to have + // greater value than checkIntervalSec. + TimeoutSec int64 `json:"timeoutSec,omitempty"` + + // Type: Specifies the type of the healthCheck, either TCP, SSL, HTTP, + // HTTPS, HTTP2 or GRPC. Exactly one of the protocol-specific health + // check fields must be specified, which must match type field. + // + // Possible values: + // "GRPC" + // "HTTP" + // "HTTP2" + // "HTTPS" + // "INVALID" + // "SSL" + // "TCP" + Type string `json:"type,omitempty"` + + // UnhealthyThreshold: A so-far healthy instance will be marked + // unhealthy after this many consecutive failures. The default value is + // 2. + UnhealthyThreshold int64 `json:"unhealthyThreshold,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CheckIntervalSec") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CheckIntervalSec") 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 *HealthCheck) MarshalJSON() ([]byte, error) { + type NoMethod HealthCheck + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HealthCheckList: Contains a list of HealthCheck resources. +type HealthCheckList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of HealthCheck resources. + Items []*HealthCheck `json:"items,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *HealthCheckListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HealthCheckList) MarshalJSON() ([]byte, error) { + type NoMethod HealthCheckList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HealthCheckListWarning: [Output Only] Informational warning message. +type HealthCheckListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -16261,7 +16471,7 @@ type HealthChecksScopedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*HealthChecksScopedListWarningData `json:"data,omitempty"` + Data []*HealthCheckListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -16284,13 +16494,13 @@ type HealthChecksScopedListWarning struct { NullFields []string `json:"-"` } -func (s *HealthChecksScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod HealthChecksScopedListWarning +func (s *HealthCheckListWarning) MarshalJSON() ([]byte, error) { + type NoMethod HealthCheckListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type HealthChecksScopedListWarningData struct { +type HealthCheckListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -16321,66 +16531,51 @@ type HealthChecksScopedListWarningData struct { NullFields []string `json:"-"` } -func (s *HealthChecksScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod HealthChecksScopedListWarningData +func (s *HealthCheckListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod HealthCheckListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type HealthStatus struct { - // Annotations: Metadata defined as annotations for network endpoint. - Annotations map[string]string `json:"annotations,omitempty"` - - // ForwardingRule: URL of the forwarding rule associated with the health - // status of the instance. - ForwardingRule string `json:"forwardingRule,omitempty"` - - // ForwardingRuleIp: A forwarding rule IP address assigned to this - // instance. - ForwardingRuleIp string `json:"forwardingRuleIp,omitempty"` - - // HealthState: Health state of the IPv4 address of the instance. - // - // Possible values: - // "HEALTHY" - // "UNHEALTHY" - HealthState string `json:"healthState,omitempty"` - - // Instance: URL of the instance resource. - Instance string `json:"instance,omitempty"` +// HealthCheckLogConfig: Configuration of logging on a health check. If +// logging is enabled, logs will be exported to Stackdriver. +type HealthCheckLogConfig struct { + // Enable: Indicates whether or not to export logs. This is false by + // default, which means no health check logging will be done. + Enable bool `json:"enable,omitempty"` - // IpAddress: For target pool based Network Load Balancing, it indicates - // the forwarding rule's IP address assigned to this instance. For other - // types of load balancing, the field indicates VM internal ip. - IpAddress string `json:"ipAddress,omitempty"` + // ForceSendFields is a list of field names (e.g. "Enable") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` - // Port: The named port of the instance group, not necessarily the port - // that is health-checked. - Port int64 `json:"port,omitempty"` + // NullFields is a list of field names (e.g. "Enable") 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:"-"` +} - Weight string `json:"weight,omitempty"` +func (s *HealthCheckLogConfig) MarshalJSON() ([]byte, error) { + type NoMethod HealthCheckLogConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // Possible values: - // "INVALID_WEIGHT" - The response to a Health Check probe had the - // HTTP response header field X-Load-Balancing-Endpoint-Weight, but its - // content was invalid (i.e., not a non-negative single-precision - // floating-point number in decimal string representation). - // "MISSING_WEIGHT" - The response to a Health Check probe did not - // have the HTTP response header field X-Load-Balancing-Endpoint-Weight. - // "UNAVAILABLE_WEIGHT" - This is the value when the accompanied - // health status is either TIMEOUT (i.e.,the Health Check probe was not - // able to get a response in time) or UNKNOWN. For the latter, it should - // be typically because there has not been sufficient time to parse and - // report the weight for a new backend (which is with 0.0.0.0 ip - // address). However, it can be also due to an outage case for which the - // health status is explicitly reset to UNKNOWN. - // "WEIGHT_NONE" - This is the default value when WeightReportMode is - // DISABLE, and is also the initial value when WeightReportMode has just - // updated to ENABLE or DRY_RUN and there has not been sufficient time - // to parse and report the backend weight. - WeightError string `json:"weightError,omitempty"` +// HealthCheckReference: A full or valid partial URL to a health check. +// For example, the following are valid URLs: - +// https://www.googleapis.com/compute/beta/projects/project-id/global/httpHealthChecks/health-check +// - projects/project-id/global/httpHealthChecks/health-check - +// global/httpHealthChecks/health-check +type HealthCheckReference struct { + HealthCheck string `json:"healthCheck,omitempty"` - // ForceSendFields is a list of field names (e.g. "Annotations") to + // ForceSendFields is a list of field names (e.g. "HealthCheck") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -16388,7 +16583,7 @@ type HealthStatus struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Annotations") to include + // NullFields is a list of field names (e.g. "HealthCheck") 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 @@ -16397,58 +16592,140 @@ type HealthStatus struct { NullFields []string `json:"-"` } -func (s *HealthStatus) MarshalJSON() ([]byte, error) { - type NoMethod HealthStatus +func (s *HealthCheckReference) MarshalJSON() ([]byte, error) { + type NoMethod HealthCheckReference raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type HealthStatusForNetworkEndpoint struct { - // BackendService: URL of the backend service associated with the health - // state of the network endpoint. - BackendService *BackendServiceReference `json:"backendService,omitempty"` +// HealthCheckService: Represents a Health-Check as a Service resource. +type HealthCheckService struct { + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` - // ForwardingRule: URL of the forwarding rule associated with the health - // state of the network endpoint. - ForwardingRule *ForwardingRuleReference `json:"forwardingRule,omitempty"` + // Description: An optional description of this resource. Provide this + // property when you create the resource. + Description string `json:"description,omitempty"` - // HealthCheck: URL of the health check associated with the health state - // of the network endpoint. - HealthCheck *HealthCheckReference `json:"healthCheck,omitempty"` + // Fingerprint: Fingerprint of this resource. A hash of the contents + // stored in this object. This field is used in optimistic locking. This + // field will be ignored when inserting a HealthCheckService. An + // up-to-date fingerprint must be provided in order to patch/update the + // HealthCheckService; Otherwise, the request will fail with error 412 + // conditionNotMet. To see the latest fingerprint, make a get() request + // to retrieve the HealthCheckService. + Fingerprint string `json:"fingerprint,omitempty"` - // HealthCheckService: URL of the health check service associated with - // the health state of the network endpoint. - HealthCheckService *HealthCheckServiceReference `json:"healthCheckService,omitempty"` + // HealthChecks: A list of URLs to the HealthCheck resources. Must have + // at least one HealthCheck, and not more than 10 for regional + // HealthCheckService, and not more than 1 for global + // HealthCheckService. HealthCheck resources must have + // portSpecification=USE_SERVING_PORT or + // portSpecification=USE_FIXED_PORT. For regional HealthCheckService, + // the HealthCheck must be regional and in the same region. For global + // HealthCheckService, HealthCheck must be global. Mix of regional and + // global HealthChecks is not supported. Multiple regional HealthChecks + // must belong to the same region. Regional HealthChecks must belong to + // the same region as zones of NetworkEndpointGroups. For global + // HealthCheckService using global INTERNET_IP_PORT + // NetworkEndpointGroups, the global HealthChecks must specify + // sourceRegions, and HealthChecks that specify sourceRegions can only + // be used with global INTERNET_IP_PORT NetworkEndpointGroups. + HealthChecks []string `json:"healthChecks,omitempty"` - // HealthState: Health state of the network endpoint determined based on - // the health checks configured. + // HealthStatusAggregationPolicy: Optional. Policy for how the results + // from multiple health checks for the same endpoint are aggregated. + // Defaults to NO_AGGREGATION if unspecified. - NO_AGGREGATION. An + // EndpointHealth message is returned for each pair in the health check + // service. - AND. If any health check of an endpoint reports UNHEALTHY, + // then UNHEALTHY is the HealthState of the endpoint. If all health + // checks report HEALTHY, the HealthState of the endpoint is HEALTHY. . + // This is only allowed with regional HealthCheckService. // // Possible values: - // "DRAINING" - Endpoint is being drained. - // "HEALTHY" - Endpoint is healthy. - // "UNHEALTHY" - Endpoint is unhealthy. - // "UNKNOWN" - Health status of the endpoint is unknown. - HealthState string `json:"healthState,omitempty"` + // "AND" - If any backend's health check reports UNHEALTHY, then + // UNHEALTHY is the HealthState of the entire health check service. If + // all backend's are healthy, the HealthState of the health check + // service is HEALTHY. + // "NO_AGGREGATION" - An EndpointHealth message is returned for each + // backend in the health check service. + HealthStatusAggregationPolicy string `json:"healthStatusAggregationPolicy,omitempty"` - // Ipv6HealthState: Health state of the ipv6 network endpoint determined - // based on the health checks configured. + // HealthStatusAggregationStrategy: This field is deprecated. Use + // health_status_aggregation_policy instead. Policy for how the results + // from multiple health checks for the same endpoint are aggregated. - + // NO_AGGREGATION. An EndpointHealth message is returned for each + // backend in the health check service. - AND. If any backend's health + // check reports UNHEALTHY, then UNHEALTHY is the HealthState of the + // entire health check service. If all backend's are healthy, the + // HealthState of the health check service is HEALTHY. . // // Possible values: - // "DRAINING" - Endpoint is being drained. - // "HEALTHY" - Endpoint is healthy. - // "UNHEALTHY" - Endpoint is unhealthy. - // "UNKNOWN" - Health status of the endpoint is unknown. - Ipv6HealthState string `json:"ipv6HealthState,omitempty"` + // "AND" - This is deprecated. Use health_status_aggregation_policy + // instead. If any backend's health check reports UNHEALTHY, then + // UNHEALTHY is the HealthState of the entire health check service. If + // all backend's are healthy, the HealthState of the health check + // service is HEALTHY. + // "NO_AGGREGATION" - This is deprecated. Use + // health_status_aggregation_policy instead. An EndpointHealth message + // is returned for each backend in the health check service. + HealthStatusAggregationStrategy string `json:"healthStatusAggregationStrategy,omitempty"` - // ForceSendFields is a list of field names (e.g. "BackendService") to - // unconditionally include in API requests. By default, fields with + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` + + // Kind: [Output only] Type of the resource. Always + // compute#healthCheckServicefor health check services. + Kind string `json:"kind,omitempty"` + + // Name: Name of the resource. The name must be 1-63 characters long, + // and comply with RFC1035. Specifically, the name must be 1-63 + // characters long and match the regular expression + // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be + // a lowercase letter, and all following characters must be a dash, + // lowercase letter, or digit, except the last character, which cannot + // be a dash. + Name string `json:"name,omitempty"` + + // NetworkEndpointGroups: A list of URLs to the NetworkEndpointGroup + // resources. Must not have more than 100. For regional + // HealthCheckService, NEGs must be in zones in the region of the + // HealthCheckService. For global HealthCheckServices, the + // NetworkEndpointGroups must be global INTERNET_IP_PORT. + NetworkEndpointGroups []string `json:"networkEndpointGroups,omitempty"` + + // NotificationEndpoints: A list of URLs to the NotificationEndpoint + // resources. Must not have more than 10. A list of endpoints for + // receiving notifications of change in health status. For regional + // HealthCheckService, NotificationEndpoint must be regional and in the + // same region. For global HealthCheckService, NotificationEndpoint must + // be global. + NotificationEndpoints []string `json:"notificationEndpoints,omitempty"` + + // Region: [Output Only] URL of the region where the health check + // service resides. This field is not applicable to global health check + // services. You must specify this field as part of the HTTP request + // URL. It is not settable as a field in the request body. + Region string `json:"region,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreationTimestamp") + // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BackendService") to + // NullFields is a list of field names (e.g. "CreationTimestamp") 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 @@ -16458,97 +16735,76 @@ type HealthStatusForNetworkEndpoint struct { NullFields []string `json:"-"` } -func (s *HealthStatusForNetworkEndpoint) MarshalJSON() ([]byte, error) { - type NoMethod HealthStatusForNetworkEndpoint +func (s *HealthCheckService) MarshalJSON() ([]byte, error) { + type NoMethod HealthCheckService raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Help: Provides links to documentation or for performing an out of -// band action. For example, if a quota check failed with an error -// indicating the calling project hasn't enabled the accessed service, -// this can contain a URL pointing directly to the right place in the -// developer console to flip the bit. -type Help struct { - // Links: URL(s) pointing to additional information on handling the - // current error. - Links []*HelpLink `json:"links,omitempty"` +// HealthCheckServiceReference: A full or valid partial URL to a health +// check service. For example, the following are valid URLs: - +// https://www.googleapis.com/compute/beta/projects/project-id/regions/us-west1/healthCheckServices/health-check-service +// - +// projects/project-id/regions/us-west1/healthCheckServices/health-check- +// service - regions/us-west1/healthCheckServices/health-check-service +type HealthCheckServiceReference struct { + HealthCheckService string `json:"healthCheckService,omitempty"` - // ForceSendFields is a list of field names (e.g. "Links") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "HealthCheckService") + // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Links") 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. "HealthCheckService") 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 *Help) MarshalJSON() ([]byte, error) { - type NoMethod Help +func (s *HealthCheckServiceReference) MarshalJSON() ([]byte, error) { + type NoMethod HealthCheckServiceReference raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// HelpLink: Describes a URL link. -type HelpLink struct { - // Description: Describes what the link offers. - Description string `json:"description,omitempty"` - - // Url: The URL of the link. - Url string `json:"url,omitempty"` +type HealthCheckServicesList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` - // ForceSendFields is a list of field names (e.g. "Description") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` + // Items: A list of HealthCheckService resources. + Items []*HealthCheckService `json:"items,omitempty"` - // NullFields is a list of field names (e.g. "Description") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} + // Kind: [Output Only] Type of the resource. Always + // compute#healthCheckServicesList for lists of HealthCheckServices. + Kind string `json:"kind,omitempty"` -func (s *HelpLink) MarshalJSON() ([]byte, error) { - type NoMethod HelpLink - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` -// HostRule: UrlMaps A host-matching rule for a URL. If matched, will -// use the named PathMatcher to select the BackendService. -type HostRule struct { - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` - // Hosts: The list of host patterns to match. They must be valid - // hostnames with optional port numbers in the format host:port. * - // matches any string of ([a-z0-9-.]*). In that case, * must be the - // first character, and if followed by anything, the immediate following - // character must be either - or .. * based matching is not supported - // when the URL map is bound to a target gRPC proxy that has the - // validateForProxyless field set to true. - Hosts []string `json:"hosts,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *HealthCheckServicesListWarning `json:"warning,omitempty"` - // PathMatcher: The name of the PathMatcher to use to match the path - // portion of the URL if the hostRule matches the URL's host portion. - PathMatcher string `json:"pathMatcher,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Description") to + // ForceSendFields is a list of field names (e.g. "Id") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -16556,37 +16812,101 @@ type HostRule struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // 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 *HostRule) MarshalJSON() ([]byte, error) { - type NoMethod HostRule +func (s *HealthCheckServicesList) MarshalJSON() ([]byte, error) { + type NoMethod HealthCheckServicesList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// HttpFaultAbort: Specification for how requests are aborted as part of -// fault injection. -type HttpFaultAbort struct { - // HttpStatus: The HTTP status code used to abort the request. The value - // must be from 200 to 599 inclusive. For gRPC protocol, the gRPC status - // code is mapped to HTTP status code according to this mapping table. - // HTTP status 200 is mapped to gRPC status UNKNOWN. Injecting an OK - // status is currently not supported by Traffic Director. - HttpStatus int64 `json:"httpStatus,omitempty"` +// HealthCheckServicesListWarning: [Output Only] Informational warning +// message. +type HealthCheckServicesListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient + // changes made by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was + // created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk + // that is larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api + // call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an + // injected kernel, which is deprecated. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV + // backend service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to + // list overhead quota exceed which captures the amount of resources + // filtered out by user-defined list filter. + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is + // not assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot + // ip forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's + // nextHopInstance URL refers to an instance that does not have an ipv6 + // interface on the same network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL + // refers to an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance + // URL refers to an instance that is not on the same network as the + // route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not + // have a status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to + // continue the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list + // page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be + // missing due to errors + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource + // that requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a + // resource is in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to + // auto-delete could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in + // instance group manager is valid as such, but its application does not + // make a lot of sense, because it allows only single instance in + // instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema + // are present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` - // Percentage: The percentage of traffic for connections, operations, or - // requests that is aborted as part of fault injection. The value must - // be from 0.0 to 100.0 inclusive. - Percentage float64 `json:"percentage,omitempty"` + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" + // } + Data []*HealthCheckServicesListWarningData `json:"data,omitempty"` - // ForceSendFields is a list of field names (e.g. "HttpStatus") to + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -16594,8 +16914,8 @@ type HttpFaultAbort struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HttpStatus") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Code") 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. @@ -16603,39 +16923,27 @@ type HttpFaultAbort struct { NullFields []string `json:"-"` } -func (s *HttpFaultAbort) MarshalJSON() ([]byte, error) { - type NoMethod HttpFaultAbort +func (s *HealthCheckServicesListWarning) MarshalJSON() ([]byte, error) { + type NoMethod HealthCheckServicesListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -func (s *HttpFaultAbort) UnmarshalJSON(data []byte) error { - type NoMethod HttpFaultAbort - var s1 struct { - Percentage gensupport.JSONFloat64 `json:"percentage"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Percentage = float64(s1.Percentage) - return nil -} - -// HttpFaultDelay: Specifies the delay introduced by the load balancer -// before forwarding the request to the backend service as part of fault -// injection. -type HttpFaultDelay struct { - // FixedDelay: Specifies the value of the fixed delay interval. - FixedDelay *Duration `json:"fixedDelay,omitempty"` +type HealthCheckServicesListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` - // Percentage: The percentage of traffic for connections, operations, or - // requests for which a delay is introduced as part of fault injection. - // The value must be from 0.0 to 100.0 inclusive. - Percentage float64 `json:"percentage,omitempty"` + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "FixedDelay") to + // ForceSendFields is a list of field names (e.g. "Key") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -16643,8 +16951,8 @@ type HttpFaultDelay struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FixedDelay") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Key") 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. @@ -16652,86 +16960,45 @@ type HttpFaultDelay struct { NullFields []string `json:"-"` } -func (s *HttpFaultDelay) MarshalJSON() ([]byte, error) { - type NoMethod HttpFaultDelay +func (s *HealthCheckServicesListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod HealthCheckServicesListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -func (s *HttpFaultDelay) UnmarshalJSON(data []byte) error { - type NoMethod HttpFaultDelay - var s1 struct { - Percentage gensupport.JSONFloat64 `json:"percentage"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Percentage = float64(s1.Percentage) - return nil -} - -// HttpFaultInjection: The specification for fault injection introduced -// into traffic to test the resiliency of clients to backend service -// failure. As part of fault injection, when clients send requests to a -// backend service, delays can be introduced by the load balancer on a -// percentage of requests before sending those request to the backend -// service. Similarly requests from clients can be aborted by the load -// balancer for a percentage of requests. -type HttpFaultInjection struct { - // Abort: The specification for how client requests are aborted as part - // of fault injection. - Abort *HttpFaultAbort `json:"abort,omitempty"` +type HealthChecksAggregatedList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` - // Delay: The specification for how client requests are delayed as part - // of fault injection, before being sent to a backend service. - Delay *HttpFaultDelay `json:"delay,omitempty"` + // Items: A list of HealthChecksScopedList resources. + Items map[string]HealthChecksScopedList `json:"items,omitempty"` - // ForceSendFields is a list of field names (e.g. "Abort") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` - // NullFields is a list of field names (e.g. "Abort") 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:"-"` -} + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` -func (s *HttpFaultInjection) MarshalJSON() ([]byte, error) { - type NoMethod HttpFaultInjection - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` -// HttpFilterConfig: HttpFilterConfiguration supplies additional -// contextual settings for networkservices.HttpFilter resources enabled -// by Traffic Director. -type HttpFilterConfig struct { - // Config: The configuration needed to enable the - // networkservices.HttpFilter resource. The configuration must be YAML - // formatted and only contain fields defined in the protobuf identified - // in configTypeUrl - Config string `json:"config,omitempty"` + // Unreachables: [Output Only] Unreachable resources. + Unreachables []string `json:"unreachables,omitempty"` - // ConfigTypeUrl: The fully qualified versioned proto3 type url of the - // protobuf that the filter expects for its contextual settings, for - // example: type.googleapis.com/google.protobuf.Struct - ConfigTypeUrl string `json:"configTypeUrl,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *HealthChecksAggregatedListWarning `json:"warning,omitempty"` - // FilterName: Name of the networkservices.HttpFilter resource this - // configuration belongs to. This name must be known to the xDS client. - // Example: envoy.wasm - FilterName string `json:"filterName,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Config") to + // ForceSendFields is a list of field names (e.g. "Id") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -16739,7 +17006,7 @@ type HttpFilterConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Config") to include in API + // 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 @@ -16748,123 +17015,92 @@ type HttpFilterConfig struct { NullFields []string `json:"-"` } -func (s *HttpFilterConfig) MarshalJSON() ([]byte, error) { - type NoMethod HttpFilterConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// HttpHeaderAction: The request and response header transformations -// that take effect before the request is passed along to the selected -// backendService. -type HttpHeaderAction struct { - // RequestHeadersToAdd: Headers to add to a matching request before - // forwarding the request to the backendService. - RequestHeadersToAdd []*HttpHeaderOption `json:"requestHeadersToAdd,omitempty"` - - // RequestHeadersToRemove: A list of header names for headers that need - // to be removed from the request before forwarding the request to the - // backendService. - RequestHeadersToRemove []string `json:"requestHeadersToRemove,omitempty"` - - // ResponseHeadersToAdd: Headers to add the response before sending the - // response back to the client. - ResponseHeadersToAdd []*HttpHeaderOption `json:"responseHeadersToAdd,omitempty"` - - // ResponseHeadersToRemove: A list of header names for headers that need - // to be removed from the response before sending the response back to - // the client. - ResponseHeadersToRemove []string `json:"responseHeadersToRemove,omitempty"` - - // ForceSendFields is a list of field names (e.g. "RequestHeadersToAdd") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "RequestHeadersToAdd") 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 *HttpHeaderAction) MarshalJSON() ([]byte, error) { - type NoMethod HttpHeaderAction +func (s *HealthChecksAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod HealthChecksAggregatedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// HttpHeaderMatch: matchRule criteria for request header matches. -type HttpHeaderMatch struct { - // ExactMatch: The value should exactly match contents of exactMatch. - // Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, - // presentMatch or rangeMatch must be set. - ExactMatch string `json:"exactMatch,omitempty"` - - // HeaderName: The name of the HTTP header to match. For matching - // against the HTTP request's authority, use a headerMatch with the - // header name ":authority". For matching a request's method, use the - // headerName ":method". When the URL map is bound to a target gRPC - // proxy that has the validateForProxyless field set to true, only - // non-binary user-specified custom metadata and the `content-type` - // header are supported. The following transport-level headers cannot be - // used in header matching rules: `:authority`, `:method`, `:path`, - // `:scheme`, `user-agent`, `accept-encoding`, `content-encoding`, - // `grpc-accept-encoding`, `grpc-encoding`, - // `grpc-previous-rpc-attempts`, `grpc-tags-bin`, `grpc-timeout` and - // `grpc-trace-bin`. - HeaderName string `json:"headerName,omitempty"` - - // InvertMatch: If set to false, the headerMatch is considered a match - // if the preceding match criteria are met. If set to true, the - // headerMatch is considered a match if the preceding match criteria are - // NOT met. The default setting is false. - InvertMatch bool `json:"invertMatch,omitempty"` - - // PrefixMatch: The value of the header must start with the contents of - // prefixMatch. Only one of exactMatch, prefixMatch, suffixMatch, - // regexMatch, presentMatch or rangeMatch must be set. - PrefixMatch string `json:"prefixMatch,omitempty"` - - // PresentMatch: A header with the contents of headerName must exist. - // The match takes place whether or not the request's header has a - // value. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, - // presentMatch or rangeMatch must be set. - PresentMatch bool `json:"presentMatch,omitempty"` - - // RangeMatch: The header value must be an integer and its value must be - // in the range specified in rangeMatch. If the header does not contain - // an integer, number or is empty, the match fails. For example for a - // range [-5, 0] - -3 will match. - 0 will not match. - 0.25 will not - // match. - -3someString will not match. Only one of exactMatch, - // prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must - // be set. rangeMatch is not supported for load balancers that have - // loadBalancingScheme set to EXTERNAL. - RangeMatch *Int64RangeMatch `json:"rangeMatch,omitempty"` +// HealthChecksAggregatedListWarning: [Output Only] Informational +// warning message. +type HealthChecksAggregatedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient + // changes made by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was + // created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk + // that is larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api + // call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an + // injected kernel, which is deprecated. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV + // backend service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to + // list overhead quota exceed which captures the amount of resources + // filtered out by user-defined list filter. + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is + // not assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot + // ip forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's + // nextHopInstance URL refers to an instance that does not have an ipv6 + // interface on the same network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL + // refers to an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance + // URL refers to an instance that is not on the same network as the + // route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not + // have a status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to + // continue the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list + // page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be + // missing due to errors + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource + // that requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a + // resource is in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to + // auto-delete could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in + // instance group manager is valid as such, but its application does not + // make a lot of sense, because it allows only single instance in + // instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema + // are present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` - // RegexMatch: The value of the header must match the regular expression - // specified in regexMatch. For more information about regular - // expression syntax, see Syntax. For matching against a port specified - // in the HTTP request, use a headerMatch with headerName set to PORT - // and a regular expression that satisfies the RFC2616 Host header's - // port specifier. Only one of exactMatch, prefixMatch, suffixMatch, - // regexMatch, presentMatch or rangeMatch must be set. Regular - // expressions can only be used when the loadBalancingScheme is set to - // INTERNAL_SELF_MANAGED. - RegexMatch string `json:"regexMatch,omitempty"` + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" + // } + Data []*HealthChecksAggregatedListWarningData `json:"data,omitempty"` - // SuffixMatch: The value of the header must end with the contents of - // suffixMatch. Only one of exactMatch, prefixMatch, suffixMatch, - // regexMatch, presentMatch or rangeMatch must be set. - SuffixMatch string `json:"suffixMatch,omitempty"` + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExactMatch") to + // ForceSendFields is a list of field names (e.g. "Code") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -16872,8 +17108,8 @@ type HttpHeaderMatch struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExactMatch") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Code") 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. @@ -16881,28 +17117,27 @@ type HttpHeaderMatch struct { NullFields []string `json:"-"` } -func (s *HttpHeaderMatch) MarshalJSON() ([]byte, error) { - type NoMethod HttpHeaderMatch +func (s *HealthChecksAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod HealthChecksAggregatedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// HttpHeaderOption: Specification determining how headers are added to -// requests or responses. -type HttpHeaderOption struct { - // HeaderName: The name of the header. - HeaderName string `json:"headerName,omitempty"` - - // HeaderValue: The value of the header to add. - HeaderValue string `json:"headerValue,omitempty"` +type HealthChecksAggregatedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` - // Replace: If false, headerValue is appended to any values that already - // exist for the header. If true, headerValue is set for the header, - // discarding any values that were set for that header. The default - // value is false. - Replace bool `json:"replace,omitempty"` + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "HeaderName") to + // ForceSendFields is a list of field names (e.g. "Key") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -16910,8 +17145,8 @@ type HttpHeaderOption struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HeaderName") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Key") 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. @@ -16919,138 +17154,21 @@ type HttpHeaderOption struct { NullFields []string `json:"-"` } -func (s *HttpHeaderOption) MarshalJSON() ([]byte, error) { - type NoMethod HttpHeaderOption - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// HttpHealthCheck: Represents a legacy HTTP Health Check resource. -// Legacy HTTP health checks are now only required by target pool-based -// network load balancers. For all other load balancers, including -// backend service-based network load balancers, and for managed -// instance group auto-healing, you must use modern (non-legacy) health -// checks. For more information, see Health checks overview . -type HttpHealthCheck struct { - // CheckIntervalSec: How often (in seconds) to send a health check. The - // default value is 5 seconds. - CheckIntervalSec int64 `json:"checkIntervalSec,omitempty"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` - - // HealthyThreshold: A so-far unhealthy instance will be marked healthy - // after this many consecutive successes. The default value is 2. - HealthyThreshold int64 `json:"healthyThreshold,omitempty"` - - // Host: The value of the host header in the HTTP health check request. - // If left empty (default value), the public IP on behalf of which this - // health check is performed will be used. - Host string `json:"host,omitempty"` - - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` - - // Kind: [Output Only] Type of the resource. Always - // compute#httpHealthCheck for HTTP health checks. - Kind string `json:"kind,omitempty"` - - // Name: Name of the resource. Provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // Port: The TCP port number for the HTTP health check request. The - // default value is 80. - Port int64 `json:"port,omitempty"` - - // RequestPath: The request path of the HTTP health check request. The - // default value is /. This field does not support query parameters. - // Must comply with RFC3986. - RequestPath string `json:"requestPath,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // TimeoutSec: How long (in seconds) to wait before claiming failure. - // The default value is 5 seconds. It is invalid for timeoutSec to have - // greater value than checkIntervalSec. - TimeoutSec int64 `json:"timeoutSec,omitempty"` - - // UnhealthyThreshold: A so-far healthy instance will be marked - // unhealthy after this many consecutive failures. The default value is - // 2. - UnhealthyThreshold int64 `json:"unhealthyThreshold,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "CheckIntervalSec") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CheckIntervalSec") 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 *HttpHealthCheck) MarshalJSON() ([]byte, error) { - type NoMethod HttpHealthCheck +func (s *HealthChecksAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod HealthChecksAggregatedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// HttpHealthCheckList: Contains a list of HttpHealthCheck resources. -type HttpHealthCheckList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` - - // Items: A list of HttpHealthCheck resources. - Items []*HttpHealthCheck `json:"items,omitempty"` - - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` - - // Warning: [Output Only] Informational warning message. - Warning *HttpHealthCheckListWarning `json:"warning,omitempty"` +type HealthChecksScopedList struct { + // HealthChecks: A list of HealthChecks contained in this scope. + HealthChecks []*HealthCheck `json:"healthChecks,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // Warning: Informational warning which replaces the list of backend + // services when the list is empty. + Warning *HealthChecksScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to + // ForceSendFields is a list of field names (e.g. "HealthChecks") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -17058,24 +17176,24 @@ type HttpHealthCheckList struct { // 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 + // NullFields is a list of field names (e.g. "HealthChecks") 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 *HttpHealthCheckList) MarshalJSON() ([]byte, error) { - type NoMethod HttpHealthCheckList +func (s *HealthChecksScopedList) MarshalJSON() ([]byte, error) { + type NoMethod HealthChecksScopedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// HttpHealthCheckListWarning: [Output Only] Informational warning -// message. -type HttpHealthCheckListWarning struct { +// HealthChecksScopedListWarning: Informational warning which replaces +// the list of backend services when the list is empty. +type HealthChecksScopedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -17146,7 +17264,7 @@ type HttpHealthCheckListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*HttpHealthCheckListWarningData `json:"data,omitempty"` + Data []*HealthChecksScopedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -17169,13 +17287,13 @@ type HttpHealthCheckListWarning struct { NullFields []string `json:"-"` } -func (s *HttpHealthCheckListWarning) MarshalJSON() ([]byte, error) { - type NoMethod HttpHealthCheckListWarning +func (s *HealthChecksScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod HealthChecksScopedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type HttpHealthCheckListWarningData struct { +type HealthChecksScopedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -17206,40 +17324,66 @@ type HttpHealthCheckListWarningData struct { NullFields []string `json:"-"` } -func (s *HttpHealthCheckListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod HttpHealthCheckListWarningData +func (s *HealthChecksScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod HealthChecksScopedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// HttpQueryParameterMatch: HttpRouteRuleMatch criteria for a request's -// query parameter. -type HttpQueryParameterMatch struct { - // ExactMatch: The queryParameterMatch matches if the value of the - // parameter exactly matches the contents of exactMatch. Only one of - // presentMatch, exactMatch, or regexMatch must be set. - ExactMatch string `json:"exactMatch,omitempty"` +type HealthStatus struct { + // Annotations: Metadata defined as annotations for network endpoint. + Annotations map[string]string `json:"annotations,omitempty"` - // Name: The name of the query parameter to match. The query parameter - // must exist in the request, in the absence of which the request match - // fails. - Name string `json:"name,omitempty"` + // ForwardingRule: URL of the forwarding rule associated with the health + // status of the instance. + ForwardingRule string `json:"forwardingRule,omitempty"` - // PresentMatch: Specifies that the queryParameterMatch matches if the - // request contains the query parameter, irrespective of whether the - // parameter has a value or not. Only one of presentMatch, exactMatch, - // or regexMatch must be set. - PresentMatch bool `json:"presentMatch,omitempty"` + // ForwardingRuleIp: A forwarding rule IP address assigned to this + // instance. + ForwardingRuleIp string `json:"forwardingRuleIp,omitempty"` - // RegexMatch: The queryParameterMatch matches if the value of the - // parameter matches the regular expression specified by regexMatch. For - // more information about regular expression syntax, see Syntax. Only - // one of presentMatch, exactMatch, or regexMatch must be set. Regular - // expressions can only be used when the loadBalancingScheme is set to - // INTERNAL_SELF_MANAGED. - RegexMatch string `json:"regexMatch,omitempty"` + // HealthState: Health state of the IPv4 address of the instance. + // + // Possible values: + // "HEALTHY" + // "UNHEALTHY" + HealthState string `json:"healthState,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExactMatch") to + // Instance: URL of the instance resource. + Instance string `json:"instance,omitempty"` + + // IpAddress: For target pool based Network Load Balancing, it indicates + // the forwarding rule's IP address assigned to this instance. For other + // types of load balancing, the field indicates VM internal ip. + IpAddress string `json:"ipAddress,omitempty"` + + // Port: The named port of the instance group, not necessarily the port + // that is health-checked. + Port int64 `json:"port,omitempty"` + + Weight string `json:"weight,omitempty"` + + // Possible values: + // "INVALID_WEIGHT" - The response to a Health Check probe had the + // HTTP response header field X-Load-Balancing-Endpoint-Weight, but its + // content was invalid (i.e., not a non-negative single-precision + // floating-point number in decimal string representation). + // "MISSING_WEIGHT" - The response to a Health Check probe did not + // have the HTTP response header field X-Load-Balancing-Endpoint-Weight. + // "UNAVAILABLE_WEIGHT" - This is the value when the accompanied + // health status is either TIMEOUT (i.e.,the Health Check probe was not + // able to get a response in time) or UNKNOWN. For the latter, it should + // be typically because there has not been sufficient time to parse and + // report the weight for a new backend (which is with 0.0.0.0 ip + // address). However, it can be also due to an outage case for which the + // health status is explicitly reset to UNKNOWN. + // "WEIGHT_NONE" - This is the default value when WeightReportMode is + // DISABLE, and is also the initial value when WeightReportMode has just + // updated to ENABLE or DRY_RUN and there has not been sufficient time + // to parse and report the backend weight. + WeightError string `json:"weightError,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Annotations") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -17247,76 +17391,59 @@ type HttpQueryParameterMatch struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExactMatch") 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. "Annotations") 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 *HttpQueryParameterMatch) MarshalJSON() ([]byte, error) { - type NoMethod HttpQueryParameterMatch +func (s *HealthStatus) MarshalJSON() ([]byte, error) { + type NoMethod HealthStatus raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// HttpRedirectAction: Specifies settings for an HTTP redirect. -type HttpRedirectAction struct { - // HostRedirect: The host that is used in the redirect response instead - // of the one that was supplied in the request. The value must be from 1 - // to 255 characters. - HostRedirect string `json:"hostRedirect,omitempty"` +type HealthStatusForNetworkEndpoint struct { + // BackendService: URL of the backend service associated with the health + // state of the network endpoint. + BackendService *BackendServiceReference `json:"backendService,omitempty"` - // HttpsRedirect: If set to true, the URL scheme in the redirected - // request is set to HTTPS. If set to false, the URL scheme of the - // redirected request remains the same as that of the request. This must - // only be set for URL maps used in TargetHttpProxys. Setting this true - // for TargetHttpsProxy is not permitted. The default is set to false. - HttpsRedirect bool `json:"httpsRedirect,omitempty"` + // ForwardingRule: URL of the forwarding rule associated with the health + // state of the network endpoint. + ForwardingRule *ForwardingRuleReference `json:"forwardingRule,omitempty"` - // PathRedirect: The path that is used in the redirect response instead - // of the one that was supplied in the request. pathRedirect cannot be - // supplied together with prefixRedirect. Supply one alone or neither. - // If neither is supplied, the path of the original request is used for - // the redirect. The value must be from 1 to 1024 characters. - PathRedirect string `json:"pathRedirect,omitempty"` + // HealthCheck: URL of the health check associated with the health state + // of the network endpoint. + HealthCheck *HealthCheckReference `json:"healthCheck,omitempty"` - // PrefixRedirect: The prefix that replaces the prefixMatch specified in - // the HttpRouteRuleMatch, retaining the remaining portion of the URL - // before redirecting the request. prefixRedirect cannot be supplied - // together with pathRedirect. Supply one alone or neither. If neither - // is supplied, the path of the original request is used for the - // redirect. The value must be from 1 to 1024 characters. - PrefixRedirect string `json:"prefixRedirect,omitempty"` + // HealthCheckService: URL of the health check service associated with + // the health state of the network endpoint. + HealthCheckService *HealthCheckServiceReference `json:"healthCheckService,omitempty"` - // RedirectResponseCode: The HTTP Status code to use for this - // RedirectAction. Supported values are: - MOVED_PERMANENTLY_DEFAULT, - // which is the default value and corresponds to 301. - FOUND, which - // corresponds to 302. - SEE_OTHER which corresponds to 303. - - // TEMPORARY_REDIRECT, which corresponds to 307. In this case, the - // request method is retained. - PERMANENT_REDIRECT, which corresponds - // to 308. In this case, the request method is retained. + // HealthState: Health state of the network endpoint determined based on + // the health checks configured. // // Possible values: - // "FOUND" - Http Status Code 302 - Found. - // "MOVED_PERMANENTLY_DEFAULT" - Http Status Code 301 - Moved - // Permanently. - // "PERMANENT_REDIRECT" - Http Status Code 308 - Permanent Redirect - // maintaining HTTP method. - // "SEE_OTHER" - Http Status Code 303 - See Other. - // "TEMPORARY_REDIRECT" - Http Status Code 307 - Temporary Redirect - // maintaining HTTP method. - RedirectResponseCode string `json:"redirectResponseCode,omitempty"` + // "DRAINING" - Endpoint is being drained. + // "HEALTHY" - Endpoint is healthy. + // "UNHEALTHY" - Endpoint is unhealthy. + // "UNKNOWN" - Health status of the endpoint is unknown. + HealthState string `json:"healthState,omitempty"` - // StripQuery: If set to true, any accompanying query portion of the - // original URL is removed before redirecting the request. If set to - // false, the query portion of the original URL is retained. The default - // is set to false. - StripQuery bool `json:"stripQuery,omitempty"` + // Ipv6HealthState: Health state of the ipv6 network endpoint determined + // based on the health checks configured. + // + // Possible values: + // "DRAINING" - Endpoint is being drained. + // "HEALTHY" - Endpoint is healthy. + // "UNHEALTHY" - Endpoint is unhealthy. + // "UNKNOWN" - Health status of the endpoint is unknown. + Ipv6HealthState string `json:"ipv6HealthState,omitempty"` - // ForceSendFields is a list of field names (e.g. "HostRedirect") to + // ForceSendFields is a list of field names (e.g. "BackendService") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -17324,7 +17451,72 @@ type HttpRedirectAction struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HostRedirect") to include + // NullFields is a list of field names (e.g. "BackendService") 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 *HealthStatusForNetworkEndpoint) MarshalJSON() ([]byte, error) { + type NoMethod HealthStatusForNetworkEndpoint + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Help: Provides links to documentation or for performing an out of +// band action. For example, if a quota check failed with an error +// indicating the calling project hasn't enabled the accessed service, +// this can contain a URL pointing directly to the right place in the +// developer console to flip the bit. +type Help struct { + // Links: URL(s) pointing to additional information on handling the + // current error. + Links []*HelpLink `json:"links,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Links") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Links") 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 *Help) MarshalJSON() ([]byte, error) { + type NoMethod Help + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HelpLink: Describes a URL link. +type HelpLink struct { + // Description: Describes what the link offers. + Description string `json:"description,omitempty"` + + // Url: The URL of the link. + Url string `json:"url,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Description") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -17333,54 +17525,33 @@ type HttpRedirectAction struct { NullFields []string `json:"-"` } -func (s *HttpRedirectAction) MarshalJSON() ([]byte, error) { - type NoMethod HttpRedirectAction +func (s *HelpLink) MarshalJSON() ([]byte, error) { + type NoMethod HelpLink raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// HttpRetryPolicy: The retry policy associates with HttpRouteRule -type HttpRetryPolicy struct { - // NumRetries: Specifies the allowed number retries. This number must be - // > 0. If not specified, defaults to 1. - NumRetries int64 `json:"numRetries,omitempty"` +// HostRule: UrlMaps A host-matching rule for a URL. If matched, will +// use the named PathMatcher to select the BackendService. +type HostRule struct { + // Description: An optional description of this resource. Provide this + // property when you create the resource. + Description string `json:"description,omitempty"` - // PerTryTimeout: Specifies a non-zero timeout per retry attempt. If not - // specified, will use the timeout set in the HttpRouteAction field. If - // timeout in the HttpRouteAction field is not set, this field uses the - // largest timeout among all backend services associated with the route. - // Not supported when the URL map is bound to a target gRPC proxy that - // has the validateForProxyless field set to true. - PerTryTimeout *Duration `json:"perTryTimeout,omitempty"` + // Hosts: The list of host patterns to match. They must be valid + // hostnames with optional port numbers in the format host:port. * + // matches any string of ([a-z0-9-.]*). In that case, * must be the + // first character, and if followed by anything, the immediate following + // character must be either - or .. * based matching is not supported + // when the URL map is bound to a target gRPC proxy that has the + // validateForProxyless field set to true. + Hosts []string `json:"hosts,omitempty"` - // RetryConditions: Specifies one or more conditions when this retry - // policy applies. Valid values are: - 5xx: retry is attempted if the - // instance or endpoint responds with any 5xx response code, or if the - // instance or endpoint does not respond at all. For example, - // disconnects, reset, read timeout, connection failure, and refused - // streams. - gateway-error: Similar to 5xx, but only applies to - // response codes 502, 503 or 504. - connect-failure: a retry is - // attempted on failures connecting to the instance or endpoint. For - // example, connection timeouts. - retriable-4xx: a retry is attempted - // if the instance or endpoint responds with a 4xx response code. The - // only error that you can retry is error code 409. - refused-stream: a - // retry is attempted if the instance or endpoint resets the stream with - // a REFUSED_STREAM error code. This reset type indicates that it is - // safe to retry. - cancelled: a retry is attempted if the gRPC status - // code in the response header is set to cancelled. - deadline-exceeded: - // a retry is attempted if the gRPC status code in the response header - // is set to deadline-exceeded. - internal: a retry is attempted if the - // gRPC status code in the response header is set to internal. - - // resource-exhausted: a retry is attempted if the gRPC status code in - // the response header is set to resource-exhausted. - unavailable: a - // retry is attempted if the gRPC status code in the response header is - // set to unavailable. Only the following codes are supported when the - // URL map is bound to target gRPC proxy that has validateForProxyless - // field set to true. - cancelled - deadline-exceeded - internal - - // resource-exhausted - unavailable - RetryConditions []string `json:"retryConditions,omitempty"` + // PathMatcher: The name of the PathMatcher to use to match the path + // portion of the URL if the hostRule matches the URL's host portion. + PathMatcher string `json:"pathMatcher,omitempty"` - // ForceSendFields is a list of field names (e.g. "NumRetries") to + // ForceSendFields is a list of field names (e.g. "Description") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -17388,97 +17559,86 @@ type HttpRetryPolicy struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NumRetries") 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. "Description") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *HttpRetryPolicy) MarshalJSON() ([]byte, error) { - type NoMethod HttpRetryPolicy +func (s *HostRule) MarshalJSON() ([]byte, error) { + type NoMethod HostRule raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type HttpRouteAction struct { - // CorsPolicy: The specification for allowing client-side cross-origin - // requests. For more information about the W3C recommendation for - // cross-origin resource sharing (CORS), see Fetch API Living Standard. - // Not supported when the URL map is bound to a target gRPC proxy. - CorsPolicy *CorsPolicy `json:"corsPolicy,omitempty"` +// HttpFaultAbort: Specification for how requests are aborted as part of +// fault injection. +type HttpFaultAbort struct { + // HttpStatus: The HTTP status code used to abort the request. The value + // must be from 200 to 599 inclusive. For gRPC protocol, the gRPC status + // code is mapped to HTTP status code according to this mapping table. + // HTTP status 200 is mapped to gRPC status UNKNOWN. Injecting an OK + // status is currently not supported by Traffic Director. + HttpStatus int64 `json:"httpStatus,omitempty"` - // FaultInjectionPolicy: The specification for fault injection - // introduced into traffic to test the resiliency of clients to backend - // service failure. As part of fault injection, when clients send - // requests to a backend service, delays can be introduced by a load - // balancer on a percentage of requests before sending those requests to - // the backend service. Similarly requests from clients can be aborted - // by the load balancer for a percentage of requests. timeout and - // retry_policy is ignored by clients that are configured with a - // fault_injection_policy if: 1. The traffic is generated by fault - // injection AND 2. The fault injection is not a delay fault injection. - // Fault injection is not supported with the global external HTTP(S) - // load balancer (classic). To see which load balancers support fault - // injection, see Load balancing: Routing and traffic management - // features. - FaultInjectionPolicy *HttpFaultInjection `json:"faultInjectionPolicy,omitempty"` + // Percentage: The percentage of traffic for connections, operations, or + // requests that is aborted as part of fault injection. The value must + // be from 0.0 to 100.0 inclusive. + Percentage float64 `json:"percentage,omitempty"` - // MaxStreamDuration: Specifies the maximum duration (timeout) for - // streams on the selected route. Unlike the timeout field where the - // timeout duration starts from the time the request has been fully - // processed (known as *end-of-stream*), the duration in this field is - // computed from the beginning of the stream until the response has been - // processed, including all retries. A stream that does not complete in - // this duration is closed. If not specified, this field uses the - // maximum maxStreamDuration value among all backend services associated - // with the route. This field is only allowed if the Url map is used - // with backend services with loadBalancingScheme set to - // INTERNAL_SELF_MANAGED. - MaxStreamDuration *Duration `json:"maxStreamDuration,omitempty"` + // ForceSendFields is a list of field names (e.g. "HttpStatus") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` - // RequestMirrorPolicy: Specifies the policy on how requests intended - // for the route's backends are shadowed to a separate mirrored backend - // service. The load balancer does not wait for responses from the - // shadow service. Before sending traffic to the shadow service, the - // host / authority header is suffixed with -shadow. Not supported when - // the URL map is bound to a target gRPC proxy that has the - // validateForProxyless field set to true. - RequestMirrorPolicy *RequestMirrorPolicy `json:"requestMirrorPolicy,omitempty"` + // NullFields is a list of field names (e.g. "HttpStatus") 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:"-"` +} - // RetryPolicy: Specifies the retry policy associated with this route. - RetryPolicy *HttpRetryPolicy `json:"retryPolicy,omitempty"` +func (s *HttpFaultAbort) MarshalJSON() ([]byte, error) { + type NoMethod HttpFaultAbort + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // Timeout: Specifies the timeout for the selected route. Timeout is - // computed from the time the request has been fully processed (known as - // *end-of-stream*) up until the response has been processed. Timeout - // includes all retries. If not specified, this field uses the largest - // timeout among all backend services associated with the route. Not - // supported when the URL map is bound to a target gRPC proxy that has - // validateForProxyless field set to true. - Timeout *Duration `json:"timeout,omitempty"` +func (s *HttpFaultAbort) UnmarshalJSON(data []byte) error { + type NoMethod HttpFaultAbort + var s1 struct { + Percentage gensupport.JSONFloat64 `json:"percentage"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Percentage = float64(s1.Percentage) + return nil +} - // UrlRewrite: The spec to modify the URL of the request, before - // forwarding the request to the matched service. urlRewrite is the only - // action supported in UrlMaps for external HTTP(S) load balancers. Not - // supported when the URL map is bound to a target gRPC proxy that has - // the validateForProxyless field set to true. - UrlRewrite *UrlRewrite `json:"urlRewrite,omitempty"` +// HttpFaultDelay: Specifies the delay introduced by the load balancer +// before forwarding the request to the backend service as part of fault +// injection. +type HttpFaultDelay struct { + // FixedDelay: Specifies the value of the fixed delay interval. + FixedDelay *Duration `json:"fixedDelay,omitempty"` - // WeightedBackendServices: A list of weighted backend services to send - // traffic to when a route match occurs. The weights determine the - // fraction of traffic that flows to their corresponding backend - // service. If all traffic needs to go to a single backend service, - // there must be one weightedBackendService with weight set to a - // non-zero number. After a backend service is identified and before - // forwarding the request to the backend service, advanced routing - // actions such as URL rewrites and header transformations are applied - // depending on additional settings specified in this HttpRouteAction. - WeightedBackendServices []*WeightedBackendService `json:"weightedBackendServices,omitempty"` + // Percentage: The percentage of traffic for connections, operations, or + // requests for which a delay is introduced as part of fault injection. + // The value must be from 0.0 to 100.0 inclusive. + Percentage float64 `json:"percentage,omitempty"` - // ForceSendFields is a list of field names (e.g. "CorsPolicy") to + // ForceSendFields is a list of field names (e.g. "FixedDelay") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -17486,7 +17646,7 @@ type HttpRouteAction struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CorsPolicy") to include in + // NullFields is a list of field names (e.g. "FixedDelay") 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 @@ -17495,228 +17655,219 @@ type HttpRouteAction struct { NullFields []string `json:"-"` } -func (s *HttpRouteAction) MarshalJSON() ([]byte, error) { - type NoMethod HttpRouteAction +func (s *HttpFaultDelay) MarshalJSON() ([]byte, error) { + type NoMethod HttpFaultDelay raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// HttpRouteRule: The HttpRouteRule setting specifies how to match an -// HTTP request and the corresponding routing action that load balancing -// proxies perform. -type HttpRouteRule struct { - // CustomErrorResponsePolicy: customErrorResponsePolicy specifies how - // the Load Balancer returns error responses when BackendServiceor - // BackendBucket responds with an error. If a policy for an error code - // is not configured for the RouteRule, a policy for the error code - // configured in pathMatcher.defaultCustomErrorResponsePolicy is - // applied. If one is not specified in - // pathMatcher.defaultCustomErrorResponsePolicy, the policy configured - // in UrlMap.defaultCustomErrorResponsePolicy takes effect. For example, - // consider a UrlMap with the following configuration: - - // UrlMap.defaultCustomErrorResponsePolicy are configured with policies - // for 5xx and 4xx errors - A RouteRule for /coming_soon/ is configured - // for the error code 404. If the request is for www.myotherdomain.com - // and a 404 is encountered, the policy under - // UrlMap.defaultCustomErrorResponsePolicy takes effect. If a 404 - // response is encountered for the request - // www.example.com/current_events/, the pathMatcher's policy takes - // effect. If however, the request for www.example.com/coming_soon/ - // encounters a 404, the policy in RouteRule.customErrorResponsePolicy - // takes effect. If any of the requests in this example encounter a 500 - // error code, the policy at UrlMap.defaultCustomErrorResponsePolicy - // takes effect. When used in conjunction with - // routeRules.routeAction.retryPolicy, retries take precedence. Only - // once all retries are exhausted, the customErrorResponsePolicy is - // applied. While attempting a retry, if load balancer is successful in - // reaching the service, the customErrorResponsePolicy is ignored and - // the response from the service is returned to the client. - // customErrorResponsePolicy is supported only for Global External - // HTTP(S) load balancing. - CustomErrorResponsePolicy *CustomErrorResponsePolicy `json:"customErrorResponsePolicy,omitempty"` +func (s *HttpFaultDelay) UnmarshalJSON(data []byte) error { + type NoMethod HttpFaultDelay + var s1 struct { + Percentage gensupport.JSONFloat64 `json:"percentage"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Percentage = float64(s1.Percentage) + return nil +} - // Description: The short description conveying the intent of this - // routeRule. The description can have a maximum length of 1024 - // characters. - Description string `json:"description,omitempty"` +// HttpFaultInjection: The specification for fault injection introduced +// into traffic to test the resiliency of clients to backend service +// failure. As part of fault injection, when clients send requests to a +// backend service, delays can be introduced by the load balancer on a +// percentage of requests before sending those request to the backend +// service. Similarly requests from clients can be aborted by the load +// balancer for a percentage of requests. +type HttpFaultInjection struct { + // Abort: The specification for how client requests are aborted as part + // of fault injection. + Abort *HttpFaultAbort `json:"abort,omitempty"` - // HeaderAction: Specifies changes to request and response headers that - // need to take effect for the selected backendService. The headerAction - // value specified here is applied before the matching - // pathMatchers[].headerAction and after - // pathMatchers[].routeRules[].routeAction.weightedBackendService.backend - // ServiceWeightAction[].headerAction HeaderAction is not supported for - // load balancers that have their loadBalancingScheme set to EXTERNAL. - // Not supported when the URL map is bound to a target gRPC proxy that - // has validateForProxyless field set to true. - HeaderAction *HttpHeaderAction `json:"headerAction,omitempty"` + // Delay: The specification for how client requests are delayed as part + // of fault injection, before being sent to a backend service. + Delay *HttpFaultDelay `json:"delay,omitempty"` - // HttpFilterConfigs: Outbound route specific configuration for - // networkservices.HttpFilter resources enabled by Traffic Director. - // httpFilterConfigs only applies for load balancers with - // loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule - // for more details. Not supported when the URL map is bound to a target - // gRPC proxy that has validateForProxyless field set to true. - HttpFilterConfigs []*HttpFilterConfig `json:"httpFilterConfigs,omitempty"` + // ForceSendFields is a list of field names (e.g. "Abort") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` - // HttpFilterMetadata: Outbound route specific metadata supplied to - // networkservices.HttpFilter resources enabled by Traffic Director. - // httpFilterMetadata only applies for load balancers with - // loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule - // for more details. The only configTypeUrl supported is - // type.googleapis.com/google.protobuf.Struct Not supported when the URL - // map is bound to a target gRPC proxy that has validateForProxyless - // field set to true. - HttpFilterMetadata []*HttpFilterConfig `json:"httpFilterMetadata,omitempty"` + // NullFields is a list of field names (e.g. "Abort") 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:"-"` +} - // MatchRules: The list of criteria for matching attributes of a request - // to this routeRule. This list has OR semantics: the request matches - // this routeRule when any of the matchRules are satisfied. However - // predicates within a given matchRule have AND semantics. All - // predicates within a matchRule must match for the request to match the - // rule. - MatchRules []*HttpRouteRuleMatch `json:"matchRules,omitempty"` - - // Priority: For routeRules within a given pathMatcher, priority - // determines the order in which a load balancer interprets routeRules. - // RouteRules are evaluated in order of priority, from the lowest to - // highest number. The priority of a rule decreases as its number - // increases (1, 2, 3, N+1). The first rule that matches the request is - // applied. You cannot configure two or more routeRules with the same - // priority. Priority for each rule must be set to a number from 0 to - // 2147483647 inclusive. Priority numbers can have gaps, which enable - // you to add or remove rules in the future without affecting the rest - // of the rules. For example, 1, 2, 3, 4, 5, 9, 12, 16 is a valid series - // of priority numbers to which you could add rules numbered from 6 to - // 8, 10 to 11, and 13 to 15 in the future without any impact on - // existing rules. - Priority int64 `json:"priority,omitempty"` +func (s *HttpFaultInjection) MarshalJSON() ([]byte, error) { + type NoMethod HttpFaultInjection + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // RouteAction: In response to a matching matchRule, the load balancer - // performs advanced routing actions, such as URL rewrites and header - // transformations, before forwarding the request to the selected - // backend. If routeAction specifies any weightedBackendServices, - // service must not be set. Conversely if service is set, routeAction - // cannot contain any weightedBackendServices. Only one of urlRedirect, - // service or routeAction.weightedBackendService must be set. URL maps - // for Classic external HTTP(S) load balancers only support the - // urlRewrite action within a route rule's routeAction. - RouteAction *HttpRouteAction `json:"routeAction,omitempty"` +// HttpFilterConfig: HttpFilterConfiguration supplies additional +// contextual settings for networkservices.HttpFilter resources enabled +// by Traffic Director. +type HttpFilterConfig struct { + // Config: The configuration needed to enable the + // networkservices.HttpFilter resource. The configuration must be YAML + // formatted and only contain fields defined in the protobuf identified + // in configTypeUrl + Config string `json:"config,omitempty"` - // Service: The full or partial URL of the backend service resource to - // which traffic is directed if this rule is matched. If routeAction is - // also specified, advanced routing actions, such as URL rewrites, take - // effect before sending the request to the backend. However, if service - // is specified, routeAction cannot contain any weightedBackendServices. - // Conversely, if routeAction specifies any weightedBackendServices, - // service must not be specified. Only one of urlRedirect, service or - // routeAction.weightedBackendService must be set. - Service string `json:"service,omitempty"` + // ConfigTypeUrl: The fully qualified versioned proto3 type url of the + // protobuf that the filter expects for its contextual settings, for + // example: type.googleapis.com/google.protobuf.Struct + ConfigTypeUrl string `json:"configTypeUrl,omitempty"` - // UrlRedirect: When this rule is matched, the request is redirected to - // a URL specified by urlRedirect. If urlRedirect is specified, service - // or routeAction must not be set. Not supported when the URL map is - // bound to a target gRPC proxy. - UrlRedirect *HttpRedirectAction `json:"urlRedirect,omitempty"` + // FilterName: Name of the networkservices.HttpFilter resource this + // configuration belongs to. This name must be known to the xDS client. + // Example: envoy.wasm + FilterName string `json:"filterName,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "CustomErrorResponsePolicy") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "Config") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. - // "CustomErrorResponsePolicy") 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. "Config") 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 *HttpRouteRule) MarshalJSON() ([]byte, error) { - type NoMethod HttpRouteRule +func (s *HttpFilterConfig) MarshalJSON() ([]byte, error) { + type NoMethod HttpFilterConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// HttpRouteRuleMatch: HttpRouteRuleMatch specifies a set of criteria -// for matching requests to an HttpRouteRule. All specified criteria -// must be satisfied for a match to occur. -type HttpRouteRuleMatch struct { - // FullPathMatch: For satisfying the matchRule condition, the path of - // the request must exactly match the value specified in fullPathMatch - // after removing any query parameters and anchor that may be part of - // the original URL. fullPathMatch must be from 1 to 1024 characters. - // Only one of prefixMatch, fullPathMatch or regexMatch must be - // specified. - FullPathMatch string `json:"fullPathMatch,omitempty"` +// HttpHeaderAction: The request and response header transformations +// that take effect before the request is passed along to the selected +// backendService. +type HttpHeaderAction struct { + // RequestHeadersToAdd: Headers to add to a matching request before + // forwarding the request to the backendService. + RequestHeadersToAdd []*HttpHeaderOption `json:"requestHeadersToAdd,omitempty"` - // HeaderMatches: Specifies a list of header match criteria, all of - // which must match corresponding headers in the request. - HeaderMatches []*HttpHeaderMatch `json:"headerMatches,omitempty"` + // RequestHeadersToRemove: A list of header names for headers that need + // to be removed from the request before forwarding the request to the + // backendService. + RequestHeadersToRemove []string `json:"requestHeadersToRemove,omitempty"` - // IgnoreCase: Specifies that prefixMatch and fullPathMatch matches are - // case sensitive. The default value is false. ignoreCase must not be - // used with regexMatch. Not supported when the URL map is bound to a - // target gRPC proxy. - IgnoreCase bool `json:"ignoreCase,omitempty"` + // ResponseHeadersToAdd: Headers to add the response before sending the + // response back to the client. + ResponseHeadersToAdd []*HttpHeaderOption `json:"responseHeadersToAdd,omitempty"` - // MetadataFilters: Opaque filter criteria used by the load balancer to - // restrict routing configuration to a limited set of xDS compliant - // clients. In their xDS requests to the load balancer, xDS clients - // present node metadata. When there is a match, the relevant routing - // configuration is made available to those proxies. For each - // metadataFilter in this list, if its filterMatchCriteria is set to - // MATCH_ANY, at least one of the filterLabels must match the - // corresponding label provided in the metadata. If its - // filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels - // must match with corresponding labels provided in the metadata. If - // multiple metadata filters are specified, all of them need to be - // satisfied in order to be considered a match. metadataFilters - // specified here is applied after those specified in ForwardingRule - // that refers to the UrlMap this HttpRouteRuleMatch belongs to. - // metadataFilters only applies to load balancers that have - // loadBalancingScheme set to INTERNAL_SELF_MANAGED. Not supported when - // the URL map is bound to a target gRPC proxy that has - // validateForProxyless field set to true. - MetadataFilters []*MetadataFilter `json:"metadataFilters,omitempty"` + // ResponseHeadersToRemove: A list of header names for headers that need + // to be removed from the response before sending the response back to + // the client. + ResponseHeadersToRemove []string `json:"responseHeadersToRemove,omitempty"` - // PathTemplateMatch: If specified, the route is a pattern match - // expression that must match the :path header once the query string is - // removed. A pattern match allows you to match - The value must be - // between 1 and 1024 characters - The pattern must start with a leading - // slash ("/") - There may be no more than 5 operators in pattern - // Precisely one of prefix_match, full_path_match, regex_match or - // path_template_match must be set. - PathTemplateMatch string `json:"pathTemplateMatch,omitempty"` + // ForceSendFields is a list of field names (e.g. "RequestHeadersToAdd") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` - // PrefixMatch: For satisfying the matchRule condition, the request's - // path must begin with the specified prefixMatch. prefixMatch must - // begin with a /. The value must be from 1 to 1024 characters. Only one - // of prefixMatch, fullPathMatch or regexMatch must be specified. + // NullFields is a list of field names (e.g. "RequestHeadersToAdd") 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 *HttpHeaderAction) MarshalJSON() ([]byte, error) { + type NoMethod HttpHeaderAction + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HttpHeaderMatch: matchRule criteria for request header matches. +type HttpHeaderMatch struct { + // ExactMatch: The value should exactly match contents of exactMatch. + // Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, + // presentMatch or rangeMatch must be set. + ExactMatch string `json:"exactMatch,omitempty"` + + // HeaderName: The name of the HTTP header to match. For matching + // against the HTTP request's authority, use a headerMatch with the + // header name ":authority". For matching a request's method, use the + // headerName ":method". When the URL map is bound to a target gRPC + // proxy that has the validateForProxyless field set to true, only + // non-binary user-specified custom metadata and the `content-type` + // header are supported. The following transport-level headers cannot be + // used in header matching rules: `:authority`, `:method`, `:path`, + // `:scheme`, `user-agent`, `accept-encoding`, `content-encoding`, + // `grpc-accept-encoding`, `grpc-encoding`, + // `grpc-previous-rpc-attempts`, `grpc-tags-bin`, `grpc-timeout` and + // `grpc-trace-bin`. + HeaderName string `json:"headerName,omitempty"` + + // InvertMatch: If set to false, the headerMatch is considered a match + // if the preceding match criteria are met. If set to true, the + // headerMatch is considered a match if the preceding match criteria are + // NOT met. The default setting is false. + InvertMatch bool `json:"invertMatch,omitempty"` + + // PrefixMatch: The value of the header must start with the contents of + // prefixMatch. Only one of exactMatch, prefixMatch, suffixMatch, + // regexMatch, presentMatch or rangeMatch must be set. PrefixMatch string `json:"prefixMatch,omitempty"` - // QueryParameterMatches: Specifies a list of query parameter match - // criteria, all of which must match corresponding query parameters in - // the request. Not supported when the URL map is bound to a target gRPC - // proxy. - QueryParameterMatches []*HttpQueryParameterMatch `json:"queryParameterMatches,omitempty"` + // PresentMatch: A header with the contents of headerName must exist. + // The match takes place whether or not the request's header has a + // value. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, + // presentMatch or rangeMatch must be set. + PresentMatch bool `json:"presentMatch,omitempty"` - // RegexMatch: For satisfying the matchRule condition, the path of the - // request must satisfy the regular expression specified in regexMatch - // after removing any query parameters and anchor supplied with the - // original URL. For more information about regular expression syntax, - // see Syntax. Only one of prefixMatch, fullPathMatch or regexMatch must - // be specified. Regular expressions can only be used when the - // loadBalancingScheme is set to INTERNAL_SELF_MANAGED. + // RangeMatch: The header value must be an integer and its value must be + // in the range specified in rangeMatch. If the header does not contain + // an integer, number or is empty, the match fails. For example for a + // range [-5, 0] - -3 will match. - 0 will not match. - 0.25 will not + // match. - -3someString will not match. Only one of exactMatch, + // prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must + // be set. rangeMatch is not supported for load balancers that have + // loadBalancingScheme set to EXTERNAL. + RangeMatch *Int64RangeMatch `json:"rangeMatch,omitempty"` + + // RegexMatch: The value of the header must match the regular expression + // specified in regexMatch. For more information about regular + // expression syntax, see Syntax. For matching against a port specified + // in the HTTP request, use a headerMatch with headerName set to PORT + // and a regular expression that satisfies the RFC2616 Host header's + // port specifier. Only one of exactMatch, prefixMatch, suffixMatch, + // regexMatch, presentMatch or rangeMatch must be set. Regular + // expressions can only be used when the loadBalancingScheme is set to + // INTERNAL_SELF_MANAGED. RegexMatch string `json:"regexMatch,omitempty"` - // ForceSendFields is a list of field names (e.g. "FullPathMatch") to + // SuffixMatch: The value of the header must end with the contents of + // suffixMatch. Only one of exactMatch, prefixMatch, suffixMatch, + // regexMatch, presentMatch or rangeMatch must be set. + SuffixMatch string `json:"suffixMatch,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExactMatch") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -17724,29 +17875,66 @@ type HttpRouteRuleMatch struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FullPathMatch") 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. "ExactMatch") 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 *HttpRouteRuleMatch) MarshalJSON() ([]byte, error) { - type NoMethod HttpRouteRuleMatch +func (s *HttpHeaderMatch) MarshalJSON() ([]byte, error) { + type NoMethod HttpHeaderMatch raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// HttpsHealthCheck: Represents a legacy HTTPS Health Check resource. -// Legacy HTTPS health checks have been deprecated. If you are using a -// target pool-based network load balancer, you must use a legacy HTTP -// (not HTTPS) health check. For all other load balancers, including +// HttpHeaderOption: Specification determining how headers are added to +// requests or responses. +type HttpHeaderOption struct { + // HeaderName: The name of the header. + HeaderName string `json:"headerName,omitempty"` + + // HeaderValue: The value of the header to add. + HeaderValue string `json:"headerValue,omitempty"` + + // Replace: If false, headerValue is appended to any values that already + // exist for the header. If true, headerValue is set for the header, + // discarding any values that were set for that header. The default + // value is false. + Replace bool `json:"replace,omitempty"` + + // ForceSendFields is a list of field names (e.g. "HeaderName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "HeaderName") 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 *HttpHeaderOption) MarshalJSON() ([]byte, error) { + type NoMethod HttpHeaderOption + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HttpHealthCheck: Represents a legacy HTTP Health Check resource. +// Legacy HTTP health checks are now only required by target pool-based +// network load balancers. For all other load balancers, including // backend service-based network load balancers, and for managed // instance group auto-healing, you must use modern (non-legacy) health // checks. For more information, see Health checks overview . -type HttpsHealthCheck struct { +type HttpHealthCheck struct { // CheckIntervalSec: How often (in seconds) to send a health check. The // default value is 5 seconds. CheckIntervalSec int64 `json:"checkIntervalSec,omitempty"` @@ -17763,7 +17951,7 @@ type HttpsHealthCheck struct { // after this many consecutive successes. The default value is 2. HealthyThreshold int64 `json:"healthyThreshold,omitempty"` - // Host: The value of the host header in the HTTPS health check request. + // Host: The value of the host header in the HTTP health check request. // If left empty (default value), the public IP on behalf of which this // health check is performed will be used. Host string `json:"host,omitempty"` @@ -17772,7 +17960,8 @@ type HttpsHealthCheck struct { // identifier is defined by the server. Id uint64 `json:"id,omitempty,string"` - // Kind: Type of the resource. + // Kind: [Output Only] Type of the resource. Always + // compute#httpHealthCheck for HTTP health checks. Kind string `json:"kind,omitempty"` // Name: Name of the resource. Provided by the client when the resource @@ -17784,12 +17973,13 @@ type HttpsHealthCheck struct { // last character, which cannot be a dash. Name string `json:"name,omitempty"` - // Port: The TCP port number for the HTTPS health check request. The - // default value is 443. + // Port: The TCP port number for the HTTP health check request. The + // default value is 80. Port int64 `json:"port,omitempty"` - // RequestPath: The request path of the HTTPS health check request. The - // default value is "/". Must comply with RFC3986. + // RequestPath: The request path of the HTTP health check request. The + // default value is /. This field does not support query parameters. + // Must comply with RFC3986. RequestPath string `json:"requestPath,omitempty"` // SelfLink: [Output Only] Server-defined URL for the resource. @@ -17797,7 +17987,7 @@ type HttpsHealthCheck struct { // TimeoutSec: How long (in seconds) to wait before claiming failure. // The default value is 5 seconds. It is invalid for timeoutSec to have - // a greater value than checkIntervalSec. + // greater value than checkIntervalSec. TimeoutSec int64 `json:"timeoutSec,omitempty"` // UnhealthyThreshold: A so-far healthy instance will be marked @@ -17827,20 +18017,20 @@ type HttpsHealthCheck struct { NullFields []string `json:"-"` } -func (s *HttpsHealthCheck) MarshalJSON() ([]byte, error) { - type NoMethod HttpsHealthCheck +func (s *HttpHealthCheck) MarshalJSON() ([]byte, error) { + type NoMethod HttpHealthCheck raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// HttpsHealthCheckList: Contains a list of HttpsHealthCheck resources. -type HttpsHealthCheckList struct { +// HttpHealthCheckList: Contains a list of HttpHealthCheck resources. +type HttpHealthCheckList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of HttpsHealthCheck resources. - Items []*HttpsHealthCheck `json:"items,omitempty"` + // Items: A list of HttpHealthCheck resources. + Items []*HttpHealthCheck `json:"items,omitempty"` // Kind: Type of resource. Kind string `json:"kind,omitempty"` @@ -17857,7 +18047,7 @@ type HttpsHealthCheckList struct { SelfLink string `json:"selfLink,omitempty"` // Warning: [Output Only] Informational warning message. - Warning *HttpsHealthCheckListWarning `json:"warning,omitempty"` + Warning *HttpHealthCheckListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -17880,15 +18070,15 @@ type HttpsHealthCheckList struct { NullFields []string `json:"-"` } -func (s *HttpsHealthCheckList) MarshalJSON() ([]byte, error) { - type NoMethod HttpsHealthCheckList +func (s *HttpHealthCheckList) MarshalJSON() ([]byte, error) { + type NoMethod HttpHealthCheckList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// HttpsHealthCheckListWarning: [Output Only] Informational warning +// HttpHealthCheckListWarning: [Output Only] Informational warning // message. -type HttpsHealthCheckListWarning struct { +type HttpHealthCheckListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -17959,7 +18149,7 @@ type HttpsHealthCheckListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*HttpsHealthCheckListWarningData `json:"data,omitempty"` + Data []*HttpHealthCheckListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -17982,13 +18172,13 @@ type HttpsHealthCheckListWarning struct { NullFields []string `json:"-"` } -func (s *HttpsHealthCheckListWarning) MarshalJSON() ([]byte, error) { - type NoMethod HttpsHealthCheckListWarning +func (s *HttpHealthCheckListWarning) MarshalJSON() ([]byte, error) { + type NoMethod HttpHealthCheckListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type HttpsHealthCheckListWarningData struct { +type HttpHealthCheckListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -18019,249 +18209,117 @@ type HttpsHealthCheckListWarningData struct { NullFields []string `json:"-"` } -func (s *HttpsHealthCheckListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod HttpsHealthCheckListWarningData +func (s *HttpHealthCheckListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod HttpHealthCheckListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Image: Represents an Image resource. You can use images to create -// boot disks for your VM instances. For more information, read Images. -type Image struct { - // Architecture: The architecture of the image. Valid values are ARM64 - // or X86_64. - // - // Possible values: - // "ARCHITECTURE_UNSPECIFIED" - Default value indicating Architecture - // is not set. - // "ARM64" - Machines with architecture ARM64 - // "X86_64" - Machines with architecture X86_64 - Architecture string `json:"architecture,omitempty"` - - // ArchiveSizeBytes: Size of the image tar.gz archive stored in Google - // Cloud Storage (in bytes). - ArchiveSizeBytes int64 `json:"archiveSizeBytes,omitempty,string"` - - // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text - // format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` - - // Deprecated -- The deprecation status associated with this image. - Deprecated *DeprecationStatus `json:"deprecated,omitempty"` +// HttpQueryParameterMatch: HttpRouteRuleMatch criteria for a request's +// query parameter. +type HttpQueryParameterMatch struct { + // ExactMatch: The queryParameterMatch matches if the value of the + // parameter exactly matches the contents of exactMatch. Only one of + // presentMatch, exactMatch, or regexMatch must be set. + ExactMatch string `json:"exactMatch,omitempty"` - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` + // Name: The name of the query parameter to match. The query parameter + // must exist in the request, in the absence of which the request match + // fails. + Name string `json:"name,omitempty"` - // DiskSizeGb: Size of the image when restored onto a persistent disk - // (in GB). - DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` + // PresentMatch: Specifies that the queryParameterMatch matches if the + // request contains the query parameter, irrespective of whether the + // parameter has a value or not. Only one of presentMatch, exactMatch, + // or regexMatch must be set. + PresentMatch bool `json:"presentMatch,omitempty"` - // EnableConfidentialCompute: Whether this image is created from a - // confidential compute mode disk. [Output Only]: This field is not set - // by user, but from source disk. - EnableConfidentialCompute bool `json:"enableConfidentialCompute,omitempty"` + // RegexMatch: The queryParameterMatch matches if the value of the + // parameter matches the regular expression specified by regexMatch. For + // more information about regular expression syntax, see Syntax. Only + // one of presentMatch, exactMatch, or regexMatch must be set. Regular + // expressions can only be used when the loadBalancingScheme is set to + // INTERNAL_SELF_MANAGED. + RegexMatch string `json:"regexMatch,omitempty"` - // Family: The name of the image family to which this image belongs. The - // image family name can be from a publicly managed image family - // provided by Compute Engine, or from a custom image family you create. - // For example, centos-stream-9 is a publicly available image family. - // For more information, see Image family best practices. When creating - // disks, you can specify an image family instead of a specific image - // name. The image family always returns its latest image that is not - // deprecated. The name of the image family must comply with RFC1035. - Family string `json:"family,omitempty"` + // ForceSendFields is a list of field names (e.g. "ExactMatch") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` - // GuestOsFeatures: A list of features to enable on the guest operating - // system. Applicable only for bootable images. To see a list of - // available options, see the guestOSfeatures[].type parameter. - GuestOsFeatures []*GuestOsFeature `json:"guestOsFeatures,omitempty"` + // NullFields is a list of field names (e.g. "ExactMatch") 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:"-"` +} - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. - Id uint64 `json:"id,omitempty,string"` +func (s *HttpQueryParameterMatch) MarshalJSON() ([]byte, error) { + type NoMethod HttpQueryParameterMatch + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // ImageEncryptionKey: Encrypts the image using a customer-supplied - // encryption key. After you encrypt an image with a customer-supplied - // key, you must provide the same key if you use the image later (e.g. - // to create a disk from the image). Customer-supplied encryption keys - // do not protect access to metadata of the disk. If you do not provide - // an encryption key when creating the image, then the disk will be - // encrypted using an automatically generated key and you do not need to - // provide a key to use the image later. - ImageEncryptionKey *CustomerEncryptionKey `json:"imageEncryptionKey,omitempty"` +// HttpRedirectAction: Specifies settings for an HTTP redirect. +type HttpRedirectAction struct { + // HostRedirect: The host that is used in the redirect response instead + // of the one that was supplied in the request. The value must be from 1 + // to 255 characters. + HostRedirect string `json:"hostRedirect,omitempty"` - // Kind: [Output Only] Type of the resource. Always compute#image for - // images. - Kind string `json:"kind,omitempty"` + // HttpsRedirect: If set to true, the URL scheme in the redirected + // request is set to HTTPS. If set to false, the URL scheme of the + // redirected request remains the same as that of the request. This must + // only be set for URL maps used in TargetHttpProxys. Setting this true + // for TargetHttpsProxy is not permitted. The default is set to false. + HttpsRedirect bool `json:"httpsRedirect,omitempty"` - // LabelFingerprint: A fingerprint for the labels being applied to this - // image, which is essentially a hash of the labels used for optimistic - // locking. The fingerprint is initially generated by Compute Engine and - // changes after every request to modify or update labels. You must - // always provide an up-to-date fingerprint hash in order to update or - // change labels, otherwise the request will fail with error 412 - // conditionNotMet. To see the latest fingerprint, make a get() request - // to retrieve an image. - LabelFingerprint string `json:"labelFingerprint,omitempty"` + // PathRedirect: The path that is used in the redirect response instead + // of the one that was supplied in the request. pathRedirect cannot be + // supplied together with prefixRedirect. Supply one alone or neither. + // If neither is supplied, the path of the original request is used for + // the redirect. The value must be from 1 to 1024 characters. + PathRedirect string `json:"pathRedirect,omitempty"` - // Labels: Labels to apply to this image. These can be later modified by - // the setLabels method. - Labels map[string]string `json:"labels,omitempty"` + // PrefixRedirect: The prefix that replaces the prefixMatch specified in + // the HttpRouteRuleMatch, retaining the remaining portion of the URL + // before redirecting the request. prefixRedirect cannot be supplied + // together with pathRedirect. Supply one alone or neither. If neither + // is supplied, the path of the original request is used for the + // redirect. The value must be from 1 to 1024 characters. + PrefixRedirect string `json:"prefixRedirect,omitempty"` - // LicenseCodes: Integer license codes indicating which licenses are - // attached to this image. - LicenseCodes googleapi.Int64s `json:"licenseCodes,omitempty"` - - // Licenses: Any applicable license URI. - Licenses []string `json:"licenses,omitempty"` - - // Locked: A flag for marketplace VM disk created from the image, which - // is designed for marketplace VM disk to prevent the proprietary data - // on the disk from being accessed unwantedly. The flag will be - // inherited by the disk created from the image. The disk with locked - // flag set to true will be prohibited from performing the operations - // below: - R/W or R/O disk attach - Disk detach, if disk is created via - // create-on-create - Create images - Create snapshots - Create disk - // clone (create disk from the current disk) The image with the locked - // field set to true will be prohibited from performing the operations - // below: - Create images from the current image - Update the locked - // field for the current image The instance with at least one disk with - // locked flag set to true will be prohibited from performing the - // operations below: - Secondary disk attach - Create instant snapshot - - // Create machine images - Create instance template - Delete the - // instance with --keep-disk parameter set to true - Locked bool `json:"locked,omitempty"` - - // Name: Name of the resource; provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. - Name string `json:"name,omitempty"` - - // RawDisk: The parameters of the raw disk image. - RawDisk *ImageRawDisk `json:"rawDisk,omitempty"` - - // RolloutOverride: A rollout policy to apply to this image. When - // specified, the rollout policy overrides per-zone references to the - // image via the associated image family. The rollout policy restricts - // the zones where this image is accessible when using a zonal image - // family reference. When the rollout policy does not include the user - // specified zone, or if the zone is rolled out, this image is - // accessible. The rollout policy for this image is read-only, except - // for allowlisted users. This field might not be configured. To view - // the latest non-deprecated image in a specific zone, use the - // imageFamilyViews.get method. - RolloutOverride *RolloutPolicy `json:"rolloutOverride,omitempty"` - - // SatisfiesPzs: [Output Only] Reserved for future use. - SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` - - // SelfLink: [Output Only] Server-defined URL for the resource. - SelfLink string `json:"selfLink,omitempty"` - - // ShieldedInstanceInitialState: Set the secure boot keys of shielded - // instance. - ShieldedInstanceInitialState *InitialStateConfig `json:"shieldedInstanceInitialState,omitempty"` - - // SourceDisk: URL of the source disk used to create this image. For - // example, the following are valid values: - - // https://www.googleapis.com/compute/v1/projects/project/zones/zone - // /disks/disk - projects/project/zones/zone/disks/disk - - // zones/zone/disks/disk In order to create an image, you must provide - // the full or partial URL of one of the following: - The rawDisk.source - // URL - The sourceDisk URL - The sourceImage URL - The sourceSnapshot - // URL - SourceDisk string `json:"sourceDisk,omitempty"` - - // SourceDiskEncryptionKey: The customer-supplied encryption key of the - // source disk. Required if the source disk is protected by a - // customer-supplied encryption key. - SourceDiskEncryptionKey *CustomerEncryptionKey `json:"sourceDiskEncryptionKey,omitempty"` - - // SourceDiskId: [Output Only] The ID value of the disk used to create - // this image. This value may be used to determine whether the image was - // taken from the current or a previous instance of a given disk name. - SourceDiskId string `json:"sourceDiskId,omitempty"` - - // SourceImage: URL of the source image used to create this image. The - // following are valid formats for the URL: - - // https://www.googleapis.com/compute/v1/projects/project_id/global/ - // images/image_name - projects/project_id/global/images/image_name In - // order to create an image, you must provide the full or partial URL of - // one of the following: - The rawDisk.source URL - The sourceDisk URL - - // The sourceImage URL - The sourceSnapshot URL - SourceImage string `json:"sourceImage,omitempty"` - - // SourceImageEncryptionKey: The customer-supplied encryption key of the - // source image. Required if the source image is protected by a - // customer-supplied encryption key. - SourceImageEncryptionKey *CustomerEncryptionKey `json:"sourceImageEncryptionKey,omitempty"` - - // SourceImageId: [Output Only] The ID value of the image used to create - // this image. This value may be used to determine whether the image was - // taken from the current or a previous instance of a given image name. - SourceImageId string `json:"sourceImageId,omitempty"` - - // SourceSnapshot: URL of the source snapshot used to create this image. - // The following are valid formats for the URL: - - // https://www.googleapis.com/compute/v1/projects/project_id/global/ - // snapshots/snapshot_name - - // projects/project_id/global/snapshots/snapshot_name In order to create - // an image, you must provide the full or partial URL of one of the - // following: - The rawDisk.source URL - The sourceDisk URL - The - // sourceImage URL - The sourceSnapshot URL - SourceSnapshot string `json:"sourceSnapshot,omitempty"` - - // SourceSnapshotEncryptionKey: The customer-supplied encryption key of - // the source snapshot. Required if the source snapshot is protected by - // a customer-supplied encryption key. - SourceSnapshotEncryptionKey *CustomerEncryptionKey `json:"sourceSnapshotEncryptionKey,omitempty"` - - // SourceSnapshotId: [Output Only] The ID value of the snapshot used to - // create this image. This value may be used to determine whether the - // snapshot was taken from the current or a previous instance of a given - // snapshot name. - SourceSnapshotId string `json:"sourceSnapshotId,omitempty"` - - // SourceType: The type of the image used to create this disk. The - // default and only valid value is RAW. - // - // Possible values: - // "RAW" (default) - SourceType string `json:"sourceType,omitempty"` - - // Status: [Output Only] The status of the image. An image can be used - // to create other resources, such as instances, only after the image - // has been successfully created and the status is set to READY. - // Possible values are FAILED, PENDING, or READY. + // RedirectResponseCode: The HTTP Status code to use for this + // RedirectAction. Supported values are: - MOVED_PERMANENTLY_DEFAULT, + // which is the default value and corresponds to 301. - FOUND, which + // corresponds to 302. - SEE_OTHER which corresponds to 303. - + // TEMPORARY_REDIRECT, which corresponds to 307. In this case, the + // request method is retained. - PERMANENT_REDIRECT, which corresponds + // to 308. In this case, the request method is retained. // // Possible values: - // "DELETING" - Image is deleting. - // "FAILED" - Image creation failed due to an error. - // "PENDING" - Image hasn't been created as yet. - // "READY" - Image has been successfully created. - Status string `json:"status,omitempty"` - - // StorageLocations: Cloud Storage bucket storage location of the image - // (regional or multi-regional). - StorageLocations []string `json:"storageLocations,omitempty"` - - // UserLicenses: A list of publicly visible user-licenses. Unlike - // regular licenses, user provided licenses can be modified after the - // disk is created. This includes a list of URLs to the license - // resource. For example, to provide a debian license: - // https://www.googleapis.com/compute/v1/projects/debian-cloud/global/licenses/debian-9-stretch - UserLicenses []string `json:"userLicenses,omitempty"` + // "FOUND" - Http Status Code 302 - Found. + // "MOVED_PERMANENTLY_DEFAULT" - Http Status Code 301 - Moved + // Permanently. + // "PERMANENT_REDIRECT" - Http Status Code 308 - Permanent Redirect + // maintaining HTTP method. + // "SEE_OTHER" - Http Status Code 303 - See Other. + // "TEMPORARY_REDIRECT" - Http Status Code 307 - Temporary Redirect + // maintaining HTTP method. + RedirectResponseCode string `json:"redirectResponseCode,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // StripQuery: If set to true, any accompanying query portion of the + // original URL is removed before redirecting the request. If set to + // false, the query portion of the original URL is retained. The default + // is set to false. + StripQuery bool `json:"stripQuery,omitempty"` - // ForceSendFields is a list of field names (e.g. "Architecture") to + // ForceSendFields is a list of field names (e.g. "HostRedirect") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -18269,7 +18327,7 @@ type Image struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Architecture") to include + // NullFields is a list of field names (e.g. "HostRedirect") 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 @@ -18278,38 +18336,54 @@ type Image struct { NullFields []string `json:"-"` } -func (s *Image) MarshalJSON() ([]byte, error) { - type NoMethod Image +func (s *HttpRedirectAction) MarshalJSON() ([]byte, error) { + type NoMethod HttpRedirectAction raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ImageRawDisk: The parameters of the raw disk image. -type ImageRawDisk struct { - // ContainerType: The format used to encode and transmit the block - // device, which should be TAR. This is just a container and - // transmission format and not a runtime format. Provided by the client - // when the disk image is created. - // - // Possible values: - // "TAR" - ContainerType string `json:"containerType,omitempty"` +// HttpRetryPolicy: The retry policy associates with HttpRouteRule +type HttpRetryPolicy struct { + // NumRetries: Specifies the allowed number retries. This number must be + // > 0. If not specified, defaults to 1. + NumRetries int64 `json:"numRetries,omitempty"` - // Sha1Checksum: [Deprecated] This field is deprecated. An optional SHA1 - // checksum of the disk image before unpackaging provided by the client - // when the disk image is created. - Sha1Checksum string `json:"sha1Checksum,omitempty"` + // PerTryTimeout: Specifies a non-zero timeout per retry attempt. If not + // specified, will use the timeout set in the HttpRouteAction field. If + // timeout in the HttpRouteAction field is not set, this field uses the + // largest timeout among all backend services associated with the route. + // Not supported when the URL map is bound to a target gRPC proxy that + // has the validateForProxyless field set to true. + PerTryTimeout *Duration `json:"perTryTimeout,omitempty"` - // Source: The full Google Cloud Storage URL where the raw disk image - // archive is stored. The following are valid formats for the URL: - - // https://storage.googleapis.com/bucket_name/image_archive_name - - // https://storage.googleapis.com/bucket_name/folder_name/ - // image_archive_name In order to create an image, you must provide the - // full or partial URL of one of the following: - The rawDisk.source URL - // - The sourceDisk URL - The sourceImage URL - The sourceSnapshot URL - Source string `json:"source,omitempty"` + // RetryConditions: Specifies one or more conditions when this retry + // policy applies. Valid values are: - 5xx: retry is attempted if the + // instance or endpoint responds with any 5xx response code, or if the + // instance or endpoint does not respond at all. For example, + // disconnects, reset, read timeout, connection failure, and refused + // streams. - gateway-error: Similar to 5xx, but only applies to + // response codes 502, 503 or 504. - connect-failure: a retry is + // attempted on failures connecting to the instance or endpoint. For + // example, connection timeouts. - retriable-4xx: a retry is attempted + // if the instance or endpoint responds with a 4xx response code. The + // only error that you can retry is error code 409. - refused-stream: a + // retry is attempted if the instance or endpoint resets the stream with + // a REFUSED_STREAM error code. This reset type indicates that it is + // safe to retry. - cancelled: a retry is attempted if the gRPC status + // code in the response header is set to cancelled. - deadline-exceeded: + // a retry is attempted if the gRPC status code in the response header + // is set to deadline-exceeded. - internal: a retry is attempted if the + // gRPC status code in the response header is set to internal. - + // resource-exhausted: a retry is attempted if the gRPC status code in + // the response header is set to resource-exhausted. - unavailable: a + // retry is attempted if the gRPC status code in the response header is + // set to unavailable. Only the following codes are supported when the + // URL map is bound to target gRPC proxy that has validateForProxyless + // field set to true. - cancelled - deadline-exceeded - internal - + // resource-exhausted - unavailable + RetryConditions []string `json:"retryConditions,omitempty"` - // ForceSendFields is a list of field names (e.g. "ContainerType") to + // ForceSendFields is a list of field names (e.g. "NumRetries") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -18317,31 +18391,97 @@ type ImageRawDisk struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ContainerType") 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. "NumRetries") 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 *ImageRawDisk) MarshalJSON() ([]byte, error) { - type NoMethod ImageRawDisk +func (s *HttpRetryPolicy) MarshalJSON() ([]byte, error) { + type NoMethod HttpRetryPolicy raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type ImageFamilyView struct { - // Image: The latest image that is part of the specified image family in - // the requested location, and that is not deprecated. - Image *Image `json:"image,omitempty"` +type HttpRouteAction struct { + // CorsPolicy: The specification for allowing client-side cross-origin + // requests. For more information about the W3C recommendation for + // cross-origin resource sharing (CORS), see Fetch API Living Standard. + // Not supported when the URL map is bound to a target gRPC proxy. + CorsPolicy *CorsPolicy `json:"corsPolicy,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // FaultInjectionPolicy: The specification for fault injection + // introduced into traffic to test the resiliency of clients to backend + // service failure. As part of fault injection, when clients send + // requests to a backend service, delays can be introduced by a load + // balancer on a percentage of requests before sending those requests to + // the backend service. Similarly requests from clients can be aborted + // by the load balancer for a percentage of requests. timeout and + // retry_policy is ignored by clients that are configured with a + // fault_injection_policy if: 1. The traffic is generated by fault + // injection AND 2. The fault injection is not a delay fault injection. + // Fault injection is not supported with the global external HTTP(S) + // load balancer (classic). To see which load balancers support fault + // injection, see Load balancing: Routing and traffic management + // features. + FaultInjectionPolicy *HttpFaultInjection `json:"faultInjectionPolicy,omitempty"` - // ForceSendFields is a list of field names (e.g. "Image") to + // MaxStreamDuration: Specifies the maximum duration (timeout) for + // streams on the selected route. Unlike the timeout field where the + // timeout duration starts from the time the request has been fully + // processed (known as *end-of-stream*), the duration in this field is + // computed from the beginning of the stream until the response has been + // processed, including all retries. A stream that does not complete in + // this duration is closed. If not specified, this field uses the + // maximum maxStreamDuration value among all backend services associated + // with the route. This field is only allowed if the Url map is used + // with backend services with loadBalancingScheme set to + // INTERNAL_SELF_MANAGED. + MaxStreamDuration *Duration `json:"maxStreamDuration,omitempty"` + + // RequestMirrorPolicy: Specifies the policy on how requests intended + // for the route's backends are shadowed to a separate mirrored backend + // service. The load balancer does not wait for responses from the + // shadow service. Before sending traffic to the shadow service, the + // host / authority header is suffixed with -shadow. Not supported when + // the URL map is bound to a target gRPC proxy that has the + // validateForProxyless field set to true. + RequestMirrorPolicy *RequestMirrorPolicy `json:"requestMirrorPolicy,omitempty"` + + // RetryPolicy: Specifies the retry policy associated with this route. + RetryPolicy *HttpRetryPolicy `json:"retryPolicy,omitempty"` + + // Timeout: Specifies the timeout for the selected route. Timeout is + // computed from the time the request has been fully processed (known as + // *end-of-stream*) up until the response has been processed. Timeout + // includes all retries. If not specified, this field uses the largest + // timeout among all backend services associated with the route. Not + // supported when the URL map is bound to a target gRPC proxy that has + // validateForProxyless field set to true. + Timeout *Duration `json:"timeout,omitempty"` + + // UrlRewrite: The spec to modify the URL of the request, before + // forwarding the request to the matched service. urlRewrite is the only + // action supported in UrlMaps for external HTTP(S) load balancers. Not + // supported when the URL map is bound to a target gRPC proxy that has + // the validateForProxyless field set to true. + UrlRewrite *UrlRewrite `json:"urlRewrite,omitempty"` + + // WeightedBackendServices: A list of weighted backend services to send + // traffic to when a route match occurs. The weights determine the + // fraction of traffic that flows to their corresponding backend + // service. If all traffic needs to go to a single backend service, + // there must be one weightedBackendService with weight set to a + // non-zero number. After a backend service is identified and before + // forwarding the request to the backend service, advanced routing + // actions such as URL rewrites and header transformations are applied + // depending on additional settings specified in this HttpRouteAction. + WeightedBackendServices []*WeightedBackendService `json:"weightedBackendServices,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CorsPolicy") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -18349,8 +18489,8 @@ type ImageFamilyView struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Image") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "CorsPolicy") 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. @@ -18358,74 +18498,407 @@ type ImageFamilyView struct { NullFields []string `json:"-"` } -func (s *ImageFamilyView) MarshalJSON() ([]byte, error) { - type NoMethod ImageFamilyView +func (s *HttpRouteAction) MarshalJSON() ([]byte, error) { + type NoMethod HttpRouteAction raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ImageList: Contains a list of images. -type ImageList struct { - // Id: [Output Only] Unique identifier for the resource; defined by the - // server. - Id string `json:"id,omitempty"` +// HttpRouteRule: The HttpRouteRule setting specifies how to match an +// HTTP request and the corresponding routing action that load balancing +// proxies perform. +type HttpRouteRule struct { + // CustomErrorResponsePolicy: customErrorResponsePolicy specifies how + // the Load Balancer returns error responses when BackendServiceor + // BackendBucket responds with an error. If a policy for an error code + // is not configured for the RouteRule, a policy for the error code + // configured in pathMatcher.defaultCustomErrorResponsePolicy is + // applied. If one is not specified in + // pathMatcher.defaultCustomErrorResponsePolicy, the policy configured + // in UrlMap.defaultCustomErrorResponsePolicy takes effect. For example, + // consider a UrlMap with the following configuration: - + // UrlMap.defaultCustomErrorResponsePolicy are configured with policies + // for 5xx and 4xx errors - A RouteRule for /coming_soon/ is configured + // for the error code 404. If the request is for www.myotherdomain.com + // and a 404 is encountered, the policy under + // UrlMap.defaultCustomErrorResponsePolicy takes effect. If a 404 + // response is encountered for the request + // www.example.com/current_events/, the pathMatcher's policy takes + // effect. If however, the request for www.example.com/coming_soon/ + // encounters a 404, the policy in RouteRule.customErrorResponsePolicy + // takes effect. If any of the requests in this example encounter a 500 + // error code, the policy at UrlMap.defaultCustomErrorResponsePolicy + // takes effect. When used in conjunction with + // routeRules.routeAction.retryPolicy, retries take precedence. Only + // once all retries are exhausted, the customErrorResponsePolicy is + // applied. While attempting a retry, if load balancer is successful in + // reaching the service, the customErrorResponsePolicy is ignored and + // the response from the service is returned to the client. + // customErrorResponsePolicy is supported only for Global External + // HTTP(S) load balancing. + CustomErrorResponsePolicy *CustomErrorResponsePolicy `json:"customErrorResponsePolicy,omitempty"` - // Items: A list of Image resources. - Items []*Image `json:"items,omitempty"` + // Description: The short description conveying the intent of this + // routeRule. The description can have a maximum length of 1024 + // characters. + Description string `json:"description,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` + // HeaderAction: Specifies changes to request and response headers that + // need to take effect for the selected backendService. The headerAction + // value specified here is applied before the matching + // pathMatchers[].headerAction and after + // pathMatchers[].routeRules[].routeAction.weightedBackendService.backend + // ServiceWeightAction[].headerAction HeaderAction is not supported for + // load balancers that have their loadBalancingScheme set to EXTERNAL. + // Not supported when the URL map is bound to a target gRPC proxy that + // has validateForProxyless field set to true. + HeaderAction *HttpHeaderAction `json:"headerAction,omitempty"` - // NextPageToken: [Output Only] This token allows you to get the next - // page of results for list requests. If the number of results is larger - // than maxResults, use the nextPageToken as a value for the query - // parameter pageToken in the next list request. Subsequent list - // requests will have their own nextPageToken to continue paging through - // the results. - NextPageToken string `json:"nextPageToken,omitempty"` + // HttpFilterConfigs: Outbound route specific configuration for + // networkservices.HttpFilter resources enabled by Traffic Director. + // httpFilterConfigs only applies for load balancers with + // loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule + // for more details. Not supported when the URL map is bound to a target + // gRPC proxy that has validateForProxyless field set to true. + HttpFilterConfigs []*HttpFilterConfig `json:"httpFilterConfigs,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` + // HttpFilterMetadata: Outbound route specific metadata supplied to + // networkservices.HttpFilter resources enabled by Traffic Director. + // httpFilterMetadata only applies for load balancers with + // loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule + // for more details. The only configTypeUrl supported is + // type.googleapis.com/google.protobuf.Struct Not supported when the URL + // map is bound to a target gRPC proxy that has validateForProxyless + // field set to true. + HttpFilterMetadata []*HttpFilterConfig `json:"httpFilterMetadata,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *ImageListWarning `json:"warning,omitempty"` + // MatchRules: The list of criteria for matching attributes of a request + // to this routeRule. This list has OR semantics: the request matches + // this routeRule when any of the matchRules are satisfied. However + // predicates within a given matchRule have AND semantics. All + // predicates within a matchRule must match for the request to match the + // rule. + MatchRules []*HttpRouteRuleMatch `json:"matchRules,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // Priority: For routeRules within a given pathMatcher, priority + // determines the order in which a load balancer interprets routeRules. + // RouteRules are evaluated in order of priority, from the lowest to + // highest number. The priority of a rule decreases as its number + // increases (1, 2, 3, N+1). The first rule that matches the request is + // applied. You cannot configure two or more routeRules with the same + // priority. Priority for each rule must be set to a number from 0 to + // 2147483647 inclusive. Priority numbers can have gaps, which enable + // you to add or remove rules in the future without affecting the rest + // of the rules. For example, 1, 2, 3, 4, 5, 9, 12, 16 is a valid series + // of priority numbers to which you could add rules numbered from 6 to + // 8, 10 to 11, and 13 to 15 in the future without any impact on + // existing rules. + Priority int64 `json:"priority,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // RouteAction: In response to a matching matchRule, the load balancer + // performs advanced routing actions, such as URL rewrites and header + // transformations, before forwarding the request to the selected + // backend. If routeAction specifies any weightedBackendServices, + // service must not be set. Conversely if service is set, routeAction + // cannot contain any weightedBackendServices. Only one of urlRedirect, + // service or routeAction.weightedBackendService must be set. URL maps + // for Classic external HTTP(S) load balancers only support the + // urlRewrite action within a route rule's routeAction. + RouteAction *HttpRouteAction `json:"routeAction,omitempty"` + + // Service: The full or partial URL of the backend service resource to + // which traffic is directed if this rule is matched. If routeAction is + // also specified, advanced routing actions, such as URL rewrites, take + // effect before sending the request to the backend. However, if service + // is specified, routeAction cannot contain any weightedBackendServices. + // Conversely, if routeAction specifies any weightedBackendServices, + // service must not be specified. Only one of urlRedirect, service or + // routeAction.weightedBackendService must be set. + Service string `json:"service,omitempty"` + + // UrlRedirect: When this rule is matched, the request is redirected to + // a URL specified by urlRedirect. If urlRedirect is specified, service + // or routeAction must not be set. Not supported when the URL map is + // bound to a target gRPC proxy. + UrlRedirect *HttpRedirectAction `json:"urlRedirect,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "CustomErrorResponsePolicy") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. + // "CustomErrorResponsePolicy") 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 *ImageList) MarshalJSON() ([]byte, error) { - type NoMethod ImageList +func (s *HttpRouteRule) MarshalJSON() ([]byte, error) { + type NoMethod HttpRouteRule raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ImageListWarning: [Output Only] Informational warning message. -type ImageListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, - // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in - // the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient - // changes made by a failed operation. +// HttpRouteRuleMatch: HttpRouteRuleMatch specifies a set of criteria +// for matching requests to an HttpRouteRule. All specified criteria +// must be satisfied for a match to occur. +type HttpRouteRuleMatch struct { + // FullPathMatch: For satisfying the matchRule condition, the path of + // the request must exactly match the value specified in fullPathMatch + // after removing any query parameters and anchor that may be part of + // the original URL. fullPathMatch must be from 1 to 1024 characters. + // Only one of prefixMatch, fullPathMatch or regexMatch must be + // specified. + FullPathMatch string `json:"fullPathMatch,omitempty"` + + // HeaderMatches: Specifies a list of header match criteria, all of + // which must match corresponding headers in the request. + HeaderMatches []*HttpHeaderMatch `json:"headerMatches,omitempty"` + + // IgnoreCase: Specifies that prefixMatch and fullPathMatch matches are + // case sensitive. The default value is false. ignoreCase must not be + // used with regexMatch. Not supported when the URL map is bound to a + // target gRPC proxy. + IgnoreCase bool `json:"ignoreCase,omitempty"` + + // MetadataFilters: Opaque filter criteria used by the load balancer to + // restrict routing configuration to a limited set of xDS compliant + // clients. In their xDS requests to the load balancer, xDS clients + // present node metadata. When there is a match, the relevant routing + // configuration is made available to those proxies. For each + // metadataFilter in this list, if its filterMatchCriteria is set to + // MATCH_ANY, at least one of the filterLabels must match the + // corresponding label provided in the metadata. If its + // filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels + // must match with corresponding labels provided in the metadata. If + // multiple metadata filters are specified, all of them need to be + // satisfied in order to be considered a match. metadataFilters + // specified here is applied after those specified in ForwardingRule + // that refers to the UrlMap this HttpRouteRuleMatch belongs to. + // metadataFilters only applies to load balancers that have + // loadBalancingScheme set to INTERNAL_SELF_MANAGED. Not supported when + // the URL map is bound to a target gRPC proxy that has + // validateForProxyless field set to true. + MetadataFilters []*MetadataFilter `json:"metadataFilters,omitempty"` + + // PathTemplateMatch: If specified, the route is a pattern match + // expression that must match the :path header once the query string is + // removed. A pattern match allows you to match - The value must be + // between 1 and 1024 characters - The pattern must start with a leading + // slash ("/") - There may be no more than 5 operators in pattern + // Precisely one of prefix_match, full_path_match, regex_match or + // path_template_match must be set. + PathTemplateMatch string `json:"pathTemplateMatch,omitempty"` + + // PrefixMatch: For satisfying the matchRule condition, the request's + // path must begin with the specified prefixMatch. prefixMatch must + // begin with a /. The value must be from 1 to 1024 characters. Only one + // of prefixMatch, fullPathMatch or regexMatch must be specified. + PrefixMatch string `json:"prefixMatch,omitempty"` + + // QueryParameterMatches: Specifies a list of query parameter match + // criteria, all of which must match corresponding query parameters in + // the request. Not supported when the URL map is bound to a target gRPC + // proxy. + QueryParameterMatches []*HttpQueryParameterMatch `json:"queryParameterMatches,omitempty"` + + // RegexMatch: For satisfying the matchRule condition, the path of the + // request must satisfy the regular expression specified in regexMatch + // after removing any query parameters and anchor supplied with the + // original URL. For more information about regular expression syntax, + // see Syntax. Only one of prefixMatch, fullPathMatch or regexMatch must + // be specified. Regular expressions can only be used when the + // loadBalancingScheme is set to INTERNAL_SELF_MANAGED. + RegexMatch string `json:"regexMatch,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FullPathMatch") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FullPathMatch") 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 *HttpRouteRuleMatch) MarshalJSON() ([]byte, error) { + type NoMethod HttpRouteRuleMatch + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HttpsHealthCheck: Represents a legacy HTTPS Health Check resource. +// Legacy HTTPS health checks have been deprecated. If you are using a +// target pool-based network load balancer, you must use a legacy HTTP +// (not HTTPS) health check. For all other load balancers, including +// backend service-based network load balancers, and for managed +// instance group auto-healing, you must use modern (non-legacy) health +// checks. For more information, see Health checks overview . +type HttpsHealthCheck struct { + // CheckIntervalSec: How often (in seconds) to send a health check. The + // default value is 5 seconds. + CheckIntervalSec int64 `json:"checkIntervalSec,omitempty"` + + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: An optional description of this resource. Provide this + // property when you create the resource. + Description string `json:"description,omitempty"` + + // HealthyThreshold: A so-far unhealthy instance will be marked healthy + // after this many consecutive successes. The default value is 2. + HealthyThreshold int64 `json:"healthyThreshold,omitempty"` + + // Host: The value of the host header in the HTTPS health check request. + // If left empty (default value), the public IP on behalf of which this + // health check is performed will be used. + Host string `json:"host,omitempty"` + + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` + + // Kind: Type of the resource. + Kind string `json:"kind,omitempty"` + + // Name: Name of the resource. Provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. Specifically, the name must be 1-63 characters long and + // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means + // the first character must be a lowercase letter, and all following + // characters must be a dash, lowercase letter, or digit, except the + // last character, which cannot be a dash. + Name string `json:"name,omitempty"` + + // Port: The TCP port number for the HTTPS health check request. The + // default value is 443. + Port int64 `json:"port,omitempty"` + + // RequestPath: The request path of the HTTPS health check request. The + // default value is "/". Must comply with RFC3986. + RequestPath string `json:"requestPath,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // TimeoutSec: How long (in seconds) to wait before claiming failure. + // The default value is 5 seconds. It is invalid for timeoutSec to have + // a greater value than checkIntervalSec. + TimeoutSec int64 `json:"timeoutSec,omitempty"` + + // UnhealthyThreshold: A so-far healthy instance will be marked + // unhealthy after this many consecutive failures. The default value is + // 2. + UnhealthyThreshold int64 `json:"unhealthyThreshold,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CheckIntervalSec") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CheckIntervalSec") 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 *HttpsHealthCheck) MarshalJSON() ([]byte, error) { + type NoMethod HttpsHealthCheck + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HttpsHealthCheckList: Contains a list of HttpsHealthCheck resources. +type HttpsHealthCheckList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of HttpsHealthCheck resources. + Items []*HttpsHealthCheck `json:"items,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *HttpsHealthCheckListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HttpsHealthCheckList) MarshalJSON() ([]byte, error) { + type NoMethod HttpsHealthCheckList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HttpsHealthCheckListWarning: [Output Only] Informational warning +// message. +type HttpsHealthCheckListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient + // changes made by a failed operation. // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was // created. // "DEPRECATED_TYPE_USED" - When deploying and at least one of the @@ -18489,7 +18962,7 @@ type ImageListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*ImageListWarningData `json:"data,omitempty"` + Data []*HttpsHealthCheckListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -18512,13 +18985,13 @@ type ImageListWarning struct { NullFields []string `json:"-"` } -func (s *ImageListWarning) MarshalJSON() ([]byte, error) { - type NoMethod ImageListWarning +func (s *HttpsHealthCheckListWarning) MarshalJSON() ([]byte, error) { + type NoMethod HttpsHealthCheckListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type ImageListWarningData struct { +type HttpsHealthCheckListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -18549,374 +19022,361 @@ type ImageListWarningData struct { NullFields []string `json:"-"` } -func (s *ImageListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ImageListWarningData - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// InitialStateConfig: Initial State for shielded instance, these are -// public keys which are safe to store in public -type InitialStateConfig struct { - // Dbs: The Key Database (db). - Dbs []*FileContentBuffer `json:"dbs,omitempty"` - - // Dbxs: The forbidden key database (dbx). - Dbxs []*FileContentBuffer `json:"dbxs,omitempty"` - - // Keks: The Key Exchange Key (KEK). - Keks []*FileContentBuffer `json:"keks,omitempty"` - - // Pk: The Platform Key (PK). - Pk *FileContentBuffer `json:"pk,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Dbs") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Dbs") 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 *InitialStateConfig) MarshalJSON() ([]byte, error) { - type NoMethod InitialStateConfig +func (s *HttpsHealthCheckListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod HttpsHealthCheckListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Instance: Represents an Instance resource. An instance is a virtual -// machine that is hosted on Google Cloud Platform. For more -// information, read Virtual Machine Instances. -type Instance struct { - // AdvancedMachineFeatures: Controls for advanced machine-related - // behavior features. - AdvancedMachineFeatures *AdvancedMachineFeatures `json:"advancedMachineFeatures,omitempty"` - - // CanIpForward: Allows this instance to send and receive packets with - // non-matching destination or source IPs. This is required if you plan - // to use this instance to forward routes. For more information, see - // Enabling IP Forwarding . - CanIpForward bool `json:"canIpForward,omitempty"` - - ConfidentialInstanceConfig *ConfidentialInstanceConfig `json:"confidentialInstanceConfig,omitempty"` +// Image: Represents an Image resource. You can use images to create +// boot disks for your VM instances. For more information, read Images. +type Image struct { + // Architecture: The architecture of the image. Valid values are ARM64 + // or X86_64. + // + // Possible values: + // "ARCHITECTURE_UNSPECIFIED" - Default value indicating Architecture + // is not set. + // "ARM64" - Machines with architecture ARM64 + // "X86_64" - Machines with architecture X86_64 + Architecture string `json:"architecture,omitempty"` - // CpuPlatform: [Output Only] The CPU platform used by this instance. - CpuPlatform string `json:"cpuPlatform,omitempty"` + // ArchiveSizeBytes: Size of the image tar.gz archive stored in Google + // Cloud Storage (in bytes). + ArchiveSizeBytes int64 `json:"archiveSizeBytes,omitempty,string"` // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. CreationTimestamp string `json:"creationTimestamp,omitempty"` - // DeletionProtection: Whether the resource should be protected against - // deletion. - DeletionProtection bool `json:"deletionProtection,omitempty"` + // Deprecated -- The deprecation status associated with this image. + Deprecated *DeprecationStatus `json:"deprecated,omitempty"` // Description: An optional description of this resource. Provide this // property when you create the resource. Description string `json:"description,omitempty"` - // Disks: Array of disks associated with this instance. Persistent disks - // must be created before you can assign them. - Disks []*AttachedDisk `json:"disks,omitempty"` - - // DisplayDevice: Enables display device for the instance. - DisplayDevice *DisplayDevice `json:"displayDevice,omitempty"` - - // EraseWindowsVssSignature: Specifies whether the disks restored from - // source snapshots or source machine image should erase Windows - // specific VSS signature. - EraseWindowsVssSignature bool `json:"eraseWindowsVssSignature,omitempty"` + // DiskSizeGb: Size of the image when restored onto a persistent disk + // (in GB). + DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` - // Fingerprint: Specifies a fingerprint for this resource, which is - // essentially a hash of the instance's contents and used for optimistic - // locking. The fingerprint is initially generated by Compute Engine and - // changes after every request to modify or update the instance. You - // must always provide an up-to-date fingerprint hash in order to update - // the instance. To see the latest fingerprint, make get() request to - // the instance. - Fingerprint string `json:"fingerprint,omitempty"` + // EnableConfidentialCompute: Whether this image is created from a + // confidential compute mode disk. [Output Only]: This field is not set + // by user, but from source disk. + EnableConfidentialCompute bool `json:"enableConfidentialCompute,omitempty"` - // GuestAccelerators: A list of the type and count of accelerator cards - // attached to the instance. - GuestAccelerators []*AcceleratorConfig `json:"guestAccelerators,omitempty"` + // Family: The name of the image family to which this image belongs. The + // image family name can be from a publicly managed image family + // provided by Compute Engine, or from a custom image family you create. + // For example, centos-stream-9 is a publicly available image family. + // For more information, see Image family best practices. When creating + // disks, you can specify an image family instead of a specific image + // name. The image family always returns its latest image that is not + // deprecated. The name of the image family must comply with RFC1035. + Family string `json:"family,omitempty"` - // Hostname: Specifies the hostname of the instance. The specified - // hostname must be RFC1035 compliant. If hostname is not specified, the - // default hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal when - // using the global DNS, and - // [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal DNS. - Hostname string `json:"hostname,omitempty"` + // GuestOsFeatures: A list of features to enable on the guest operating + // system. Applicable only for bootable images. To see a list of + // available options, see the guestOSfeatures[].type parameter. + GuestOsFeatures []*GuestOsFeature `json:"guestOsFeatures,omitempty"` // Id: [Output Only] The unique identifier for the resource. This // identifier is defined by the server. Id uint64 `json:"id,omitempty,string"` - // InstanceEncryptionKey: Encrypts suspended data for an instance with a - // customer-managed encryption key. If you are creating a new instance, - // this field will encrypt the local SSD and in-memory contents of the - // instance during the suspend operation. If you do not provide an - // encryption key when creating the instance, then the local SSD and - // in-memory contents will be encrypted using an automatically generated - // key during the suspend operation. - InstanceEncryptionKey *CustomerEncryptionKey `json:"instanceEncryptionKey,omitempty"` - - // KeyRevocationActionType: KeyRevocationActionType of the instance. - // Supported options are "STOP" and "NONE". The default value is "NONE" - // if it is not specified. - // - // Possible values: - // "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED" - Default value. This - // value is unused. - // "NONE" - Indicates user chose no operation. - // "STOP" - Indicates user chose to opt for VM shutdown on key - // revocation. - KeyRevocationActionType string `json:"keyRevocationActionType,omitempty"` + // ImageEncryptionKey: Encrypts the image using a customer-supplied + // encryption key. After you encrypt an image with a customer-supplied + // key, you must provide the same key if you use the image later (e.g. + // to create a disk from the image). Customer-supplied encryption keys + // do not protect access to metadata of the disk. If you do not provide + // an encryption key when creating the image, then the disk will be + // encrypted using an automatically generated key and you do not need to + // provide a key to use the image later. + ImageEncryptionKey *CustomerEncryptionKey `json:"imageEncryptionKey,omitempty"` - // Kind: [Output Only] Type of the resource. Always compute#instance for - // instances. + // Kind: [Output Only] Type of the resource. Always compute#image for + // images. Kind string `json:"kind,omitempty"` - // LabelFingerprint: A fingerprint for this request, which is - // essentially a hash of the label's contents and used for optimistic + // LabelFingerprint: A fingerprint for the labels being applied to this + // image, which is essentially a hash of the labels used for optimistic // locking. The fingerprint is initially generated by Compute Engine and // changes after every request to modify or update labels. You must // always provide an up-to-date fingerprint hash in order to update or - // change labels. To see the latest fingerprint, make get() request to - // the instance. + // change labels, otherwise the request will fail with error 412 + // conditionNotMet. To see the latest fingerprint, make a get() request + // to retrieve an image. LabelFingerprint string `json:"labelFingerprint,omitempty"` - // Labels: Labels to apply to this instance. These can be later modified - // by the setLabels method. + // Labels: Labels to apply to this image. These can be later modified by + // the setLabels method. Labels map[string]string `json:"labels,omitempty"` - // LastStartTimestamp: [Output Only] Last start timestamp in RFC3339 - // text format. - LastStartTimestamp string `json:"lastStartTimestamp,omitempty"` - - // LastStopTimestamp: [Output Only] Last stop timestamp in RFC3339 text - // format. - LastStopTimestamp string `json:"lastStopTimestamp,omitempty"` - - // LastSuspendedTimestamp: [Output Only] Last suspended timestamp in - // RFC3339 text format. - LastSuspendedTimestamp string `json:"lastSuspendedTimestamp,omitempty"` - - // MachineType: Full or partial URL of the machine type resource to use - // for this instance, in the format: - // zones/zone/machineTypes/machine-type. This is provided by the client - // when the instance is created. For example, the following is a valid - // partial url to a predefined machine type: - // zones/us-central1-f/machineTypes/n1-standard-1 To create a custom - // machine type, provide a URL to a machine type in the following - // format, where CPUS is 1 or an even number up to 32 (2, 4, 6, ... 24, - // etc), and MEMORY is the total memory for this instance. Memory must - // be a multiple of 256 MB and must be supplied in MB (e.g. 5 GB of - // memory is 5120 MB): zones/zone/machineTypes/custom-CPUS-MEMORY For - // example: zones/us-central1-f/machineTypes/custom-4-5120 For a full - // list of restrictions, read the Specifications for custom machine - // types. - MachineType string `json:"machineType,omitempty"` + // LicenseCodes: Integer license codes indicating which licenses are + // attached to this image. + LicenseCodes googleapi.Int64s `json:"licenseCodes,omitempty"` - // Metadata: The metadata key/value pairs assigned to this instance. - // This includes custom metadata and predefined keys. - Metadata *Metadata `json:"metadata,omitempty"` + // Licenses: Any applicable license URI. + Licenses []string `json:"licenses,omitempty"` - // MinCpuPlatform: Specifies a minimum CPU platform for the VM instance. - // Applicable values are the friendly names of CPU platforms, such as - // minCpuPlatform: "Intel Haswell" or minCpuPlatform: "Intel Sandy - // Bridge". - MinCpuPlatform string `json:"minCpuPlatform,omitempty"` + // Locked: A flag for marketplace VM disk created from the image, which + // is designed for marketplace VM disk to prevent the proprietary data + // on the disk from being accessed unwantedly. The flag will be + // inherited by the disk created from the image. The disk with locked + // flag set to true will be prohibited from performing the operations + // below: - R/W or R/O disk attach - Disk detach, if disk is created via + // create-on-create - Create images - Create snapshots - Create disk + // clone (create disk from the current disk) The image with the locked + // field set to true will be prohibited from performing the operations + // below: - Create images from the current image - Update the locked + // field for the current image The instance with at least one disk with + // locked flag set to true will be prohibited from performing the + // operations below: - Secondary disk attach - Create instant snapshot - + // Create machine images - Create instance template - Delete the + // instance with --keep-disk parameter set to true + Locked bool `json:"locked,omitempty"` - // Name: The name of the resource, provided by the client when initially - // creating the resource. The resource name must be 1-63 characters - // long, and comply with RFC1035. Specifically, the name must be 1-63 - // characters long and match the regular expression - // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be - // a lowercase letter, and all following characters must be a dash, - // lowercase letter, or digit, except the last character, which cannot - // be a dash. + // Name: Name of the resource; provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. Specifically, the name must be 1-63 characters long and + // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means + // the first character must be a lowercase letter, and all following + // characters must be a dash, lowercase letter, or digit, except the + // last character, which cannot be a dash. Name string `json:"name,omitempty"` - // NetworkInterfaces: An array of network configurations for this - // instance. These specify how interfaces are configured to interact - // with other network services, such as connecting to the internet. - // Multiple interfaces are supported per instance. - NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"` + // RawDisk: The parameters of the raw disk image. + RawDisk *ImageRawDisk `json:"rawDisk,omitempty"` - NetworkPerformanceConfig *NetworkPerformanceConfig `json:"networkPerformanceConfig,omitempty"` + // RolloutOverride: A rollout policy to apply to this image. When + // specified, the rollout policy overrides per-zone references to the + // image via the associated image family. The rollout policy restricts + // the zones where this image is accessible when using a zonal image + // family reference. When the rollout policy does not include the user + // specified zone, or if the zone is rolled out, this image is + // accessible. The rollout policy for this image is read-only, except + // for allowlisted users. This field might not be configured. To view + // the latest non-deprecated image in a specific zone, use the + // imageFamilyViews.get method. + RolloutOverride *RolloutPolicy `json:"rolloutOverride,omitempty"` - // Params: Input only. [Input Only] Additional params passed with the - // request, but not persisted as part of resource payload. - Params *InstanceParams `json:"params,omitempty"` + // SatisfiesPzs: [Output Only] Reserved for future use. + SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` - // PostKeyRevocationActionType: PostKeyRevocationActionType of the + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // ShieldedInstanceInitialState: Set the secure boot keys of shielded // instance. - // - // Possible values: - // "NOOP" - Indicates user chose no operation. - // "POST_KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED" - Default value. This - // value is unused. - // "SHUTDOWN" - Indicates user chose to opt for VM shutdown on key - // revocation. - PostKeyRevocationActionType string `json:"postKeyRevocationActionType,omitempty"` + ShieldedInstanceInitialState *InitialStateConfig `json:"shieldedInstanceInitialState,omitempty"` - // PrivateIpv6GoogleAccess: The private IPv6 google access type for the - // VM. If not specified, use INHERIT_FROM_SUBNETWORK as default. - // - // Possible values: - // "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE" - Bidirectional private - // IPv6 access to/from Google services. If specified, the subnetwork who - // is attached to the instance's default network interface will be - // assigned an internal IPv6 prefix if it doesn't have before. - // "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE" - Outbound private IPv6 - // access from VMs in this subnet to Google services. If specified, the - // subnetwork who is attached to the instance's default network - // interface will be assigned an internal IPv6 prefix if it doesn't have - // before. - // "INHERIT_FROM_SUBNETWORK" - Each network interface inherits - // PrivateIpv6GoogleAccess from its subnetwork. - PrivateIpv6GoogleAccess string `json:"privateIpv6GoogleAccess,omitempty"` + // SourceDisk: URL of the source disk used to create this image. For + // example, the following are valid values: - + // https://www.googleapis.com/compute/v1/projects/project/zones/zone + // /disks/disk - projects/project/zones/zone/disks/disk - + // zones/zone/disks/disk In order to create an image, you must provide + // the full or partial URL of one of the following: - The rawDisk.source + // URL - The sourceDisk URL - The sourceImage URL - The sourceSnapshot + // URL + SourceDisk string `json:"sourceDisk,omitempty"` - // ReservationAffinity: Specifies the reservations that this instance - // can consume from. - ReservationAffinity *ReservationAffinity `json:"reservationAffinity,omitempty"` + // SourceDiskEncryptionKey: The customer-supplied encryption key of the + // source disk. Required if the source disk is protected by a + // customer-supplied encryption key. + SourceDiskEncryptionKey *CustomerEncryptionKey `json:"sourceDiskEncryptionKey,omitempty"` - // ResourcePolicies: Resource policies applied to this instance. - ResourcePolicies []string `json:"resourcePolicies,omitempty"` + // SourceDiskId: [Output Only] The ID value of the disk used to create + // this image. This value may be used to determine whether the image was + // taken from the current or a previous instance of a given disk name. + SourceDiskId string `json:"sourceDiskId,omitempty"` - // ResourceStatus: [Output Only] Specifies values set for instance - // attributes as compared to the values requested by user in the - // corresponding input only field. - ResourceStatus *ResourceStatus `json:"resourceStatus,omitempty"` + // SourceImage: URL of the source image used to create this image. The + // following are valid formats for the URL: - + // https://www.googleapis.com/compute/v1/projects/project_id/global/ + // images/image_name - projects/project_id/global/images/image_name In + // order to create an image, you must provide the full or partial URL of + // one of the following: - The rawDisk.source URL - The sourceDisk URL - + // The sourceImage URL - The sourceSnapshot URL + SourceImage string `json:"sourceImage,omitempty"` - // SatisfiesPzs: [Output Only] Reserved for future use. - SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` + // SourceImageEncryptionKey: The customer-supplied encryption key of the + // source image. Required if the source image is protected by a + // customer-supplied encryption key. + SourceImageEncryptionKey *CustomerEncryptionKey `json:"sourceImageEncryptionKey,omitempty"` - // Scheduling: Sets the scheduling options for this instance. - Scheduling *Scheduling `json:"scheduling,omitempty"` + // SourceImageId: [Output Only] The ID value of the image used to create + // this image. This value may be used to determine whether the image was + // taken from the current or a previous instance of a given image name. + SourceImageId string `json:"sourceImageId,omitempty"` - // SelfLink: [Output Only] Server-defined URL for this resource. - SelfLink string `json:"selfLink,omitempty"` + // SourceSnapshot: URL of the source snapshot used to create this image. + // The following are valid formats for the URL: - + // https://www.googleapis.com/compute/v1/projects/project_id/global/ + // snapshots/snapshot_name - + // projects/project_id/global/snapshots/snapshot_name In order to create + // an image, you must provide the full or partial URL of one of the + // following: - The rawDisk.source URL - The sourceDisk URL - The + // sourceImage URL - The sourceSnapshot URL + SourceSnapshot string `json:"sourceSnapshot,omitempty"` - // ServiceAccounts: A list of service accounts, with their specified - // scopes, authorized for this instance. Only one service account per VM - // instance is supported. Service accounts generate access tokens that - // can be accessed through the metadata server and used to authenticate - // applications on the instance. See Service Accounts for more - // information. - ServiceAccounts []*ServiceAccount `json:"serviceAccounts,omitempty"` + // SourceSnapshotEncryptionKey: The customer-supplied encryption key of + // the source snapshot. Required if the source snapshot is protected by + // a customer-supplied encryption key. + SourceSnapshotEncryptionKey *CustomerEncryptionKey `json:"sourceSnapshotEncryptionKey,omitempty"` - ShieldedInstanceConfig *ShieldedInstanceConfig `json:"shieldedInstanceConfig,omitempty"` + // SourceSnapshotId: [Output Only] The ID value of the snapshot used to + // create this image. This value may be used to determine whether the + // snapshot was taken from the current or a previous instance of a given + // snapshot name. + SourceSnapshotId string `json:"sourceSnapshotId,omitempty"` - ShieldedInstanceIntegrityPolicy *ShieldedInstanceIntegrityPolicy `json:"shieldedInstanceIntegrityPolicy,omitempty"` + // SourceType: The type of the image used to create this disk. The + // default and only valid value is RAW. + // + // Possible values: + // "RAW" (default) + SourceType string `json:"sourceType,omitempty"` - // ShieldedVmConfig: Deprecating, please use shielded_instance_config. - ShieldedVmConfig *ShieldedVmConfig `json:"shieldedVmConfig,omitempty"` + // Status: [Output Only] The status of the image. An image can be used + // to create other resources, such as instances, only after the image + // has been successfully created and the status is set to READY. + // Possible values are FAILED, PENDING, or READY. + // + // Possible values: + // "DELETING" - Image is deleting. + // "FAILED" - Image creation failed due to an error. + // "PENDING" - Image hasn't been created as yet. + // "READY" - Image has been successfully created. + Status string `json:"status,omitempty"` - // ShieldedVmIntegrityPolicy: Deprecating, please use - // shielded_instance_integrity_policy. - ShieldedVmIntegrityPolicy *ShieldedVmIntegrityPolicy `json:"shieldedVmIntegrityPolicy,omitempty"` + // StorageLocations: Cloud Storage bucket storage location of the image + // (regional or multi-regional). + StorageLocations []string `json:"storageLocations,omitempty"` - // SourceMachineImage: Source machine image - SourceMachineImage string `json:"sourceMachineImage,omitempty"` + // UserLicenses: A list of publicly visible user-licenses. Unlike + // regular licenses, user provided licenses can be modified after the + // disk is created. This includes a list of URLs to the license + // resource. For example, to provide a debian license: + // https://www.googleapis.com/compute/v1/projects/debian-cloud/global/licenses/debian-9-stretch + UserLicenses []string `json:"userLicenses,omitempty"` - // SourceMachineImageEncryptionKey: Source machine image encryption key - // when creating an instance from a machine image. - SourceMachineImageEncryptionKey *CustomerEncryptionKey `json:"sourceMachineImageEncryptionKey,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // StartRestricted: [Output Only] Whether a VM has been restricted for - // start because Compute Engine has detected suspicious activity. - StartRestricted bool `json:"startRestricted,omitempty"` + // ForceSendFields is a list of field names (e.g. "Architecture") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` - // Status: [Output Only] The status of the instance. One of the - // following values: PROVISIONING, STAGING, RUNNING, STOPPING, - // SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. For more - // information about the status of the instance, see Instance life - // cycle. + // NullFields is a list of field names (e.g. "Architecture") 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 *Image) MarshalJSON() ([]byte, error) { + type NoMethod Image + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ImageRawDisk: The parameters of the raw disk image. +type ImageRawDisk struct { + // ContainerType: The format used to encode and transmit the block + // device, which should be TAR. This is just a container and + // transmission format and not a runtime format. Provided by the client + // when the disk image is created. // // Possible values: - // "DEPROVISIONING" - The instance is halted and we are performing - // tear down tasks like network deprogramming, releasing quota, IP, - // tearing down disks etc. - // "PROVISIONING" - Resources are being allocated for the instance. - // "REPAIRING" - The instance is in repair. - // "RUNNING" - The instance is running. - // "STAGING" - All required resources have been allocated and the - // instance is being started. - // "STOPPED" - The instance has stopped successfully. - // "STOPPING" - The instance is currently stopping (either being - // deleted or killed). - // "SUSPENDED" - The instance has suspended. - // "SUSPENDING" - The instance is suspending. - // "TERMINATED" - The instance has stopped (either by explicit action - // or underlying failure). - Status string `json:"status,omitempty"` + // "TAR" + ContainerType string `json:"containerType,omitempty"` - // StatusMessage: [Output Only] An optional, human-readable explanation - // of the status. - StatusMessage string `json:"statusMessage,omitempty"` + // Sha1Checksum: [Deprecated] This field is deprecated. An optional SHA1 + // checksum of the disk image before unpackaging provided by the client + // when the disk image is created. + Sha1Checksum string `json:"sha1Checksum,omitempty"` - // Tags: Tags to apply to this instance. Tags are used to identify valid - // sources or targets for network firewalls and are specified by the - // client during instance creation. The tags can be later modified by - // the setTags method. Each tag within the list must comply with - // RFC1035. Multiple tags can be specified via the 'tags.items' field. - Tags *Tags `json:"tags,omitempty"` + // Source: The full Google Cloud Storage URL where the raw disk image + // archive is stored. The following are valid formats for the URL: - + // https://storage.googleapis.com/bucket_name/image_archive_name - + // https://storage.googleapis.com/bucket_name/folder_name/ + // image_archive_name In order to create an image, you must provide the + // full or partial URL of one of the following: - The rawDisk.source URL + // - The sourceDisk URL - The sourceImage URL - The sourceSnapshot URL + Source string `json:"source,omitempty"` - // Zone: [Output Only] URL of the zone where the instance resides. You - // must specify this field as part of the HTTP request URL. It is not - // settable as a field in the request body. - Zone string `json:"zone,omitempty"` + // ForceSendFields is a list of field names (e.g. "ContainerType") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ContainerType") 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 *ImageRawDisk) MarshalJSON() ([]byte, error) { + type NoMethod ImageRawDisk + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ImageFamilyView struct { + // Image: The latest image that is part of the specified image family in + // the requested location, and that is not deprecated. + Image *Image `json:"image,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. - // "AdvancedMachineFeatures") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "Image") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdvancedMachineFeatures") - // 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. "Image") 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 *Instance) MarshalJSON() ([]byte, error) { - type NoMethod Instance +func (s *ImageFamilyView) MarshalJSON() ([]byte, error) { + type NoMethod ImageFamilyView raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type InstanceAggregatedList struct { +// ImageList: Contains a list of images. +type ImageList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: An object that contains a list of instances scoped by zone. - Items map[string]InstancesScopedList `json:"items,omitempty"` + // Items: A list of Image resources. + Items []*Image `json:"items,omitempty"` - // Kind: [Output Only] Type of resource. Always - // compute#instanceAggregatedList for aggregated lists of Instance - // resources. + // Kind: Type of resource. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -18930,11 +19390,8 @@ type InstanceAggregatedList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. - Unreachables []string `json:"unreachables,omitempty"` - // Warning: [Output Only] Informational warning message. - Warning *InstanceAggregatedListWarning `json:"warning,omitempty"` + Warning *ImageListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -18957,15 +19414,14 @@ type InstanceAggregatedList struct { NullFields []string `json:"-"` } -func (s *InstanceAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod InstanceAggregatedList +func (s *ImageList) MarshalJSON() ([]byte, error) { + type NoMethod ImageList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// InstanceAggregatedListWarning: [Output Only] Informational warning -// message. -type InstanceAggregatedListWarning struct { +// ImageListWarning: [Output Only] Informational warning message. +type ImageListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -19036,7 +19492,7 @@ type InstanceAggregatedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*InstanceAggregatedListWarningData `json:"data,omitempty"` + Data []*ImageListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -19059,13 +19515,13 @@ type InstanceAggregatedListWarning struct { NullFields []string `json:"-"` } -func (s *InstanceAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InstanceAggregatedListWarning +func (s *ImageListWarning) MarshalJSON() ([]byte, error) { + type NoMethod ImageListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type InstanceAggregatedListWarningData struct { +type ImageListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -19096,61 +19552,28 @@ type InstanceAggregatedListWarningData struct { NullFields []string `json:"-"` } -func (s *InstanceAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InstanceAggregatedListWarningData - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type InstanceConsumptionData struct { - // ConsumptionInfo: Resources consumed by the instance. - ConsumptionInfo *InstanceConsumptionInfo `json:"consumptionInfo,omitempty"` - - // Instance: Server-defined URL for the instance. - Instance string `json:"instance,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ConsumptionInfo") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ConsumptionInfo") 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 *InstanceConsumptionData) MarshalJSON() ([]byte, error) { - type NoMethod InstanceConsumptionData +func (s *ImageListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod ImageListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type InstanceConsumptionInfo struct { - // GuestCpus: The number of virtual CPUs that are available to the - // instance. - GuestCpus int64 `json:"guestCpus,omitempty"` +// InitialStateConfig: Initial State for shielded instance, these are +// public keys which are safe to store in public +type InitialStateConfig struct { + // Dbs: The Key Database (db). + Dbs []*FileContentBuffer `json:"dbs,omitempty"` - // LocalSsdGb: The amount of local SSD storage available to the - // instance, defined in GiB. - LocalSsdGb int64 `json:"localSsdGb,omitempty"` + // Dbxs: The forbidden key database (dbx). + Dbxs []*FileContentBuffer `json:"dbxs,omitempty"` - // MemoryMb: The amount of physical memory available to the instance, - // defined in MiB. - MemoryMb int64 `json:"memoryMb,omitempty"` + // Keks: The Key Exchange Key (KEK). + Keks []*FileContentBuffer `json:"keks,omitempty"` - // MinNodeCpus: The minimal guaranteed number of virtual CPUs that are - // reserved. - MinNodeCpus int64 `json:"minNodeCpus,omitempty"` + // Pk: The Platform Key (PK). + Pk *FileContentBuffer `json:"pk,omitempty"` - // ForceSendFields is a list of field names (e.g. "GuestCpus") to + // ForceSendFields is a list of field names (e.g. "Dbs") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -19158,8 +19581,8 @@ type InstanceConsumptionInfo struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GuestCpus") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Dbs") 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. @@ -19167,122 +19590,336 @@ type InstanceConsumptionInfo struct { NullFields []string `json:"-"` } -func (s *InstanceConsumptionInfo) MarshalJSON() ([]byte, error) { - type NoMethod InstanceConsumptionInfo +func (s *InitialStateConfig) MarshalJSON() ([]byte, error) { + type NoMethod InitialStateConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// InstanceGroup: Represents an Instance Group resource. Instance Groups -// can be used to configure a target for load balancing. Instance groups -// can either be managed or unmanaged. To create managed instance -// groups, use the instanceGroupManager or regionInstanceGroupManager -// resource instead. Use zonal unmanaged instance groups if you need to -// apply load balancing to groups of heterogeneous instances or if you -// need to manage the instances yourself. You cannot create regional -// unmanaged instance groups. For more information, read Instance -// groups. -type InstanceGroup struct { - // CreationTimestamp: [Output Only] The creation timestamp for this - // instance group in RFC3339 text format. - CreationTimestamp string `json:"creationTimestamp,omitempty"` +// Instance: Represents an Instance resource. An instance is a virtual +// machine that is hosted on Google Cloud Platform. For more +// information, read Virtual Machine Instances. +type Instance struct { + // AdvancedMachineFeatures: Controls for advanced machine-related + // behavior features. + AdvancedMachineFeatures *AdvancedMachineFeatures `json:"advancedMachineFeatures,omitempty"` - // Description: An optional description of this resource. Provide this - // property when you create the resource. - Description string `json:"description,omitempty"` + // CanIpForward: Allows this instance to send and receive packets with + // non-matching destination or source IPs. This is required if you plan + // to use this instance to forward routes. For more information, see + // Enabling IP Forwarding . + CanIpForward bool `json:"canIpForward,omitempty"` - // Fingerprint: [Output Only] The fingerprint of the named ports. The - // system uses this fingerprint to detect conflicts when multiple users - // change the named ports concurrently. - Fingerprint string `json:"fingerprint,omitempty"` + ConfidentialInstanceConfig *ConfidentialInstanceConfig `json:"confidentialInstanceConfig,omitempty"` - // Id: [Output Only] A unique identifier for this instance group, - // generated by the server. - Id uint64 `json:"id,omitempty,string"` + // CpuPlatform: [Output Only] The CPU platform used by this instance. + CpuPlatform string `json:"cpuPlatform,omitempty"` - // Kind: [Output Only] The resource type, which is always - // compute#instanceGroup for instance groups. - Kind string `json:"kind,omitempty"` + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Name: The name of the instance group. The name must be 1-63 - // characters long, and comply with RFC1035. - Name string `json:"name,omitempty"` + // DeletionProtection: Whether the resource should be protected against + // deletion. + DeletionProtection bool `json:"deletionProtection,omitempty"` - // NamedPorts: Assigns a name to a port number. For example: {name: - // "http", port: 80} This allows the system to reference ports by the - // assigned name instead of a port number. Named ports can also contain - // multiple ports. For example: [{name: "app1", port: 8080}, {name: - // "app1", port: 8081}, {name: "app2", port: 8082}] Named ports apply to - // all instances in this instance group. - NamedPorts []*NamedPort `json:"namedPorts,omitempty"` + // Description: An optional description of this resource. Provide this + // property when you create the resource. + Description string `json:"description,omitempty"` - // Network: [Output Only] The URL of the network to which all instances - // in the instance group belong. If your instance has multiple network - // interfaces, then the network and subnetwork fields only refer to the - // network and subnet used by your primary interface (nic0). - Network string `json:"network,omitempty"` + // Disks: Array of disks associated with this instance. Persistent disks + // must be created before you can assign them. + Disks []*AttachedDisk `json:"disks,omitempty"` - // Region: [Output Only] The URL of the region where the instance group - // is located (for regional resources). - Region string `json:"region,omitempty"` + // DisplayDevice: Enables display device for the instance. + DisplayDevice *DisplayDevice `json:"displayDevice,omitempty"` - // SelfLink: [Output Only] The URL for this instance group. The server - // generates this URL. - SelfLink string `json:"selfLink,omitempty"` + // EraseWindowsVssSignature: Specifies whether the disks restored from + // source snapshots or source machine image should erase Windows + // specific VSS signature. + EraseWindowsVssSignature bool `json:"eraseWindowsVssSignature,omitempty"` - // Size: [Output Only] The total number of instances in the instance - // group. - Size int64 `json:"size,omitempty"` + // Fingerprint: Specifies a fingerprint for this resource, which is + // essentially a hash of the instance's contents and used for optimistic + // locking. The fingerprint is initially generated by Compute Engine and + // changes after every request to modify or update the instance. You + // must always provide an up-to-date fingerprint hash in order to update + // the instance. To see the latest fingerprint, make get() request to + // the instance. + Fingerprint string `json:"fingerprint,omitempty"` - // Subnetwork: [Output Only] The URL of the subnetwork to which all - // instances in the instance group belong. If your instance has multiple - // network interfaces, then the network and subnetwork fields only refer - // to the network and subnet used by your primary interface (nic0). - Subnetwork string `json:"subnetwork,omitempty"` + // GuestAccelerators: A list of the type and count of accelerator cards + // attached to the instance. + GuestAccelerators []*AcceleratorConfig `json:"guestAccelerators,omitempty"` - // Zone: [Output Only] The URL of the zone where the instance group is - // located (for zonal resources). - Zone string `json:"zone,omitempty"` + // Hostname: Specifies the hostname of the instance. The specified + // hostname must be RFC1035 compliant. If hostname is not specified, the + // default hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal when + // using the global DNS, and + // [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal DNS. + Hostname string `json:"hostname,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // InstanceEncryptionKey: Encrypts suspended data for an instance with a + // customer-managed encryption key. If you are creating a new instance, + // this field will encrypt the local SSD and in-memory contents of the + // instance during the suspend operation. If you do not provide an + // encryption key when creating the instance, then the local SSD and + // in-memory contents will be encrypted using an automatically generated + // key during the suspend operation. + InstanceEncryptionKey *CustomerEncryptionKey `json:"instanceEncryptionKey,omitempty"` + + // KeyRevocationActionType: KeyRevocationActionType of the instance. + // Supported options are "STOP" and "NONE". The default value is "NONE" + // if it is not specified. + // + // Possible values: + // "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED" - Default value. This + // value is unused. + // "NONE" - Indicates user chose no operation. + // "STOP" - Indicates user chose to opt for VM shutdown on key + // revocation. + KeyRevocationActionType string `json:"keyRevocationActionType,omitempty"` + + // Kind: [Output Only] Type of the resource. Always compute#instance for + // instances. + Kind string `json:"kind,omitempty"` + + // LabelFingerprint: A fingerprint for this request, which is + // essentially a hash of the label's contents and used for optimistic + // locking. The fingerprint is initially generated by Compute Engine and + // changes after every request to modify or update labels. You must + // always provide an up-to-date fingerprint hash in order to update or + // change labels. To see the latest fingerprint, make get() request to + // the instance. + LabelFingerprint string `json:"labelFingerprint,omitempty"` + + // Labels: Labels to apply to this instance. These can be later modified + // by the setLabels method. + Labels map[string]string `json:"labels,omitempty"` + + // LastStartTimestamp: [Output Only] Last start timestamp in RFC3339 + // text format. + LastStartTimestamp string `json:"lastStartTimestamp,omitempty"` + + // LastStopTimestamp: [Output Only] Last stop timestamp in RFC3339 text + // format. + LastStopTimestamp string `json:"lastStopTimestamp,omitempty"` + + // LastSuspendedTimestamp: [Output Only] Last suspended timestamp in + // RFC3339 text format. + LastSuspendedTimestamp string `json:"lastSuspendedTimestamp,omitempty"` + + // MachineType: Full or partial URL of the machine type resource to use + // for this instance, in the format: + // zones/zone/machineTypes/machine-type. This is provided by the client + // when the instance is created. For example, the following is a valid + // partial url to a predefined machine type: + // zones/us-central1-f/machineTypes/n1-standard-1 To create a custom + // machine type, provide a URL to a machine type in the following + // format, where CPUS is 1 or an even number up to 32 (2, 4, 6, ... 24, + // etc), and MEMORY is the total memory for this instance. Memory must + // be a multiple of 256 MB and must be supplied in MB (e.g. 5 GB of + // memory is 5120 MB): zones/zone/machineTypes/custom-CPUS-MEMORY For + // example: zones/us-central1-f/machineTypes/custom-4-5120 For a full + // list of restrictions, read the Specifications for custom machine + // types. + MachineType string `json:"machineType,omitempty"` + + // Metadata: The metadata key/value pairs assigned to this instance. + // This includes custom metadata and predefined keys. + Metadata *Metadata `json:"metadata,omitempty"` + + // MinCpuPlatform: Specifies a minimum CPU platform for the VM instance. + // Applicable values are the friendly names of CPU platforms, such as + // minCpuPlatform: "Intel Haswell" or minCpuPlatform: "Intel Sandy + // Bridge". + MinCpuPlatform string `json:"minCpuPlatform,omitempty"` + + // Name: The name of the resource, provided by the client when initially + // creating the resource. The resource name must be 1-63 characters + // long, and comply with RFC1035. Specifically, the name must be 1-63 + // characters long and match the regular expression + // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be + // a lowercase letter, and all following characters must be a dash, + // lowercase letter, or digit, except the last character, which cannot + // be a dash. + Name string `json:"name,omitempty"` + + // NetworkInterfaces: An array of network configurations for this + // instance. These specify how interfaces are configured to interact + // with other network services, such as connecting to the internet. + // Multiple interfaces are supported per instance. + NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"` + + NetworkPerformanceConfig *NetworkPerformanceConfig `json:"networkPerformanceConfig,omitempty"` + + // Params: Input only. [Input Only] Additional params passed with the + // request, but not persisted as part of resource payload. + Params *InstanceParams `json:"params,omitempty"` + + // PostKeyRevocationActionType: PostKeyRevocationActionType of the + // instance. + // + // Possible values: + // "NOOP" - Indicates user chose no operation. + // "POST_KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED" - Default value. This + // value is unused. + // "SHUTDOWN" - Indicates user chose to opt for VM shutdown on key + // revocation. + PostKeyRevocationActionType string `json:"postKeyRevocationActionType,omitempty"` + + // PrivateIpv6GoogleAccess: The private IPv6 google access type for the + // VM. If not specified, use INHERIT_FROM_SUBNETWORK as default. + // + // Possible values: + // "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE" - Bidirectional private + // IPv6 access to/from Google services. If specified, the subnetwork who + // is attached to the instance's default network interface will be + // assigned an internal IPv6 prefix if it doesn't have before. + // "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE" - Outbound private IPv6 + // access from VMs in this subnet to Google services. If specified, the + // subnetwork who is attached to the instance's default network + // interface will be assigned an internal IPv6 prefix if it doesn't have + // before. + // "INHERIT_FROM_SUBNETWORK" - Each network interface inherits + // PrivateIpv6GoogleAccess from its subnetwork. + PrivateIpv6GoogleAccess string `json:"privateIpv6GoogleAccess,omitempty"` + + // ReservationAffinity: Specifies the reservations that this instance + // can consume from. + ReservationAffinity *ReservationAffinity `json:"reservationAffinity,omitempty"` + + // ResourcePolicies: Resource policies applied to this instance. + ResourcePolicies []string `json:"resourcePolicies,omitempty"` + + // ResourceStatus: [Output Only] Specifies values set for instance + // attributes as compared to the values requested by user in the + // corresponding input only field. + ResourceStatus *ResourceStatus `json:"resourceStatus,omitempty"` + + // SatisfiesPzs: [Output Only] Reserved for future use. + SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` + + // Scheduling: Sets the scheduling options for this instance. + Scheduling *Scheduling `json:"scheduling,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // ServiceAccounts: A list of service accounts, with their specified + // scopes, authorized for this instance. Only one service account per VM + // instance is supported. Service accounts generate access tokens that + // can be accessed through the metadata server and used to authenticate + // applications on the instance. See Service Accounts for more + // information. + ServiceAccounts []*ServiceAccount `json:"serviceAccounts,omitempty"` + + ShieldedInstanceConfig *ShieldedInstanceConfig `json:"shieldedInstanceConfig,omitempty"` + + ShieldedInstanceIntegrityPolicy *ShieldedInstanceIntegrityPolicy `json:"shieldedInstanceIntegrityPolicy,omitempty"` + + // ShieldedVmConfig: Deprecating, please use shielded_instance_config. + ShieldedVmConfig *ShieldedVmConfig `json:"shieldedVmConfig,omitempty"` + + // ShieldedVmIntegrityPolicy: Deprecating, please use + // shielded_instance_integrity_policy. + ShieldedVmIntegrityPolicy *ShieldedVmIntegrityPolicy `json:"shieldedVmIntegrityPolicy,omitempty"` + + // SourceMachineImage: Source machine image + SourceMachineImage string `json:"sourceMachineImage,omitempty"` + + // SourceMachineImageEncryptionKey: Source machine image encryption key + // when creating an instance from a machine image. + SourceMachineImageEncryptionKey *CustomerEncryptionKey `json:"sourceMachineImageEncryptionKey,omitempty"` + + // StartRestricted: [Output Only] Whether a VM has been restricted for + // start because Compute Engine has detected suspicious activity. + StartRestricted bool `json:"startRestricted,omitempty"` + + // Status: [Output Only] The status of the instance. One of the + // following values: PROVISIONING, STAGING, RUNNING, STOPPING, + // SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. For more + // information about the status of the instance, see Instance life + // cycle. + // + // Possible values: + // "DEPROVISIONING" - The instance is halted and we are performing + // tear down tasks like network deprogramming, releasing quota, IP, + // tearing down disks etc. + // "PROVISIONING" - Resources are being allocated for the instance. + // "REPAIRING" - The instance is in repair. + // "RUNNING" - The instance is running. + // "STAGING" - All required resources have been allocated and the + // instance is being started. + // "STOPPED" - The instance has stopped successfully. + // "STOPPING" - The instance is currently stopping (either being + // deleted or killed). + // "SUSPENDED" - The instance has suspended. + // "SUSPENDING" - The instance is suspending. + // "TERMINATED" - The instance has stopped (either by explicit action + // or underlying failure). + Status string `json:"status,omitempty"` + + // StatusMessage: [Output Only] An optional, human-readable explanation + // of the status. + StatusMessage string `json:"statusMessage,omitempty"` + + // Tags: Tags to apply to this instance. Tags are used to identify valid + // sources or targets for network firewalls and are specified by the + // client during instance creation. The tags can be later modified by + // the setTags method. Each tag within the list must comply with + // RFC1035. Multiple tags can be specified via the 'tags.items' field. + Tags *Tags `json:"tags,omitempty"` + + // Zone: [Output Only] URL of the zone where the instance resides. You + // must specify this field as part of the HTTP request URL. It is not + // settable as a field in the request body. + Zone string `json:"zone,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "AdvancedMachineFeatures") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") 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 + // NullFields is a list of field names (e.g. "AdvancedMachineFeatures") + // 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 *InstanceGroup) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroup +func (s *Instance) MarshalJSON() ([]byte, error) { + type NoMethod Instance raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type InstanceGroupAggregatedList struct { +type InstanceAggregatedList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of InstanceGroupsScopedList resources. - Items map[string]InstanceGroupsScopedList `json:"items,omitempty"` + // Items: An object that contains a list of instances scoped by zone. + Items map[string]InstancesScopedList `json:"items,omitempty"` - // Kind: [Output Only] The resource type, which is always - // compute#instanceGroupAggregatedList for aggregated lists of instance - // groups. + // Kind: [Output Only] Type of resource. Always + // compute#instanceAggregatedList for aggregated lists of Instance + // resources. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -19300,7 +19937,7 @@ type InstanceGroupAggregatedList struct { Unreachables []string `json:"unreachables,omitempty"` // Warning: [Output Only] Informational warning message. - Warning *InstanceGroupAggregatedListWarning `json:"warning,omitempty"` + Warning *InstanceAggregatedListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -19323,15 +19960,15 @@ type InstanceGroupAggregatedList struct { NullFields []string `json:"-"` } -func (s *InstanceGroupAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupAggregatedList +func (s *InstanceAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod InstanceAggregatedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// InstanceGroupAggregatedListWarning: [Output Only] Informational -// warning message. -type InstanceGroupAggregatedListWarning struct { +// InstanceAggregatedListWarning: [Output Only] Informational warning +// message. +type InstanceAggregatedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -19402,7 +20039,7 @@ type InstanceGroupAggregatedListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*InstanceGroupAggregatedListWarningData `json:"data,omitempty"` + Data []*InstanceAggregatedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -19425,13 +20062,13 @@ type InstanceGroupAggregatedListWarning struct { NullFields []string `json:"-"` } -func (s *InstanceGroupAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupAggregatedListWarning +func (s *InstanceAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod InstanceAggregatedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type InstanceGroupAggregatedListWarningData struct { +type InstanceAggregatedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -19462,23 +20099,193 @@ type InstanceGroupAggregatedListWarningData struct { NullFields []string `json:"-"` } -func (s *InstanceGroupAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupAggregatedListWarningData +func (s *InstanceAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod InstanceAggregatedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// InstanceGroupList: A list of InstanceGroup resources. -type InstanceGroupList struct { +type InstanceConsumptionData struct { + // ConsumptionInfo: Resources consumed by the instance. + ConsumptionInfo *InstanceConsumptionInfo `json:"consumptionInfo,omitempty"` + + // Instance: Server-defined URL for the instance. + Instance string `json:"instance,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ConsumptionInfo") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ConsumptionInfo") 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 *InstanceConsumptionData) MarshalJSON() ([]byte, error) { + type NoMethod InstanceConsumptionData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type InstanceConsumptionInfo struct { + // GuestCpus: The number of virtual CPUs that are available to the + // instance. + GuestCpus int64 `json:"guestCpus,omitempty"` + + // LocalSsdGb: The amount of local SSD storage available to the + // instance, defined in GiB. + LocalSsdGb int64 `json:"localSsdGb,omitempty"` + + // MemoryMb: The amount of physical memory available to the instance, + // defined in MiB. + MemoryMb int64 `json:"memoryMb,omitempty"` + + // MinNodeCpus: The minimal guaranteed number of virtual CPUs that are + // reserved. + MinNodeCpus int64 `json:"minNodeCpus,omitempty"` + + // ForceSendFields is a list of field names (e.g. "GuestCpus") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "GuestCpus") 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 *InstanceConsumptionInfo) MarshalJSON() ([]byte, error) { + type NoMethod InstanceConsumptionInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// InstanceGroup: Represents an Instance Group resource. Instance Groups +// can be used to configure a target for load balancing. Instance groups +// can either be managed or unmanaged. To create managed instance +// groups, use the instanceGroupManager or regionInstanceGroupManager +// resource instead. Use zonal unmanaged instance groups if you need to +// apply load balancing to groups of heterogeneous instances or if you +// need to manage the instances yourself. You cannot create regional +// unmanaged instance groups. For more information, read Instance +// groups. +type InstanceGroup struct { + // CreationTimestamp: [Output Only] The creation timestamp for this + // instance group in RFC3339 text format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: An optional description of this resource. Provide this + // property when you create the resource. + Description string `json:"description,omitempty"` + + // Fingerprint: [Output Only] The fingerprint of the named ports. The + // system uses this fingerprint to detect conflicts when multiple users + // change the named ports concurrently. + Fingerprint string `json:"fingerprint,omitempty"` + + // Id: [Output Only] A unique identifier for this instance group, + // generated by the server. + Id uint64 `json:"id,omitempty,string"` + + // Kind: [Output Only] The resource type, which is always + // compute#instanceGroup for instance groups. + Kind string `json:"kind,omitempty"` + + // Name: The name of the instance group. The name must be 1-63 + // characters long, and comply with RFC1035. + Name string `json:"name,omitempty"` + + // NamedPorts: Assigns a name to a port number. For example: {name: + // "http", port: 80} This allows the system to reference ports by the + // assigned name instead of a port number. Named ports can also contain + // multiple ports. For example: [{name: "app1", port: 8080}, {name: + // "app1", port: 8081}, {name: "app2", port: 8082}] Named ports apply to + // all instances in this instance group. + NamedPorts []*NamedPort `json:"namedPorts,omitempty"` + + // Network: [Output Only] The URL of the network to which all instances + // in the instance group belong. If your instance has multiple network + // interfaces, then the network and subnetwork fields only refer to the + // network and subnet used by your primary interface (nic0). + Network string `json:"network,omitempty"` + + // Region: [Output Only] The URL of the region where the instance group + // is located (for regional resources). + Region string `json:"region,omitempty"` + + // SelfLink: [Output Only] The URL for this instance group. The server + // generates this URL. + SelfLink string `json:"selfLink,omitempty"` + + // Size: [Output Only] The total number of instances in the instance + // group. + Size int64 `json:"size,omitempty"` + + // Subnetwork: [Output Only] The URL of the subnetwork to which all + // instances in the instance group belong. If your instance has multiple + // network interfaces, then the network and subnetwork fields only refer + // to the network and subnet used by your primary interface (nic0). + Subnetwork string `json:"subnetwork,omitempty"` + + // Zone: [Output Only] The URL of the zone where the instance group is + // located (for zonal resources). + Zone string `json:"zone,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreationTimestamp") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreationTimestamp") 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 *InstanceGroup) MarshalJSON() ([]byte, error) { + type NoMethod InstanceGroup + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type InstanceGroupAggregatedList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of InstanceGroup resources. - Items []*InstanceGroup `json:"items,omitempty"` + // Items: A list of InstanceGroupsScopedList resources. + Items map[string]InstanceGroupsScopedList `json:"items,omitempty"` // Kind: [Output Only] The resource type, which is always - // compute#instanceGroupList for instance group lists. + // compute#instanceGroupAggregatedList for aggregated lists of instance + // groups. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -19492,8 +20299,11 @@ type InstanceGroupList struct { // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Unreachables: [Output Only] Unreachable resources. + Unreachables []string `json:"unreachables,omitempty"` + // Warning: [Output Only] Informational warning message. - Warning *InstanceGroupListWarning `json:"warning,omitempty"` + Warning *InstanceGroupAggregatedListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. @@ -19516,15 +20326,15 @@ type InstanceGroupList struct { NullFields []string `json:"-"` } -func (s *InstanceGroupList) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupList +func (s *InstanceGroupAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod InstanceGroupAggregatedList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// InstanceGroupListWarning: [Output Only] Informational warning -// message. -type InstanceGroupListWarning struct { +// InstanceGroupAggregatedListWarning: [Output Only] Informational +// warning message. +type InstanceGroupAggregatedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in // the response. @@ -19595,7 +20405,7 @@ type InstanceGroupListWarning struct { // Data: [Output Only] Metadata about this warning in key: value format. // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" // } - Data []*InstanceGroupListWarningData `json:"data,omitempty"` + Data []*InstanceGroupAggregatedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning // code. @@ -19618,13 +20428,13 @@ type InstanceGroupListWarning struct { NullFields []string `json:"-"` } -func (s *InstanceGroupListWarning) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupListWarning +func (s *InstanceGroupAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod InstanceGroupAggregatedListWarning raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type InstanceGroupListWarningData struct { +type InstanceGroupAggregatedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and @@ -19655,30 +20465,223 @@ type InstanceGroupListWarningData struct { NullFields []string `json:"-"` } -func (s *InstanceGroupListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod InstanceGroupListWarningData +func (s *InstanceGroupAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod InstanceGroupAggregatedListWarningData raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// InstanceGroupManager: Represents a Managed Instance Group resource. -// An instance group is a collection of VM instances that you can manage -// as a single entity. For more information, read Instance groups. For -// zonal Managed Instance Group, use the instanceGroupManagers resource. -// For regional Managed Instance Group, use the -// regionInstanceGroupManagers resource. -type InstanceGroupManager struct { - // AllInstancesConfig: Specifies configuration that overrides the - // instance template configuration for the group. - AllInstancesConfig *InstanceGroupManagerAllInstancesConfig `json:"allInstancesConfig,omitempty"` +// InstanceGroupList: A list of InstanceGroup resources. +type InstanceGroupList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` - // AutoHealingPolicies: The autohealing policy for this managed instance - // group. You can specify only one value. - AutoHealingPolicies []*InstanceGroupManagerAutoHealingPolicy `json:"autoHealingPolicies,omitempty"` + // Items: A list of InstanceGroup resources. + Items []*InstanceGroup `json:"items,omitempty"` - // BaseInstanceName: The base instance name to use for instances in this - // group. The value must be 1-58 characters long. Instances are named by - // appending a hyphen and a random four-character string to the base + // Kind: [Output Only] The resource type, which is always + // compute#instanceGroupList for instance group lists. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *InstanceGroupListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *InstanceGroupList) MarshalJSON() ([]byte, error) { + type NoMethod InstanceGroupList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// InstanceGroupListWarning: [Output Only] Informational warning +// message. +type InstanceGroupListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient + // changes made by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was + // created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk + // that is larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api + // call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an + // injected kernel, which is deprecated. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV + // backend service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to + // list overhead quota exceed which captures the amount of resources + // filtered out by user-defined list filter. + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is + // not assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot + // ip forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's + // nextHopInstance URL refers to an instance that does not have an ipv6 + // interface on the same network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL + // refers to an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance + // URL refers to an instance that is not on the same network as the + // route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not + // have a status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to + // continue the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list + // page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be + // missing due to errors + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource + // that requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a + // resource is in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to + // auto-delete could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in + // instance group manager is valid as such, but its application does not + // make a lot of sense, because it allows only single instance in + // instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema + // are present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" + // } + Data []*InstanceGroupListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") 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 *InstanceGroupListWarning) MarshalJSON() ([]byte, error) { + type NoMethod InstanceGroupListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type InstanceGroupListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") 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 *InstanceGroupListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod InstanceGroupListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// InstanceGroupManager: Represents a Managed Instance Group resource. +// An instance group is a collection of VM instances that you can manage +// as a single entity. For more information, read Instance groups. For +// zonal Managed Instance Group, use the instanceGroupManagers resource. +// For regional Managed Instance Group, use the +// regionInstanceGroupManagers resource. +type InstanceGroupManager struct { + // AllInstancesConfig: Specifies configuration that overrides the + // instance template configuration for the group. + AllInstancesConfig *InstanceGroupManagerAllInstancesConfig `json:"allInstancesConfig,omitempty"` + + // AutoHealingPolicies: The autohealing policy for this managed instance + // group. You can specify only one value. + AutoHealingPolicies []*InstanceGroupManagerAutoHealingPolicy `json:"autoHealingPolicies,omitempty"` + + // BaseInstanceName: The base instance name to use for instances in this + // group. The value must be 1-58 characters long. Instances are named by + // appending a hyphen and a random four-character string to the base // instance name. The base instance name must comply with RFC1035. BaseInstanceName string `json:"baseInstanceName,omitempty"` @@ -39602,7 +40605,7 @@ func (s *PerInstanceConfig) MarshalJSON() ([]byte, error) { // both. To learn which resources support conditions in their IAM // policies, see the IAM documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -// **JSON example:** { "bindings": [ { "role": +// **JSON example:** ``` { "bindings": [ { "role": // "roles/resourcemanager.organizationAdmin", "members": [ // "user:mike@example.com", "group:admins@example.com", // "domain:google.com", @@ -39611,17 +40614,17 @@ func (s *PerInstanceConfig) MarshalJSON() ([]byte, error) { // "user:eve@example.com" ], "condition": { "title": "expirable access", // "description": "Does not grant access after Sep 2020", "expression": // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], -// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - -// members: - user:mike@example.com - group:admins@example.com - -// domain:google.com - +// "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` +// bindings: - members: - user:mike@example.com - +// group:admins@example.com - domain:google.com - // serviceAccount:my-project-id@appspot.gserviceaccount.com role: // roles/resourcemanager.organizationAdmin - members: - // user:eve@example.com role: roles/resourcemanager.organizationViewer // condition: title: expirable access description: Does not grant access // after Sep 2020 expression: request.time < // timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 -// For a description of IAM and its features, see the IAM documentation -// (https://cloud.google.com/iam/docs/). +// ``` For a description of IAM and its features, see the IAM +// documentation (https://cloud.google.com/iam/docs/). type Policy struct { // AuditConfigs: Specifies cloud audit logging configuration for this // policy. @@ -44086,6 +45089,14 @@ type Reservation struct { // format. CreationTimestamp string `json:"creationTimestamp,omitempty"` + // DeleteAfterDuration: Duration time relative to reservation creation + // when GCE will automatically delete this resource. + DeleteAfterDuration *Duration `json:"deleteAfterDuration,omitempty"` + + // DeleteAtTime: Absolute time in future when the reservation will be + // auto-deleted by GCE. Timestamp is represented in RFC3339 text format. + DeleteAtTime string `json:"deleteAtTime,omitempty"` + // Description: An optional description of this resource. Provide this // property when you create the resource. Description string `json:"description,omitempty"` @@ -46181,7 +47192,10 @@ type Route struct { Description string `json:"description,omitempty"` // DestRange: The destination range of outgoing packets that this route - // applies to. Both IPv4 and IPv6 are supported. + // applies to. Both IPv4 and IPv6 are supported. Must specify an IPv4 + // range (e.g. 192.0.2.0/24) or an IPv6 range in RFC 4291 format (e.g. + // 2001:db8::/32). IPv6 range will be displayed using RFC 5952 + // compressed format. DestRange string `json:"destRange,omitempty"` // Id: [Output Only] The unique identifier for the resource. This @@ -46236,7 +47250,12 @@ type Route struct { NextHopInterconnectAttachment string `json:"nextHopInterconnectAttachment,omitempty"` // NextHopIp: The network IP address of an instance that should handle - // matching packets. Only IPv4 is supported. + // matching packets. Both IPv6 address and IPv4 addresses are supported. + // Must specify an IPv4 address in dot-decimal notation (e.g. + // 192.0.2.99) or an IPv6 address in RFC 4291 format (e.g. + // 2001:db8::2d9:51:0:0 or 2001:db8:0:0:2d9:51:0:0). IPv6 addresses will + // be displayed using RFC 5952 compressed format (e.g. + // 2001:db8::2d9:51:0:0). Should never be an IPv4-mapped IPv6 address. NextHopIp string `json:"nextHopIp,omitempty"` // NextHopNetwork: The URL of the local network if it should handle @@ -65614,89 +66633,850 @@ type ZoneListWarningData struct { NullFields []string `json:"-"` } -func (s *ZoneListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod ZoneListWarningData - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +func (s *ZoneListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod ZoneListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ZoneSetLabelsRequest struct { + // LabelFingerprint: The fingerprint of the previous set of labels for + // this resource, used to detect conflicts. The fingerprint is initially + // generated by Compute Engine and changes after every request to modify + // or update labels. You must always provide an up-to-date fingerprint + // hash in order to update or change labels. Make a get() request to the + // resource to get the latest fingerprint. + LabelFingerprint string `json:"labelFingerprint,omitempty"` + + // Labels: The labels to set for this resource. + Labels map[string]string `json:"labels,omitempty"` + + // ForceSendFields is a list of field names (e.g. "LabelFingerprint") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "LabelFingerprint") 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 *ZoneSetLabelsRequest) MarshalJSON() ([]byte, error) { + type NoMethod ZoneSetLabelsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ZoneSetPolicyRequest struct { + // Bindings: Flatten Policy to create a backwacd compatible wire-format. + // Deprecated. Use 'policy' to specify bindings. + Bindings []*Binding `json:"bindings,omitempty"` + + // Etag: Flatten Policy to create a backward compatible wire-format. + // Deprecated. Use 'policy' to specify the etag. + Etag string `json:"etag,omitempty"` + + // Policy: REQUIRED: The complete policy to be applied to the + // 'resource'. The size of the policy is limited to a few 10s of KB. An + // empty policy is in general a valid policy but certain services (like + // Projects) might reject them. + Policy *Policy `json:"policy,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Bindings") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Bindings") 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 *ZoneSetPolicyRequest) MarshalJSON() ([]byte, error) { + type NoMethod ZoneSetPolicyRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "compute.acceleratorTypes.aggregatedList": + +type AcceleratorTypesAggregatedListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// AggregatedList: Retrieves an aggregated list of accelerator types. +// +// - project: Project ID for this request. +func (r *AcceleratorTypesService) AggregatedList(project string) *AcceleratorTypesAggregatedListCall { + c := &AcceleratorTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources +// support two types of filter expressions: expressions that support +// regular expressions and expressions that follow API improvement +// proposal AIP-160. If you want to use AIP-160, your expression must +// specify the field name, an operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` +// or `:`. For example, if you are filtering Compute Engine instances, +// you can exclude instances named `example-instance` by specifying +// `name != example-instance`. The `:` operator can be used with string +// fields to match substrings. For non-string fields it is equivalent to +// the `=` operator. The `:*` comparison can be used to test whether a +// key has been defined. For example, to find all objects with `owner` +// label use: ``` labels.owner:* ``` You can also filter nested fields. +// For example, you could specify `scheduling.automaticRestart = false` +// to include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` If you want to use a +// regular expression, use the `eq` (equal) or `ne` (not equal) operator +// against a single un-parenthesized expression with or without quotes +// or against multiple parenthesized expressions. Examples: `fieldname +// eq unquoted literal` `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" `(fieldname1 eq literal) +// (fieldname2 ne "literal")` The literal value is interpreted as a +// regular expression using Google RE2 library syntax. The literal value +// must match the entire field. For example, to filter for instances +// that do not end with name "instance", you would use `name ne +// .*instance`. +func (c *AcceleratorTypesAggregatedListCall) Filter(filter string) *AcceleratorTypesAggregatedListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// IncludeAllScopes sets the optional parameter "includeAllScopes": +// Indicates whether every visible scope for each scope type (zone, +// region, global) should be included in the response. For new resource +// types added after this field, the flag has no effect as new resource +// types will always include every visible scope for each scope type in +// response. For resource types which predate this field, if this flag +// is omitted or false, only scopes of the scope types where the +// resource type is expected to be found will be included. +func (c *AcceleratorTypesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *AcceleratorTypesAggregatedListCall { + c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *AcceleratorTypesAggregatedListCall) MaxResults(maxResults int64) *AcceleratorTypesAggregatedListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *AcceleratorTypesAggregatedListCall) OrderBy(orderBy string) *AcceleratorTypesAggregatedListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *AcceleratorTypesAggregatedListCall) PageToken(pageToken string) *AcceleratorTypesAggregatedListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *AcceleratorTypesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *AcceleratorTypesAggregatedListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + 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 *AcceleratorTypesAggregatedListCall) Fields(s ...googleapi.Field) *AcceleratorTypesAggregatedListCall { + 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 *AcceleratorTypesAggregatedListCall) IfNoneMatch(entityTag string) *AcceleratorTypesAggregatedListCall { + 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 *AcceleratorTypesAggregatedListCall) Context(ctx context.Context) *AcceleratorTypesAggregatedListCall { + 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 *AcceleratorTypesAggregatedListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AcceleratorTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/acceleratorTypes") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.acceleratorTypes.aggregatedList" call. +// Exactly one of *AcceleratorTypeAggregatedList or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *AcceleratorTypeAggregatedList.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 *AcceleratorTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*AcceleratorTypeAggregatedList, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &AcceleratorTypeAggregatedList{ + 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": "Retrieves an aggregated list of accelerator types.", + // "flatPath": "projects/{project}/aggregated/acceleratorTypes", + // "httpMethod": "GET", + // "id": "compute.acceleratorTypes.aggregatedList", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "location": "query", + // "type": "string" + // }, + // "includeAllScopes": { + // "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", + // "location": "query", + // "type": "boolean" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "projects/{project}/aggregated/acceleratorTypes", + // "response": { + // "$ref": "AcceleratorTypeAggregatedList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// 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 *AcceleratorTypesAggregatedListCall) Pages(ctx context.Context, f func(*AcceleratorTypeAggregatedList) 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 "compute.acceleratorTypes.get": + +type AcceleratorTypesGetCall struct { + s *Service + project string + zone string + acceleratorType string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the specified accelerator type. +// +// - acceleratorType: Name of the accelerator type to return. +// - project: Project ID for this request. +// - zone: The name of the zone for this request. +func (r *AcceleratorTypesService) Get(project string, zone string, acceleratorType string) *AcceleratorTypesGetCall { + c := &AcceleratorTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.acceleratorType = acceleratorType + 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 *AcceleratorTypesGetCall) Fields(s ...googleapi.Field) *AcceleratorTypesGetCall { + 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 *AcceleratorTypesGetCall) IfNoneMatch(entityTag string) *AcceleratorTypesGetCall { + 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 *AcceleratorTypesGetCall) Context(ctx context.Context) *AcceleratorTypesGetCall { + 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 *AcceleratorTypesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AcceleratorTypesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/acceleratorTypes/{acceleratorType}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "acceleratorType": c.acceleratorType, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.acceleratorTypes.get" call. +// Exactly one of *AcceleratorType or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *AcceleratorType.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 *AcceleratorTypesGetCall) Do(opts ...googleapi.CallOption) (*AcceleratorType, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &AcceleratorType{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified accelerator type.", + // "flatPath": "projects/{project}/zones/{zone}/acceleratorTypes/{acceleratorType}", + // "httpMethod": "GET", + // "id": "compute.acceleratorTypes.get", + // "parameterOrder": [ + // "project", + // "zone", + // "acceleratorType" + // ], + // "parameters": { + // "acceleratorType": { + // "description": "Name of the accelerator type to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/zones/{zone}/acceleratorTypes/{acceleratorType}", + // "response": { + // "$ref": "AcceleratorType" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.acceleratorTypes.list": + +type AcceleratorTypesListCall struct { + s *Service + project string + zone string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieves a list of accelerator types that are available to the +// specified project. +// +// - project: Project ID for this request. +// - zone: The name of the zone for this request. +func (r *AcceleratorTypesService) List(project string, zone string) *AcceleratorTypesListCall { + c := &AcceleratorTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources +// support two types of filter expressions: expressions that support +// regular expressions and expressions that follow API improvement +// proposal AIP-160. If you want to use AIP-160, your expression must +// specify the field name, an operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` +// or `:`. For example, if you are filtering Compute Engine instances, +// you can exclude instances named `example-instance` by specifying +// `name != example-instance`. The `:` operator can be used with string +// fields to match substrings. For non-string fields it is equivalent to +// the `=` operator. The `:*` comparison can be used to test whether a +// key has been defined. For example, to find all objects with `owner` +// label use: ``` labels.owner:* ``` You can also filter nested fields. +// For example, you could specify `scheduling.automaticRestart = false` +// to include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` If you want to use a +// regular expression, use the `eq` (equal) or `ne` (not equal) operator +// against a single un-parenthesized expression with or without quotes +// or against multiple parenthesized expressions. Examples: `fieldname +// eq unquoted literal` `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" `(fieldname1 eq literal) +// (fieldname2 ne "literal")` The literal value is interpreted as a +// regular expression using Google RE2 library syntax. The literal value +// must match the entire field. For example, to filter for instances +// that do not end with name "instance", you would use `name ne +// .*instance`. +func (c *AcceleratorTypesListCall) Filter(filter string) *AcceleratorTypesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *AcceleratorTypesListCall) MaxResults(maxResults int64) *AcceleratorTypesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c } -type ZoneSetLabelsRequest struct { - // LabelFingerprint: The fingerprint of the previous set of labels for - // this resource, used to detect conflicts. The fingerprint is initially - // generated by Compute Engine and changes after every request to modify - // or update labels. You must always provide an up-to-date fingerprint - // hash in order to update or change labels. Make a get() request to the - // resource to get the latest fingerprint. - LabelFingerprint string `json:"labelFingerprint,omitempty"` +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *AcceleratorTypesListCall) OrderBy(orderBy string) *AcceleratorTypesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} - // Labels: The labels to set for this resource. - Labels map[string]string `json:"labels,omitempty"` +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *AcceleratorTypesListCall) PageToken(pageToken string) *AcceleratorTypesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} - // ForceSendFields is a list of field names (e.g. "LabelFingerprint") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *AcceleratorTypesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *AcceleratorTypesListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} - // NullFields is a list of field names (e.g. "LabelFingerprint") 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:"-"` +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AcceleratorTypesListCall) Fields(s ...googleapi.Field) *AcceleratorTypesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c } -func (s *ZoneSetLabelsRequest) MarshalJSON() ([]byte, error) { - type NoMethod ZoneSetLabelsRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +// 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 *AcceleratorTypesListCall) IfNoneMatch(entityTag string) *AcceleratorTypesListCall { + c.ifNoneMatch_ = entityTag + return c } -type ZoneSetPolicyRequest struct { - // Bindings: Flatten Policy to create a backwacd compatible wire-format. - // Deprecated. Use 'policy' to specify bindings. - Bindings []*Binding `json:"bindings,omitempty"` +// 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 *AcceleratorTypesListCall) Context(ctx context.Context) *AcceleratorTypesListCall { + c.ctx_ = ctx + return c +} - // Etag: Flatten Policy to create a backward compatible wire-format. - // Deprecated. Use 'policy' to specify the etag. - Etag string `json:"etag,omitempty"` +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AcceleratorTypesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} - // Policy: REQUIRED: The complete policy to be applied to the - // 'resource'. The size of the policy is limited to a few 10s of KB. An - // empty policy is in general a valid policy but certain services (like - // Projects) might reject them. - Policy *Policy `json:"policy,omitempty"` +func (c *AcceleratorTypesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/acceleratorTypes") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} - // ForceSendFields is a list of field names (e.g. "Bindings") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` +// Do executes the "compute.acceleratorTypes.list" call. +// Exactly one of *AcceleratorTypeList or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *AcceleratorTypeList.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 *AcceleratorTypesListCall) Do(opts ...googleapi.CallOption) (*AcceleratorTypeList, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &AcceleratorTypeList{ + 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": "Retrieves a list of accelerator types that are available to the specified project.", + // "flatPath": "projects/{project}/zones/{zone}/acceleratorTypes", + // "httpMethod": "GET", + // "id": "compute.acceleratorTypes.list", + // "parameterOrder": [ + // "project", + // "zone" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "location": "query", + // "type": "boolean" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/zones/{zone}/acceleratorTypes", + // "response": { + // "$ref": "AcceleratorTypeList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } - // NullFields is a list of field names (e.g. "Bindings") 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 *ZoneSetPolicyRequest) MarshalJSON() ([]byte, error) { - type NoMethod ZoneSetPolicyRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +// 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 *AcceleratorTypesListCall) Pages(ctx context.Context, f func(*AcceleratorTypeList) 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 "compute.acceleratorTypes.aggregatedList": +// method id "compute.addresses.aggregatedList": -type AcceleratorTypesAggregatedListCall struct { +type AddressesAggregatedListCall struct { s *Service project string urlParams_ gensupport.URLParams @@ -65705,11 +67485,11 @@ type AcceleratorTypesAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of accelerator types. +// AggregatedList: Retrieves an aggregated list of addresses. // // - project: Project ID for this request. -func (r *AcceleratorTypesService) AggregatedList(project string) *AcceleratorTypesAggregatedListCall { - c := &AcceleratorTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *AddressesService) AggregatedList(project string) *AddressesAggregatedListCall { + c := &AddressesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project return c } @@ -65749,7 +67529,7 @@ func (r *AcceleratorTypesService) AggregatedList(project string) *AcceleratorTyp // must match the entire field. For example, to filter for instances // that do not end with name "instance", you would use `name ne // .*instance`. -func (c *AcceleratorTypesAggregatedListCall) Filter(filter string) *AcceleratorTypesAggregatedListCall { +func (c *AddressesAggregatedListCall) Filter(filter string) *AddressesAggregatedListCall { c.urlParams_.Set("filter", filter) return c } @@ -65762,7 +67542,7 @@ func (c *AcceleratorTypesAggregatedListCall) Filter(filter string) *AcceleratorT // response. For resource types which predate this field, if this flag // is omitted or false, only scopes of the scope types where the // resource type is expected to be found will be included. -func (c *AcceleratorTypesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *AcceleratorTypesAggregatedListCall { +func (c *AddressesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *AddressesAggregatedListCall { c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) return c } @@ -65773,7 +67553,7 @@ func (c *AcceleratorTypesAggregatedListCall) IncludeAllScopes(includeAllScopes b // a `nextPageToken` that can be used to get the next page of results in // subsequent list requests. Acceptable values are `0` to `500`, // inclusive. (Default: `500`) -func (c *AcceleratorTypesAggregatedListCall) MaxResults(maxResults int64) *AcceleratorTypesAggregatedListCall { +func (c *AddressesAggregatedListCall) MaxResults(maxResults int64) *AddressesAggregatedListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -65787,7 +67567,7 @@ func (c *AcceleratorTypesAggregatedListCall) MaxResults(maxResults int64) *Accel // result first). Use this to sort resources like operations so that the // newest operation is returned first. Currently, only sorting by `name` // or `creationTimestamp desc` is supported. -func (c *AcceleratorTypesAggregatedListCall) OrderBy(orderBy string) *AcceleratorTypesAggregatedListCall { +func (c *AddressesAggregatedListCall) OrderBy(orderBy string) *AddressesAggregatedListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -65795,7 +67575,7 @@ func (c *AcceleratorTypesAggregatedListCall) OrderBy(orderBy string) *Accelerato // PageToken sets the optional parameter "pageToken": Specifies a page // token to use. Set `pageToken` to the `nextPageToken` returned by a // previous list request to get the next page of results. -func (c *AcceleratorTypesAggregatedListCall) PageToken(pageToken string) *AcceleratorTypesAggregatedListCall { +func (c *AddressesAggregatedListCall) PageToken(pageToken string) *AddressesAggregatedListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -65804,7 +67584,7 @@ func (c *AcceleratorTypesAggregatedListCall) PageToken(pageToken string) *Accele // "returnPartialSuccess": Opt-in for partial success behavior which // provides partial results in case of failure. The default value is // false. -func (c *AcceleratorTypesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *AcceleratorTypesAggregatedListCall { +func (c *AddressesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *AddressesAggregatedListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -65812,72 +67592,284 @@ func (c *AcceleratorTypesAggregatedListCall) ReturnPartialSuccess(returnPartialS // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AcceleratorTypesAggregatedListCall) Fields(s ...googleapi.Field) *AcceleratorTypesAggregatedListCall { +func (c *AddressesAggregatedListCall) Fields(s ...googleapi.Field) *AddressesAggregatedListCall { + 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 *AddressesAggregatedListCall) IfNoneMatch(entityTag string) *AddressesAggregatedListCall { + 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 *AddressesAggregatedListCall) Context(ctx context.Context) *AddressesAggregatedListCall { + 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 *AddressesAggregatedListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AddressesAggregatedListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/addresses") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.addresses.aggregatedList" call. +// Exactly one of *AddressAggregatedList or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *AddressAggregatedList.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 *AddressesAggregatedListCall) Do(opts ...googleapi.CallOption) (*AddressAggregatedList, 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &AddressAggregatedList{ + 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": "Retrieves an aggregated list of addresses.", + // "flatPath": "projects/{project}/aggregated/addresses", + // "httpMethod": "GET", + // "id": "compute.addresses.aggregatedList", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "location": "query", + // "type": "string" + // }, + // "includeAllScopes": { + // "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", + // "location": "query", + // "type": "boolean" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "projects/{project}/aggregated/addresses", + // "response": { + // "$ref": "AddressAggregatedList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// 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 *AddressesAggregatedListCall) Pages(ctx context.Context, f func(*AddressAggregatedList) 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 "compute.addresses.delete": + +type AddressesDeleteCall struct { + s *Service + project string + region string + address string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified address resource. +// +// - address: Name of the address resource to delete. +// - project: Project ID for this request. +// - region: Name of the region for this request. +func (r *AddressesService) Delete(project string, region string, address string) *AddressesDeleteCall { + c := &AddressesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.address = address + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *AddressesDeleteCall) RequestId(requestId string) *AddressesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AddressesDeleteCall) Fields(s ...googleapi.Field) *AddressesDeleteCall { 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 *AcceleratorTypesAggregatedListCall) IfNoneMatch(entityTag string) *AcceleratorTypesAggregatedListCall { - 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 *AcceleratorTypesAggregatedListCall) Context(ctx context.Context) *AcceleratorTypesAggregatedListCall { +func (c *AddressesDeleteCall) Context(ctx context.Context) *AddressesDeleteCall { 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 *AcceleratorTypesAggregatedListCall) Header() http.Header { +func (c *AddressesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AcceleratorTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) { +func (c *AddressesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/acceleratorTypes") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/addresses/{address}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, + "region": c.region, + "address": c.address, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.acceleratorTypes.aggregatedList" call. -// Exactly one of *AcceleratorTypeAggregatedList or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *AcceleratorTypeAggregatedList.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 *AcceleratorTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*AcceleratorTypeAggregatedList, error) { +// Do executes the "compute.addresses.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *AddressesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -65896,7 +67888,7 @@ func (c *AcceleratorTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &AcceleratorTypeAggregatedList{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -65908,40 +67900,21 @@ func (c *AcceleratorTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Retrieves an aggregated list of accelerator types.", - // "flatPath": "projects/{project}/aggregated/acceleratorTypes", - // "httpMethod": "GET", - // "id": "compute.acceleratorTypes.aggregatedList", + // "description": "Deletes the specified address resource.", + // "flatPath": "projects/{project}/regions/{region}/addresses/{address}", + // "httpMethod": "DELETE", + // "id": "compute.addresses.delete", // "parameterOrder": [ - // "project" + // "project", + // "region", + // "address" // ], // "parameters": { - // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", - // "location": "query", - // "type": "string" - // }, - // "includeAllScopes": { - // "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", - // "location": "query", - // "type": "boolean" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", - // "location": "query", + // "address": { + // "description": "Name of the address resource to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, // "type": "string" // }, // "project": { @@ -65951,76 +67924,61 @@ func (c *AcceleratorTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (* // "required": true, // "type": "string" // }, - // "returnPartialSuccess": { - // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "region": { + // "description": "Name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", - // "type": "boolean" + // "type": "string" // } // }, - // "path": "projects/{project}/aggregated/acceleratorTypes", + // "path": "projects/{project}/regions/{region}/addresses/{address}", // "response": { - // "$ref": "AcceleratorTypeAggregatedList" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// 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 *AcceleratorTypesAggregatedListCall) Pages(ctx context.Context, f func(*AcceleratorTypeAggregatedList) 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 "compute.acceleratorTypes.get": +// method id "compute.addresses.get": -type AcceleratorTypesGetCall struct { - s *Service - project string - zone string - acceleratorType string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type AddressesGetCall struct { + s *Service + project string + region string + address string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified accelerator type. +// Get: Returns the specified address resource. // -// - acceleratorType: Name of the accelerator type to return. +// - address: Name of the address resource to return. // - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *AcceleratorTypesService) Get(project string, zone string, acceleratorType string) *AcceleratorTypesGetCall { - c := &AcceleratorTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region for this request. +func (r *AddressesService) Get(project string, region string, address string) *AddressesGetCall { + c := &AddressesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.acceleratorType = acceleratorType + c.region = region + c.address = address 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 *AcceleratorTypesGetCall) Fields(s ...googleapi.Field) *AcceleratorTypesGetCall { +func (c *AddressesGetCall) Fields(s ...googleapi.Field) *AddressesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -66030,7 +67988,7 @@ func (c *AcceleratorTypesGetCall) Fields(s ...googleapi.Field) *AcceleratorTypes // 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 *AcceleratorTypesGetCall) IfNoneMatch(entityTag string) *AcceleratorTypesGetCall { +func (c *AddressesGetCall) IfNoneMatch(entityTag string) *AddressesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -66038,21 +67996,21 @@ func (c *AcceleratorTypesGetCall) IfNoneMatch(entityTag string) *AcceleratorType // 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 *AcceleratorTypesGetCall) Context(ctx context.Context) *AcceleratorTypesGetCall { +func (c *AddressesGetCall) Context(ctx context.Context) *AddressesGetCall { 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 *AcceleratorTypesGetCall) Header() http.Header { +func (c *AddressesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AcceleratorTypesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *AddressesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -66065,7 +68023,7 @@ func (c *AcceleratorTypesGetCall) doRequest(alt string) (*http.Response, error) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/acceleratorTypes/{acceleratorType}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/addresses/{address}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -66073,21 +68031,21 @@ func (c *AcceleratorTypesGetCall) doRequest(alt string) (*http.Response, error) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "acceleratorType": c.acceleratorType, + "project": c.project, + "region": c.region, + "address": c.address, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.acceleratorTypes.get" call. -// Exactly one of *AcceleratorType or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *AcceleratorType.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 *AcceleratorTypesGetCall) Do(opts ...googleapi.CallOption) (*AcceleratorType, error) { +// Do executes the "compute.addresses.get" call. +// Exactly one of *Address or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Address.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 *AddressesGetCall) Do(opts ...googleapi.CallOption) (*Address, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -66106,7 +68064,7 @@ func (c *AcceleratorTypesGetCall) Do(opts ...googleapi.CallOption) (*Accelerator if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &AcceleratorType{ + ret := &Address{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -66118,18 +68076,18 @@ func (c *AcceleratorTypesGetCall) Do(opts ...googleapi.CallOption) (*Accelerator } return ret, nil // { - // "description": "Returns the specified accelerator type.", - // "flatPath": "projects/{project}/zones/{zone}/acceleratorTypes/{acceleratorType}", + // "description": "Returns the specified address resource.", + // "flatPath": "projects/{project}/regions/{region}/addresses/{address}", // "httpMethod": "GET", - // "id": "compute.acceleratorTypes.get", + // "id": "compute.addresses.get", // "parameterOrder": [ // "project", - // "zone", - // "acceleratorType" + // "region", + // "address" // ], // "parameters": { - // "acceleratorType": { - // "description": "Name of the accelerator type to return.", + // "address": { + // "description": "Name of the address resource to return.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -66142,17 +68100,17 @@ func (c *AcceleratorTypesGetCall) Do(opts ...googleapi.CallOption) (*Accelerator // "required": true, // "type": "string" // }, - // "zone": { - // "description": "The name of the zone for this request.", + // "region": { + // "description": "Name of the region for this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/acceleratorTypes/{acceleratorType}", + // "path": "projects/{project}/regions/{region}/addresses/{address}", // "response": { - // "$ref": "AcceleratorType" + // "$ref": "Address" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -66163,182 +68121,109 @@ func (c *AcceleratorTypesGetCall) Do(opts ...googleapi.CallOption) (*Accelerator } -// method id "compute.acceleratorTypes.list": +// method id "compute.addresses.insert": -type AcceleratorTypesListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type AddressesInsertCall struct { + s *Service + project string + region string + address *Address + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Retrieves a list of accelerator types that are available to the -// specified project. +// Insert: Creates an address resource in the specified project by using +// the data included in the request. // // - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *AcceleratorTypesService) List(project string, zone string) *AcceleratorTypesListCall { - c := &AcceleratorTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region for this request. +func (r *AddressesService) Insert(project string, region string, address *Address) *AddressesInsertCall { + c := &AddressesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources -// support two types of filter expressions: expressions that support -// regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a -// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` -// or `:`. For example, if you are filtering Compute Engine instances, -// you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` -// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") -// ``` By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") -// AND (scheduling.automaticRestart = true) ``` If you want to use a -// regular expression, use the `eq` (equal) or `ne` (not equal) operator -// against a single un-parenthesized expression with or without quotes -// or against multiple parenthesized expressions. Examples: `fieldname -// eq unquoted literal` `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" `(fieldname1 eq literal) -// (fieldname2 ne "literal")` The literal value is interpreted as a -// regular expression using Google RE2 library syntax. The literal value -// must match the entire field. For example, to filter for instances -// that do not end with name "instance", you would use `name ne -// .*instance`. -func (c *AcceleratorTypesListCall) Filter(filter string) *AcceleratorTypesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than `maxResults`, Compute Engine returns -// a `nextPageToken` that can be used to get the next page of results in -// subsequent list requests. Acceptable values are `0` to `500`, -// inclusive. (Default: `500`) -func (c *AcceleratorTypesListCall) MaxResults(maxResults int64) *AcceleratorTypesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. You can also sort results in -// descending order based on the creation timestamp using -// `orderBy="creationTimestamp desc". This sorts results based on the -// `creationTimestamp` field in reverse chronological order (newest -// result first). Use this to sort resources like operations so that the -// newest operation is returned first. Currently, only sorting by `name` -// or `creationTimestamp desc` is supported. -func (c *AcceleratorTypesListCall) OrderBy(orderBy string) *AcceleratorTypesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set `pageToken` to the `nextPageToken` returned by a -// previous list request to get the next page of results. -func (c *AcceleratorTypesListCall) PageToken(pageToken string) *AcceleratorTypesListCall { - c.urlParams_.Set("pageToken", pageToken) + c.region = region + c.address = address return c } -// ReturnPartialSuccess sets the optional parameter -// "returnPartialSuccess": Opt-in for partial success behavior which -// provides partial results in case of failure. The default value is -// false. -func (c *AcceleratorTypesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *AcceleratorTypesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *AddressesInsertCall) RequestId(requestId string) *AddressesInsertCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AcceleratorTypesListCall) Fields(s ...googleapi.Field) *AcceleratorTypesListCall { +func (c *AddressesInsertCall) Fields(s ...googleapi.Field) *AddressesInsertCall { 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 *AcceleratorTypesListCall) IfNoneMatch(entityTag string) *AcceleratorTypesListCall { - 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 *AcceleratorTypesListCall) Context(ctx context.Context) *AcceleratorTypesListCall { +func (c *AddressesInsertCall) Context(ctx context.Context) *AddressesInsertCall { 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 *AcceleratorTypesListCall) Header() http.Header { +func (c *AddressesInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AcceleratorTypesListCall) doRequest(alt string) (*http.Response, error) { +func (c *AddressesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.address) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/acceleratorTypes") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/addresses") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, - "zone": c.zone, + "region": c.region, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.acceleratorTypes.list" call. -// Exactly one of *AcceleratorTypeList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *AcceleratorTypeList.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 *AcceleratorTypesListCall) Do(opts ...googleapi.CallOption) (*AcceleratorTypeList, error) { +// Do executes the "compute.addresses.insert" 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 *AddressesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -66357,7 +68242,7 @@ func (c *AcceleratorTypesListCall) Do(opts ...googleapi.CallOption) (*Accelerato if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &AcceleratorTypeList{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -66369,38 +68254,15 @@ func (c *AcceleratorTypesListCall) Do(opts ...googleapi.CallOption) (*Accelerato } return ret, nil // { - // "description": "Retrieves a list of accelerator types that are available to the specified project.", - // "flatPath": "projects/{project}/zones/{zone}/acceleratorTypes", - // "httpMethod": "GET", - // "id": "compute.acceleratorTypes.list", + // "description": "Creates an address resource in the specified project by using the data included in the request.", + // "flatPath": "projects/{project}/regions/{region}/addresses", + // "httpMethod": "POST", + // "id": "compute.addresses.insert", // "parameterOrder": [ // "project", - // "zone" + // "region" // ], // "parameters": { - // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -66408,70 +68270,55 @@ func (c *AcceleratorTypesListCall) Do(opts ...googleapi.CallOption) (*Accelerato // "required": true, // "type": "string" // }, - // "returnPartialSuccess": { - // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", - // "location": "query", - // "type": "boolean" - // }, - // "zone": { - // "description": "The name of the zone for this request.", + // "region": { + // "description": "Name of the region for this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/acceleratorTypes", + // "path": "projects/{project}/regions/{region}/addresses", + // "request": { + // "$ref": "Address" + // }, // "response": { - // "$ref": "AcceleratorTypeList" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// 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 *AcceleratorTypesListCall) Pages(ctx context.Context, f func(*AcceleratorTypeList) 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 "compute.addresses.aggregatedList": +// method id "compute.addresses.list": -type AddressesAggregatedListCall struct { +type AddressesListCall struct { s *Service project string + region string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// AggregatedList: Retrieves an aggregated list of addresses. +// List: Retrieves a list of addresses contained within the specified +// region. // // - project: Project ID for this request. -func (r *AddressesService) AggregatedList(project string) *AddressesAggregatedListCall { - c := &AddressesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region for this request. +func (r *AddressesService) List(project string, region string) *AddressesListCall { + c := &AddressesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project + c.region = region return c } @@ -66510,31 +68357,18 @@ func (r *AddressesService) AggregatedList(project string) *AddressesAggregatedLi // must match the entire field. For example, to filter for instances // that do not end with name "instance", you would use `name ne // .*instance`. -func (c *AddressesAggregatedListCall) Filter(filter string) *AddressesAggregatedListCall { +func (c *AddressesListCall) Filter(filter string) *AddressesListCall { c.urlParams_.Set("filter", filter) return c } -// IncludeAllScopes sets the optional parameter "includeAllScopes": -// Indicates whether every visible scope for each scope type (zone, -// region, global) should be included in the response. For new resource -// types added after this field, the flag has no effect as new resource -// types will always include every visible scope for each scope type in -// response. For resource types which predate this field, if this flag -// is omitted or false, only scopes of the scope types where the -// resource type is expected to be found will be included. -func (c *AddressesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *AddressesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - // MaxResults sets the optional parameter "maxResults": The maximum // number of results per page that should be returned. If the number of // available results is larger than `maxResults`, Compute Engine returns // a `nextPageToken` that can be used to get the next page of results in // subsequent list requests. Acceptable values are `0` to `500`, // inclusive. (Default: `500`) -func (c *AddressesAggregatedListCall) MaxResults(maxResults int64) *AddressesAggregatedListCall { +func (c *AddressesListCall) MaxResults(maxResults int64) *AddressesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -66548,7 +68382,7 @@ func (c *AddressesAggregatedListCall) MaxResults(maxResults int64) *AddressesAgg // result first). Use this to sort resources like operations so that the // newest operation is returned first. Currently, only sorting by `name` // or `creationTimestamp desc` is supported. -func (c *AddressesAggregatedListCall) OrderBy(orderBy string) *AddressesAggregatedListCall { +func (c *AddressesListCall) OrderBy(orderBy string) *AddressesListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -66556,7 +68390,7 @@ func (c *AddressesAggregatedListCall) OrderBy(orderBy string) *AddressesAggregat // PageToken sets the optional parameter "pageToken": Specifies a page // token to use. Set `pageToken` to the `nextPageToken` returned by a // previous list request to get the next page of results. -func (c *AddressesAggregatedListCall) PageToken(pageToken string) *AddressesAggregatedListCall { +func (c *AddressesListCall) PageToken(pageToken string) *AddressesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -66565,7 +68399,7 @@ func (c *AddressesAggregatedListCall) PageToken(pageToken string) *AddressesAggr // "returnPartialSuccess": Opt-in for partial success behavior which // provides partial results in case of failure. The default value is // false. -func (c *AddressesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *AddressesAggregatedListCall { +func (c *AddressesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *AddressesListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -66573,7 +68407,7 @@ func (c *AddressesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AddressesAggregatedListCall) Fields(s ...googleapi.Field) *AddressesAggregatedListCall { +func (c *AddressesListCall) Fields(s ...googleapi.Field) *AddressesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -66583,7 +68417,7 @@ func (c *AddressesAggregatedListCall) Fields(s ...googleapi.Field) *AddressesAgg // 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 *AddressesAggregatedListCall) IfNoneMatch(entityTag string) *AddressesAggregatedListCall { +func (c *AddressesListCall) IfNoneMatch(entityTag string) *AddressesListCall { c.ifNoneMatch_ = entityTag return c } @@ -66591,21 +68425,21 @@ func (c *AddressesAggregatedListCall) IfNoneMatch(entityTag string) *AddressesAg // 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 *AddressesAggregatedListCall) Context(ctx context.Context) *AddressesAggregatedListCall { +func (c *AddressesListCall) Context(ctx context.Context) *AddressesListCall { 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 *AddressesAggregatedListCall) Header() http.Header { +func (c *AddressesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AddressesAggregatedListCall) doRequest(alt string) (*http.Response, error) { +func (c *AddressesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -66618,7 +68452,7 @@ func (c *AddressesAggregatedListCall) doRequest(alt string) (*http.Response, err var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/addresses") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/addresses") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -66627,18 +68461,19 @@ func (c *AddressesAggregatedListCall) doRequest(alt string) (*http.Response, err req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, + "region": c.region, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.addresses.aggregatedList" call. -// Exactly one of *AddressAggregatedList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *AddressAggregatedList.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 *AddressesAggregatedListCall) Do(opts ...googleapi.CallOption) (*AddressAggregatedList, error) { +// Do executes the "compute.addresses.list" call. +// Exactly one of *AddressList or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *AddressList.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 *AddressesListCall) Do(opts ...googleapi.CallOption) (*AddressList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -66657,7 +68492,7 @@ func (c *AddressesAggregatedListCall) Do(opts ...googleapi.CallOption) (*Address if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &AddressAggregatedList{ + ret := &AddressList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -66669,12 +68504,13 @@ func (c *AddressesAggregatedListCall) Do(opts ...googleapi.CallOption) (*Address } return ret, nil // { - // "description": "Retrieves an aggregated list of addresses.", - // "flatPath": "projects/{project}/aggregated/addresses", + // "description": "Retrieves a list of addresses contained within the specified region.", + // "flatPath": "projects/{project}/regions/{region}/addresses", // "httpMethod": "GET", - // "id": "compute.addresses.aggregatedList", + // "id": "compute.addresses.list", // "parameterOrder": [ - // "project" + // "project", + // "region" // ], // "parameters": { // "filter": { @@ -66682,11 +68518,6 @@ func (c *AddressesAggregatedListCall) Do(opts ...googleapi.CallOption) (*Address // "location": "query", // "type": "string" // }, - // "includeAllScopes": { - // "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", - // "location": "query", - // "type": "boolean" - // }, // "maxResults": { // "default": "500", // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", @@ -66712,15 +68543,22 @@ func (c *AddressesAggregatedListCall) Do(opts ...googleapi.CallOption) (*Address // "required": true, // "type": "string" // }, + // "region": { + // "description": "Name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, // "returnPartialSuccess": { // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", // "location": "query", // "type": "boolean" // } // }, - // "path": "projects/{project}/aggregated/addresses", + // "path": "projects/{project}/regions/{region}/addresses", // "response": { - // "$ref": "AddressAggregatedList" + // "$ref": "AddressList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -66734,7 +68572,7 @@ func (c *AddressesAggregatedListCall) Do(opts ...googleapi.CallOption) (*Address // 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 *AddressesAggregatedListCall) Pages(ctx context.Context, f func(*AddressAggregatedList) error) error { +func (c *AddressesListCall) Pages(ctx context.Context, f func(*AddressList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -66752,28 +68590,30 @@ func (c *AddressesAggregatedListCall) Pages(ctx context.Context, f func(*Address } } -// method id "compute.addresses.delete": +// method id "compute.addresses.move": -type AddressesDeleteCall struct { - s *Service - project string - region string - address string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AddressesMoveCall struct { + s *Service + project string + region string + address string + regionaddressesmoverequest *RegionAddressesMoveRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified address resource. +// Move: Moves the specified address resource. // -// - address: Name of the address resource to delete. -// - project: Project ID for this request. +// - address: Name of the address resource to move. +// - project: Source project ID which the Address is moved from. // - region: Name of the region for this request. -func (r *AddressesService) Delete(project string, region string, address string) *AddressesDeleteCall { - c := &AddressesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *AddressesService) Move(project string, region string, address string, regionaddressesmoverequest *RegionAddressesMoveRequest) *AddressesMoveCall { + c := &AddressesMoveCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region c.address = address + c.regionaddressesmoverequest = regionaddressesmoverequest return c } @@ -66788,7 +68628,7 @@ func (r *AddressesService) Delete(project string, region string, address string) // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *AddressesDeleteCall) RequestId(requestId string) *AddressesDeleteCall { +func (c *AddressesMoveCall) RequestId(requestId string) *AddressesMoveCall { c.urlParams_.Set("requestId", requestId) return c } @@ -66796,7 +68636,7 @@ func (c *AddressesDeleteCall) RequestId(requestId string) *AddressesDeleteCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AddressesDeleteCall) Fields(s ...googleapi.Field) *AddressesDeleteCall { +func (c *AddressesMoveCall) Fields(s ...googleapi.Field) *AddressesMoveCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -66804,21 +68644,21 @@ func (c *AddressesDeleteCall) Fields(s ...googleapi.Field) *AddressesDeleteCall // 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 *AddressesDeleteCall) Context(ctx context.Context) *AddressesDeleteCall { +func (c *AddressesMoveCall) Context(ctx context.Context) *AddressesMoveCall { 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 *AddressesDeleteCall) Header() http.Header { +func (c *AddressesMoveCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AddressesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *AddressesMoveCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -66826,11 +68666,16 @@ func (c *AddressesDeleteCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionaddressesmoverequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/addresses/{address}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/addresses/{address}/move") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -66843,14 +68688,14 @@ func (c *AddressesDeleteCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.addresses.delete" call. +// Do executes the "compute.addresses.move" 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 *AddressesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *AddressesMoveCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -66881,10 +68726,10 @@ func (c *AddressesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Deletes the specified address resource.", - // "flatPath": "projects/{project}/regions/{region}/addresses/{address}", - // "httpMethod": "DELETE", - // "id": "compute.addresses.delete", + // "description": "Moves the specified address resource.", + // "flatPath": "projects/{project}/regions/{region}/addresses/{address}/move", + // "httpMethod": "POST", + // "id": "compute.addresses.move", // "parameterOrder": [ // "project", // "region", @@ -66892,14 +68737,14 @@ func (c *AddressesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, erro // ], // "parameters": { // "address": { - // "description": "Name of the address resource to delete.", + // "description": "Name of the address resource to move.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, // "project": { - // "description": "Project ID for this request.", + // "description": "Source project ID which the Address is moved from.", // "location": "path", // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, @@ -66918,7 +68763,10 @@ func (c *AddressesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, erro // "type": "string" // } // }, - // "path": "projects/{project}/regions/{region}/addresses/{address}", + // "path": "projects/{project}/regions/{region}/addresses/{address}/move", + // "request": { + // "$ref": "RegionAddressesMoveRequest" + // }, // "response": { // "$ref": "Operation" // }, @@ -66930,103 +68778,113 @@ func (c *AddressesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, erro } -// method id "compute.addresses.get": +// method id "compute.addresses.setLabels": -type AddressesGetCall struct { - s *Service - project string - region string - address string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type AddressesSetLabelsCall struct { + s *Service + project string + region string + resource string + regionsetlabelsrequest *RegionSetLabelsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified address resource. +// SetLabels: Sets the labels on an Address. To learn more about labels, +// read the Labeling Resources documentation. // -// - address: Name of the address resource to return. // - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *AddressesService) Get(project string, region string, address string) *AddressesGetCall { - c := &AddressesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: The region for this request. +// - resource: Name or id of the resource for this request. +func (r *AddressesService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *AddressesSetLabelsCall { + c := &AddressesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.address = address + c.resource = resource + c.regionsetlabelsrequest = regionsetlabelsrequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *AddressesSetLabelsCall) RequestId(requestId string) *AddressesSetLabelsCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AddressesGetCall) Fields(s ...googleapi.Field) *AddressesGetCall { +func (c *AddressesSetLabelsCall) Fields(s ...googleapi.Field) *AddressesSetLabelsCall { 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 *AddressesGetCall) IfNoneMatch(entityTag string) *AddressesGetCall { - 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 *AddressesGetCall) Context(ctx context.Context) *AddressesGetCall { +func (c *AddressesSetLabelsCall) Context(ctx context.Context) *AddressesSetLabelsCall { 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 *AddressesGetCall) Header() http.Header { +func (c *AddressesSetLabelsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AddressesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *AddressesSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionsetlabelsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/addresses/{address}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/addresses/{resource}/setLabels") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "address": c.address, + "project": c.project, + "region": c.region, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.addresses.get" call. -// Exactly one of *Address or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Address.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 *AddressesGetCall) Do(opts ...googleapi.CallOption) (*Address, error) { +// Do executes the "compute.addresses.setLabels" 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 *AddressesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -67045,7 +68903,7 @@ func (c *AddressesGetCall) Do(opts ...googleapi.CallOption) (*Address, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Address{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -67057,23 +68915,16 @@ func (c *AddressesGetCall) Do(opts ...googleapi.CallOption) (*Address, error) { } return ret, nil // { - // "description": "Returns the specified address resource.", - // "flatPath": "projects/{project}/regions/{region}/addresses/{address}", - // "httpMethod": "GET", - // "id": "compute.addresses.get", + // "description": "Sets the labels on an Address. To learn more about labels, read the Labeling Resources documentation.", + // "flatPath": "projects/{project}/regions/{region}/addresses/{resource}/setLabels", + // "httpMethod": "POST", + // "id": "compute.addresses.setLabels", // "parameterOrder": [ // "project", // "region", - // "address" + // "resource" // ], // "parameters": { - // "address": { - // "description": "Name of the address resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" - // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -67082,71 +68933,72 @@ func (c *AddressesGetCall) Do(opts ...googleapi.CallOption) (*Address, error) { // "type": "string" // }, // "region": { - // "description": "Name of the region for this request.", + // "description": "The region for this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" // } // }, - // "path": "projects/{project}/regions/{region}/addresses/{address}", + // "path": "projects/{project}/regions/{region}/addresses/{resource}/setLabels", + // "request": { + // "$ref": "RegionSetLabelsRequest" + // }, // "response": { - // "$ref": "Address" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.addresses.insert": +// method id "compute.addresses.testIamPermissions": -type AddressesInsertCall struct { - s *Service - project string - region string - address *Address - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AddressesTestIamPermissionsCall struct { + s *Service + project string + region string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Insert: Creates an address resource in the specified project by using -// the data included in the request. +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. // // - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *AddressesService) Insert(project string, region string, address *Address) *AddressesInsertCall { - c := &AddressesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: The name of the region for this request. +// - resource: Name or id of the resource for this request. +func (r *AddressesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *AddressesTestIamPermissionsCall { + c := &AddressesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.address = address - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *AddressesInsertCall) RequestId(requestId string) *AddressesInsertCall { - c.urlParams_.Set("requestId", requestId) + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest 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 *AddressesInsertCall) Fields(s ...googleapi.Field) *AddressesInsertCall { +func (c *AddressesTestIamPermissionsCall) Fields(s ...googleapi.Field) *AddressesTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -67154,21 +69006,21 @@ func (c *AddressesInsertCall) Fields(s ...googleapi.Field) *AddressesInsertCall // 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 *AddressesInsertCall) Context(ctx context.Context) *AddressesInsertCall { +func (c *AddressesTestIamPermissionsCall) Context(ctx context.Context) *AddressesTestIamPermissionsCall { 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 *AddressesInsertCall) Header() http.Header { +func (c *AddressesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AddressesInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *AddressesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -67176,14 +69028,14 @@ func (c *AddressesInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.address) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/addresses") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/addresses/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -67191,20 +69043,21 @@ func (c *AddressesInsertCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, + "project": c.project, + "region": c.region, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.addresses.insert" 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 *AddressesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.addresses.testIamPermissions" call. +// Exactly one of *TestPermissionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.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 *AddressesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -67223,7 +69076,7 @@ func (c *AddressesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, erro if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &TestPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -67235,13 +69088,14 @@ func (c *AddressesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Creates an address resource in the specified project by using the data included in the request.", - // "flatPath": "projects/{project}/regions/{region}/addresses", + // "description": "Returns permissions that a caller has on the specified resource.", + // "flatPath": "projects/{project}/regions/{region}/addresses/{resource}/testIamPermissions", // "httpMethod": "POST", - // "id": "compute.addresses.insert", + // "id": "compute.addresses.testIamPermissions", // "parameterOrder": [ // "project", - // "region" + // "region", + // "resource" // ], // "parameters": { // "project": { @@ -67252,54 +69106,53 @@ func (c *AddressesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, erro // "type": "string" // }, // "region": { - // "description": "Name of the region for this request.", + // "description": "The name of the region for this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/regions/{region}/addresses", + // "path": "projects/{project}/regions/{region}/addresses/{resource}/testIamPermissions", // "request": { - // "$ref": "Address" + // "$ref": "TestPermissionsRequest" // }, // "response": { - // "$ref": "Operation" + // "$ref": "TestPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.addresses.list": +// method id "compute.autoscalers.aggregatedList": -type AddressesListCall struct { +type AutoscalersAggregatedListCall struct { s *Service project string - region string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Retrieves a list of addresses contained within the specified -// region. +// AggregatedList: Retrieves an aggregated list of autoscalers. // // - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *AddressesService) List(project string, region string) *AddressesListCall { - c := &AddressesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *AutoscalersService) AggregatedList(project string) *AutoscalersAggregatedListCall { + c := &AutoscalersAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region return c } @@ -67338,18 +69191,31 @@ func (r *AddressesService) List(project string, region string) *AddressesListCal // must match the entire field. For example, to filter for instances // that do not end with name "instance", you would use `name ne // .*instance`. -func (c *AddressesListCall) Filter(filter string) *AddressesListCall { +func (c *AutoscalersAggregatedListCall) Filter(filter string) *AutoscalersAggregatedListCall { c.urlParams_.Set("filter", filter) return c } +// IncludeAllScopes sets the optional parameter "includeAllScopes": +// Indicates whether every visible scope for each scope type (zone, +// region, global) should be included in the response. For new resource +// types added after this field, the flag has no effect as new resource +// types will always include every visible scope for each scope type in +// response. For resource types which predate this field, if this flag +// is omitted or false, only scopes of the scope types where the +// resource type is expected to be found will be included. +func (c *AutoscalersAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *AutoscalersAggregatedListCall { + c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) + return c +} + // MaxResults sets the optional parameter "maxResults": The maximum // number of results per page that should be returned. If the number of // available results is larger than `maxResults`, Compute Engine returns // a `nextPageToken` that can be used to get the next page of results in // subsequent list requests. Acceptable values are `0` to `500`, // inclusive. (Default: `500`) -func (c *AddressesListCall) MaxResults(maxResults int64) *AddressesListCall { +func (c *AutoscalersAggregatedListCall) MaxResults(maxResults int64) *AutoscalersAggregatedListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -67363,7 +69229,7 @@ func (c *AddressesListCall) MaxResults(maxResults int64) *AddressesListCall { // result first). Use this to sort resources like operations so that the // newest operation is returned first. Currently, only sorting by `name` // or `creationTimestamp desc` is supported. -func (c *AddressesListCall) OrderBy(orderBy string) *AddressesListCall { +func (c *AutoscalersAggregatedListCall) OrderBy(orderBy string) *AutoscalersAggregatedListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -67371,7 +69237,7 @@ func (c *AddressesListCall) OrderBy(orderBy string) *AddressesListCall { // PageToken sets the optional parameter "pageToken": Specifies a page // token to use. Set `pageToken` to the `nextPageToken` returned by a // previous list request to get the next page of results. -func (c *AddressesListCall) PageToken(pageToken string) *AddressesListCall { +func (c *AutoscalersAggregatedListCall) PageToken(pageToken string) *AutoscalersAggregatedListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -67380,7 +69246,7 @@ func (c *AddressesListCall) PageToken(pageToken string) *AddressesListCall { // "returnPartialSuccess": Opt-in for partial success behavior which // provides partial results in case of failure. The default value is // false. -func (c *AddressesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *AddressesListCall { +func (c *AutoscalersAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *AutoscalersAggregatedListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -67388,7 +69254,7 @@ func (c *AddressesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *Add // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AddressesListCall) Fields(s ...googleapi.Field) *AddressesListCall { +func (c *AutoscalersAggregatedListCall) Fields(s ...googleapi.Field) *AutoscalersAggregatedListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -67398,7 +69264,7 @@ func (c *AddressesListCall) Fields(s ...googleapi.Field) *AddressesListCall { // 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 *AddressesListCall) IfNoneMatch(entityTag string) *AddressesListCall { +func (c *AutoscalersAggregatedListCall) IfNoneMatch(entityTag string) *AutoscalersAggregatedListCall { c.ifNoneMatch_ = entityTag return c } @@ -67406,21 +69272,21 @@ func (c *AddressesListCall) IfNoneMatch(entityTag string) *AddressesListCall { // 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 *AddressesListCall) Context(ctx context.Context) *AddressesListCall { +func (c *AutoscalersAggregatedListCall) Context(ctx context.Context) *AutoscalersAggregatedListCall { 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 *AddressesListCall) Header() http.Header { +func (c *AutoscalersAggregatedListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AddressesListCall) doRequest(alt string) (*http.Response, error) { +func (c *AutoscalersAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -67433,7 +69299,7 @@ func (c *AddressesListCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/addresses") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/autoscalers") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -67442,19 +69308,18 @@ func (c *AddressesListCall) doRequest(alt string) (*http.Response, error) { req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, - "region": c.region, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.addresses.list" call. -// Exactly one of *AddressList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *AddressList.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 *AddressesListCall) Do(opts ...googleapi.CallOption) (*AddressList, error) { +// Do executes the "compute.autoscalers.aggregatedList" call. +// Exactly one of *AutoscalerAggregatedList or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *AutoscalerAggregatedList.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 *AutoscalersAggregatedListCall) Do(opts ...googleapi.CallOption) (*AutoscalerAggregatedList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -67473,7 +69338,7 @@ func (c *AddressesListCall) Do(opts ...googleapi.CallOption) (*AddressList, erro if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &AddressList{ + ret := &AutoscalerAggregatedList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -67485,13 +69350,12 @@ func (c *AddressesListCall) Do(opts ...googleapi.CallOption) (*AddressList, erro } return ret, nil // { - // "description": "Retrieves a list of addresses contained within the specified region.", - // "flatPath": "projects/{project}/regions/{region}/addresses", + // "description": "Retrieves an aggregated list of autoscalers.", + // "flatPath": "projects/{project}/aggregated/autoscalers", // "httpMethod": "GET", - // "id": "compute.addresses.list", + // "id": "compute.autoscalers.aggregatedList", // "parameterOrder": [ - // "project", - // "region" + // "project" // ], // "parameters": { // "filter": { @@ -67499,6 +69363,11 @@ func (c *AddressesListCall) Do(opts ...googleapi.CallOption) (*AddressList, erro // "location": "query", // "type": "string" // }, + // "includeAllScopes": { + // "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", + // "location": "query", + // "type": "boolean" + // }, // "maxResults": { // "default": "500", // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", @@ -67524,22 +69393,15 @@ func (c *AddressesListCall) Do(opts ...googleapi.CallOption) (*AddressList, erro // "required": true, // "type": "string" // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, // "returnPartialSuccess": { // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", // "location": "query", // "type": "boolean" // } // }, - // "path": "projects/{project}/regions/{region}/addresses", + // "path": "projects/{project}/aggregated/autoscalers", // "response": { - // "$ref": "AddressList" + // "$ref": "AutoscalerAggregatedList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -67553,7 +69415,7 @@ func (c *AddressesListCall) Do(opts ...googleapi.CallOption) (*AddressList, erro // 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 *AddressesListCall) Pages(ctx context.Context, f func(*AddressList) error) error { +func (c *AutoscalersAggregatedListCall) Pages(ctx context.Context, f func(*AutoscalerAggregatedList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -67571,30 +69433,28 @@ func (c *AddressesListCall) Pages(ctx context.Context, f func(*AddressList) erro } } -// method id "compute.addresses.move": +// method id "compute.autoscalers.delete": -type AddressesMoveCall struct { - s *Service - project string - region string - address string - regionaddressesmoverequest *RegionAddressesMoveRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AutoscalersDeleteCall struct { + s *Service + project string + zone string + autoscaler string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Move: Moves the specified address resource. +// Delete: Deletes the specified autoscaler. // -// - address: Name of the address resource to move. -// - project: Source project ID which the Address is moved from. -// - region: Name of the region for this request. -func (r *AddressesService) Move(project string, region string, address string, regionaddressesmoverequest *RegionAddressesMoveRequest) *AddressesMoveCall { - c := &AddressesMoveCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - autoscaler: Name of the autoscaler to delete. +// - project: Project ID for this request. +// - zone: Name of the zone for this request. +func (r *AutoscalersService) Delete(project string, zone string, autoscaler string) *AutoscalersDeleteCall { + c := &AutoscalersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region - c.address = address - c.regionaddressesmoverequest = regionaddressesmoverequest + c.zone = zone + c.autoscaler = autoscaler return c } @@ -67609,7 +69469,7 @@ func (r *AddressesService) Move(project string, region string, address string, r // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *AddressesMoveCall) RequestId(requestId string) *AddressesMoveCall { +func (c *AutoscalersDeleteCall) RequestId(requestId string) *AutoscalersDeleteCall { c.urlParams_.Set("requestId", requestId) return c } @@ -67617,7 +69477,7 @@ func (c *AddressesMoveCall) RequestId(requestId string) *AddressesMoveCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AddressesMoveCall) Fields(s ...googleapi.Field) *AddressesMoveCall { +func (c *AutoscalersDeleteCall) Fields(s ...googleapi.Field) *AutoscalersDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -67625,21 +69485,21 @@ func (c *AddressesMoveCall) Fields(s ...googleapi.Field) *AddressesMoveCall { // 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 *AddressesMoveCall) Context(ctx context.Context) *AddressesMoveCall { +func (c *AutoscalersDeleteCall) Context(ctx context.Context) *AutoscalersDeleteCall { 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 *AddressesMoveCall) Header() http.Header { +func (c *AutoscalersDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AddressesMoveCall) doRequest(alt string) (*http.Response, error) { +func (c *AutoscalersDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -67647,36 +69507,31 @@ func (c *AddressesMoveCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionaddressesmoverequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/addresses/{address}/move") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/autoscalers/{autoscaler}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "address": c.address, + "project": c.project, + "zone": c.zone, + "autoscaler": c.autoscaler, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.addresses.move" call. +// Do executes the "compute.autoscalers.delete" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *AddressesMoveCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *AutoscalersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -67707,47 +69562,44 @@ func (c *AddressesMoveCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Moves the specified address resource.", - // "flatPath": "projects/{project}/regions/{region}/addresses/{address}/move", - // "httpMethod": "POST", - // "id": "compute.addresses.move", + // "description": "Deletes the specified autoscaler.", + // "flatPath": "projects/{project}/zones/{zone}/autoscalers/{autoscaler}", + // "httpMethod": "DELETE", + // "id": "compute.autoscalers.delete", // "parameterOrder": [ // "project", - // "region", - // "address" + // "zone", + // "autoscaler" // ], // "parameters": { - // "address": { - // "description": "Name of the address resource to move.", + // "autoscaler": { + // "description": "Name of the autoscaler to delete.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, // "project": { - // "description": "Source project ID which the Address is moved from.", + // "description": "Project ID for this request.", // "location": "path", // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" // }, - // "region": { - // "description": "Name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, // "requestId": { // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" // } // }, - // "path": "projects/{project}/regions/{region}/addresses/{address}/move", - // "request": { - // "$ref": "RegionAddressesMoveRequest" - // }, + // "path": "projects/{project}/zones/{zone}/autoscalers/{autoscaler}", // "response": { // "$ref": "Operation" // }, @@ -67759,113 +69611,103 @@ func (c *AddressesMoveCall) Do(opts ...googleapi.CallOption) (*Operation, error) } -// method id "compute.addresses.setLabels": +// method id "compute.autoscalers.get": -type AddressesSetLabelsCall struct { - s *Service - project string - region string - resource string - regionsetlabelsrequest *RegionSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AutoscalersGetCall struct { + s *Service + project string + zone string + autoscaler string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// SetLabels: Sets the labels on an Address. To learn more about labels, -// read the Labeling Resources documentation. +// Get: Returns the specified autoscaler resource. // +// - autoscaler: Name of the autoscaler to return. // - project: Project ID for this request. -// - region: The region for this request. -// - resource: Name or id of the resource for this request. -func (r *AddressesService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *AddressesSetLabelsCall { - c := &AddressesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - zone: Name of the zone for this request. +func (r *AutoscalersService) Get(project string, zone string, autoscaler string) *AutoscalersGetCall { + c := &AutoscalersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region - c.resource = resource - c.regionsetlabelsrequest = regionsetlabelsrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *AddressesSetLabelsCall) RequestId(requestId string) *AddressesSetLabelsCall { - c.urlParams_.Set("requestId", requestId) + c.zone = zone + c.autoscaler = autoscaler 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 *AddressesSetLabelsCall) Fields(s ...googleapi.Field) *AddressesSetLabelsCall { +func (c *AutoscalersGetCall) Fields(s ...googleapi.Field) *AutoscalersGetCall { 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 *AutoscalersGetCall) IfNoneMatch(entityTag string) *AutoscalersGetCall { + 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 *AddressesSetLabelsCall) Context(ctx context.Context) *AddressesSetLabelsCall { +func (c *AutoscalersGetCall) Context(ctx context.Context) *AutoscalersGetCall { 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 *AddressesSetLabelsCall) Header() http.Header { +func (c *AutoscalersGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AddressesSetLabelsCall) doRequest(alt string) (*http.Response, error) { +func (c *AutoscalersGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionsetlabelsrequest) - 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) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/addresses/{resource}/setLabels") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/autoscalers/{autoscaler}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, + "project": c.project, + "zone": c.zone, + "autoscaler": c.autoscaler, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.addresses.setLabels" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx +// Do executes the "compute.autoscalers.get" call. +// Exactly one of *Autoscaler 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 +// *Autoscaler.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 *AddressesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *AutoscalersGetCall) Do(opts ...googleapi.CallOption) (*Autoscaler, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -67884,7 +69726,7 @@ func (c *AddressesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, e if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Autoscaler{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -67896,90 +69738,96 @@ func (c *AddressesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, e } return ret, nil // { - // "description": "Sets the labels on an Address. To learn more about labels, read the Labeling Resources documentation.", - // "flatPath": "projects/{project}/regions/{region}/addresses/{resource}/setLabels", - // "httpMethod": "POST", - // "id": "compute.addresses.setLabels", + // "description": "Returns the specified autoscaler resource.", + // "flatPath": "projects/{project}/zones/{zone}/autoscalers/{autoscaler}", + // "httpMethod": "GET", + // "id": "compute.autoscalers.get", // "parameterOrder": [ // "project", - // "region", - // "resource" + // "zone", + // "autoscaler" // ], // "parameters": { - // "project": { - // "description": "Project ID for this request.", + // "autoscaler": { + // "description": "Name of the autoscaler to return.", // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, - // "region": { - // "description": "The region for this request.", + // "project": { + // "description": "Project ID for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "resource": { - // "description": "Name or id of the resource for this request.", + // "zone": { + // "description": "Name of the zone for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/regions/{region}/addresses/{resource}/setLabels", - // "request": { - // "$ref": "RegionSetLabelsRequest" - // }, + // "path": "projects/{project}/zones/{zone}/autoscalers/{autoscaler}", // "response": { - // "$ref": "Operation" + // "$ref": "Autoscaler" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.addresses.testIamPermissions": +// method id "compute.autoscalers.insert": -type AddressesTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AutoscalersInsertCall struct { + s *Service + project string + zone string + autoscaler *Autoscaler + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// Insert: Creates an autoscaler in the specified project using the data +// included in the request. // // - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *AddressesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *AddressesTestIamPermissionsCall { - c := &AddressesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - zone: Name of the zone for this request. +func (r *AutoscalersService) Insert(project string, zone string, autoscaler *Autoscaler) *AutoscalersInsertCall { + c := &AutoscalersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest + c.zone = zone + c.autoscaler = autoscaler + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *AutoscalersInsertCall) RequestId(requestId string) *AutoscalersInsertCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AddressesTestIamPermissionsCall) Fields(s ...googleapi.Field) *AddressesTestIamPermissionsCall { +func (c *AutoscalersInsertCall) Fields(s ...googleapi.Field) *AutoscalersInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -67987,21 +69835,21 @@ func (c *AddressesTestIamPermissionsCall) Fields(s ...googleapi.Field) *Addresse // 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 *AddressesTestIamPermissionsCall) Context(ctx context.Context) *AddressesTestIamPermissionsCall { +func (c *AutoscalersInsertCall) Context(ctx context.Context) *AutoscalersInsertCall { 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 *AddressesTestIamPermissionsCall) Header() http.Header { +func (c *AutoscalersInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AddressesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *AutoscalersInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -68009,14 +69857,14 @@ func (c *AddressesTestIamPermissionsCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/addresses/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/autoscalers") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -68024,21 +69872,20 @@ func (c *AddressesTestIamPermissionsCall) doRequest(alt string) (*http.Response, } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, + "project": c.project, + "zone": c.zone, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.addresses.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *AddressesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { +// Do executes the "compute.autoscalers.insert" 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 *AutoscalersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -68057,7 +69904,7 @@ func (c *AddressesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Tes if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestPermissionsResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -68069,14 +69916,13 @@ func (c *AddressesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Tes } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "flatPath": "projects/{project}/regions/{region}/addresses/{resource}/testIamPermissions", + // "description": "Creates an autoscaler in the specified project using the data included in the request.", + // "flatPath": "projects/{project}/zones/{zone}/autoscalers", // "httpMethod": "POST", - // "id": "compute.addresses.testIamPermissions", + // "id": "compute.autoscalers.insert", // "parameterOrder": [ // "project", - // "region", - // "resource" + // "zone" // ], // "parameters": { // "project": { @@ -68086,54 +69932,55 @@ func (c *AddressesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Tes // "required": true, // "type": "string" // }, - // "region": { - // "description": "The name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", // "type": "string" // }, - // "resource": { - // "description": "Name or id of the resource for this request.", + // "zone": { + // "description": "Name of the zone for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/regions/{region}/addresses/{resource}/testIamPermissions", + // "path": "projects/{project}/zones/{zone}/autoscalers", // "request": { - // "$ref": "TestPermissionsRequest" + // "$ref": "Autoscaler" // }, // "response": { - // "$ref": "TestPermissionsResponse" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.autoscalers.aggregatedList": +// method id "compute.autoscalers.list": -type AutoscalersAggregatedListCall struct { +type AutoscalersListCall struct { s *Service project string + zone string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// AggregatedList: Retrieves an aggregated list of autoscalers. +// List: Retrieves a list of autoscalers contained within the specified +// zone. // // - project: Project ID for this request. -func (r *AutoscalersService) AggregatedList(project string) *AutoscalersAggregatedListCall { - c := &AutoscalersAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - zone: Name of the zone for this request. +func (r *AutoscalersService) List(project string, zone string) *AutoscalersListCall { + c := &AutoscalersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project + c.zone = zone return c } @@ -68172,31 +70019,18 @@ func (r *AutoscalersService) AggregatedList(project string) *AutoscalersAggregat // must match the entire field. For example, to filter for instances // that do not end with name "instance", you would use `name ne // .*instance`. -func (c *AutoscalersAggregatedListCall) Filter(filter string) *AutoscalersAggregatedListCall { +func (c *AutoscalersListCall) Filter(filter string) *AutoscalersListCall { c.urlParams_.Set("filter", filter) return c } -// IncludeAllScopes sets the optional parameter "includeAllScopes": -// Indicates whether every visible scope for each scope type (zone, -// region, global) should be included in the response. For new resource -// types added after this field, the flag has no effect as new resource -// types will always include every visible scope for each scope type in -// response. For resource types which predate this field, if this flag -// is omitted or false, only scopes of the scope types where the -// resource type is expected to be found will be included. -func (c *AutoscalersAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *AutoscalersAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - // MaxResults sets the optional parameter "maxResults": The maximum // number of results per page that should be returned. If the number of // available results is larger than `maxResults`, Compute Engine returns // a `nextPageToken` that can be used to get the next page of results in // subsequent list requests. Acceptable values are `0` to `500`, // inclusive. (Default: `500`) -func (c *AutoscalersAggregatedListCall) MaxResults(maxResults int64) *AutoscalersAggregatedListCall { +func (c *AutoscalersListCall) MaxResults(maxResults int64) *AutoscalersListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -68210,7 +70044,7 @@ func (c *AutoscalersAggregatedListCall) MaxResults(maxResults int64) *Autoscaler // result first). Use this to sort resources like operations so that the // newest operation is returned first. Currently, only sorting by `name` // or `creationTimestamp desc` is supported. -func (c *AutoscalersAggregatedListCall) OrderBy(orderBy string) *AutoscalersAggregatedListCall { +func (c *AutoscalersListCall) OrderBy(orderBy string) *AutoscalersListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -68218,7 +70052,7 @@ func (c *AutoscalersAggregatedListCall) OrderBy(orderBy string) *AutoscalersAggr // PageToken sets the optional parameter "pageToken": Specifies a page // token to use. Set `pageToken` to the `nextPageToken` returned by a // previous list request to get the next page of results. -func (c *AutoscalersAggregatedListCall) PageToken(pageToken string) *AutoscalersAggregatedListCall { +func (c *AutoscalersListCall) PageToken(pageToken string) *AutoscalersListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -68227,7 +70061,7 @@ func (c *AutoscalersAggregatedListCall) PageToken(pageToken string) *Autoscalers // "returnPartialSuccess": Opt-in for partial success behavior which // provides partial results in case of failure. The default value is // false. -func (c *AutoscalersAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *AutoscalersAggregatedListCall { +func (c *AutoscalersListCall) ReturnPartialSuccess(returnPartialSuccess bool) *AutoscalersListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -68235,7 +70069,7 @@ func (c *AutoscalersAggregatedListCall) ReturnPartialSuccess(returnPartialSucces // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AutoscalersAggregatedListCall) Fields(s ...googleapi.Field) *AutoscalersAggregatedListCall { +func (c *AutoscalersListCall) Fields(s ...googleapi.Field) *AutoscalersListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -68245,7 +70079,7 @@ func (c *AutoscalersAggregatedListCall) Fields(s ...googleapi.Field) *Autoscaler // 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 *AutoscalersAggregatedListCall) IfNoneMatch(entityTag string) *AutoscalersAggregatedListCall { +func (c *AutoscalersListCall) IfNoneMatch(entityTag string) *AutoscalersListCall { c.ifNoneMatch_ = entityTag return c } @@ -68253,21 +70087,21 @@ func (c *AutoscalersAggregatedListCall) IfNoneMatch(entityTag string) *Autoscale // 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 *AutoscalersAggregatedListCall) Context(ctx context.Context) *AutoscalersAggregatedListCall { +func (c *AutoscalersListCall) Context(ctx context.Context) *AutoscalersListCall { 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 *AutoscalersAggregatedListCall) Header() http.Header { +func (c *AutoscalersListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AutoscalersAggregatedListCall) doRequest(alt string) (*http.Response, error) { +func (c *AutoscalersListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -68280,7 +70114,7 @@ func (c *AutoscalersAggregatedListCall) doRequest(alt string) (*http.Response, e var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/autoscalers") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/autoscalers") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -68289,18 +70123,19 @@ func (c *AutoscalersAggregatedListCall) doRequest(alt string) (*http.Response, e req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, + "zone": c.zone, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.autoscalers.aggregatedList" call. -// Exactly one of *AutoscalerAggregatedList or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *AutoscalerAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "compute.autoscalers.list" call. +// Exactly one of *AutoscalerList or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *AutoscalerList.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 *AutoscalersAggregatedListCall) Do(opts ...googleapi.CallOption) (*AutoscalerAggregatedList, error) { +func (c *AutoscalersListCall) Do(opts ...googleapi.CallOption) (*AutoscalerList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -68319,7 +70154,7 @@ func (c *AutoscalersAggregatedListCall) Do(opts ...googleapi.CallOption) (*Autos if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &AutoscalerAggregatedList{ + ret := &AutoscalerList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -68331,12 +70166,13 @@ func (c *AutoscalersAggregatedListCall) Do(opts ...googleapi.CallOption) (*Autos } return ret, nil // { - // "description": "Retrieves an aggregated list of autoscalers.", - // "flatPath": "projects/{project}/aggregated/autoscalers", + // "description": "Retrieves a list of autoscalers contained within the specified zone.", + // "flatPath": "projects/{project}/zones/{zone}/autoscalers", // "httpMethod": "GET", - // "id": "compute.autoscalers.aggregatedList", + // "id": "compute.autoscalers.list", // "parameterOrder": [ - // "project" + // "project", + // "zone" // ], // "parameters": { // "filter": { @@ -68344,11 +70180,6 @@ func (c *AutoscalersAggregatedListCall) Do(opts ...googleapi.CallOption) (*Autos // "location": "query", // "type": "string" // }, - // "includeAllScopes": { - // "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", - // "location": "query", - // "type": "boolean" - // }, // "maxResults": { // "default": "500", // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", @@ -68378,11 +70209,18 @@ func (c *AutoscalersAggregatedListCall) Do(opts ...googleapi.CallOption) (*Autos // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", // "location": "query", // "type": "boolean" + // }, + // "zone": { + // "description": "Name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" // } // }, - // "path": "projects/{project}/aggregated/autoscalers", + // "path": "projects/{project}/zones/{zone}/autoscalers", // "response": { - // "$ref": "AutoscalerAggregatedList" + // "$ref": "AutoscalerList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -68396,7 +70234,7 @@ func (c *AutoscalersAggregatedListCall) Do(opts ...googleapi.CallOption) (*Autos // 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 *AutoscalersAggregatedListCall) Pages(ctx context.Context, f func(*AutoscalerAggregatedList) error) error { +func (c *AutoscalersListCall) Pages(ctx context.Context, f func(*AutoscalerList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -68414,31 +70252,39 @@ func (c *AutoscalersAggregatedListCall) Pages(ctx context.Context, f func(*Autos } } -// method id "compute.autoscalers.delete": +// method id "compute.autoscalers.patch": -type AutoscalersDeleteCall struct { +type AutoscalersPatchCall struct { s *Service project string zone string - autoscaler string + autoscaler *Autoscaler urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Delete: Deletes the specified autoscaler. +// Patch: Updates an autoscaler in the specified project using the data +// included in the request. This method supports PATCH semantics and +// uses the JSON merge patch format and processing rules. // -// - autoscaler: Name of the autoscaler to delete. // - project: Project ID for this request. // - zone: Name of the zone for this request. -func (r *AutoscalersService) Delete(project string, zone string, autoscaler string) *AutoscalersDeleteCall { - c := &AutoscalersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *AutoscalersService) Patch(project string, zone string, autoscaler *Autoscaler) *AutoscalersPatchCall { + c := &AutoscalersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.autoscaler = autoscaler return c } +// Autoscaler sets the optional parameter "autoscaler": Name of the +// autoscaler to patch. +func (c *AutoscalersPatchCall) Autoscaler(autoscaler string) *AutoscalersPatchCall { + c.urlParams_.Set("autoscaler", autoscaler) + return c +} + // RequestId sets the optional parameter "requestId": An optional // request ID to identify requests. Specify a unique request ID so that // if you must retry your request, the server will know to ignore the @@ -68450,7 +70296,7 @@ func (r *AutoscalersService) Delete(project string, zone string, autoscaler stri // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *AutoscalersDeleteCall) RequestId(requestId string) *AutoscalersDeleteCall { +func (c *AutoscalersPatchCall) RequestId(requestId string) *AutoscalersPatchCall { c.urlParams_.Set("requestId", requestId) return c } @@ -68458,7 +70304,7 @@ func (c *AutoscalersDeleteCall) RequestId(requestId string) *AutoscalersDeleteCa // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AutoscalersDeleteCall) Fields(s ...googleapi.Field) *AutoscalersDeleteCall { +func (c *AutoscalersPatchCall) Fields(s ...googleapi.Field) *AutoscalersPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -68466,21 +70312,21 @@ func (c *AutoscalersDeleteCall) Fields(s ...googleapi.Field) *AutoscalersDeleteC // 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 *AutoscalersDeleteCall) Context(ctx context.Context) *AutoscalersDeleteCall { +func (c *AutoscalersPatchCall) Context(ctx context.Context) *AutoscalersPatchCall { 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 *AutoscalersDeleteCall) Header() http.Header { +func (c *AutoscalersPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AutoscalersDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *AutoscalersPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -68488,31 +70334,35 @@ func (c *AutoscalersDeleteCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/autoscalers/{autoscaler}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/autoscalers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "autoscaler": c.autoscaler, + "project": c.project, + "zone": c.zone, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.autoscalers.delete" call. +// Do executes the "compute.autoscalers.patch" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *AutoscalersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *AutoscalersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -68543,21 +70393,19 @@ func (c *AutoscalersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Deletes the specified autoscaler.", - // "flatPath": "projects/{project}/zones/{zone}/autoscalers/{autoscaler}", - // "httpMethod": "DELETE", - // "id": "compute.autoscalers.delete", + // "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "flatPath": "projects/{project}/zones/{zone}/autoscalers", + // "httpMethod": "PATCH", + // "id": "compute.autoscalers.patch", // "parameterOrder": [ // "project", - // "zone", - // "autoscaler" + // "zone" // ], // "parameters": { // "autoscaler": { - // "description": "Name of the autoscaler to delete.", - // "location": "path", + // "description": "Name of the autoscaler to patch.", + // "location": "query", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, // "type": "string" // }, // "project": { @@ -68580,7 +70428,10 @@ func (c *AutoscalersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, er // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/autoscalers/{autoscaler}", + // "path": "projects/{project}/zones/{zone}/autoscalers", + // "request": { + // "$ref": "Autoscaler" + // }, // "response": { // "$ref": "Operation" // }, @@ -68592,103 +70443,97 @@ func (c *AutoscalersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, er } -// method id "compute.autoscalers.get": +// method id "compute.autoscalers.testIamPermissions": -type AutoscalersGetCall struct { - s *Service - project string - zone string - autoscaler string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type AutoscalersTestIamPermissionsCall struct { + s *Service + project string + zone string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified autoscaler resource. +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. // -// - autoscaler: Name of the autoscaler to return. // - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *AutoscalersService) Get(project string, zone string, autoscaler string) *AutoscalersGetCall { - c := &AutoscalersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - resource: Name or id of the resource for this request. +// - zone: The name of the zone for this request. +func (r *AutoscalersService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *AutoscalersTestIamPermissionsCall { + c := &AutoscalersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.autoscaler = autoscaler + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest 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 *AutoscalersGetCall) Fields(s ...googleapi.Field) *AutoscalersGetCall { +func (c *AutoscalersTestIamPermissionsCall) Fields(s ...googleapi.Field) *AutoscalersTestIamPermissionsCall { 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 *AutoscalersGetCall) IfNoneMatch(entityTag string) *AutoscalersGetCall { - 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 *AutoscalersGetCall) Context(ctx context.Context) *AutoscalersGetCall { +func (c *AutoscalersTestIamPermissionsCall) Context(ctx context.Context) *AutoscalersTestIamPermissionsCall { 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 *AutoscalersGetCall) Header() http.Header { +func (c *AutoscalersTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AutoscalersGetCall) doRequest(alt string) (*http.Response, error) { +func (c *AutoscalersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/autoscalers/{autoscaler}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/autoscalers/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "autoscaler": c.autoscaler, + "project": c.project, + "zone": c.zone, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.autoscalers.get" call. -// Exactly one of *Autoscaler or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Autoscaler.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 *AutoscalersGetCall) Do(opts ...googleapi.CallOption) (*Autoscaler, error) { +// Do executes the "compute.autoscalers.testIamPermissions" call. +// Exactly one of *TestPermissionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.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 *AutoscalersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -68707,7 +70552,7 @@ func (c *AutoscalersGetCall) Do(opts ...googleapi.CallOption) (*Autoscaler, erro if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Autoscaler{ + ret := &TestPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -68719,41 +70564,44 @@ func (c *AutoscalersGetCall) Do(opts ...googleapi.CallOption) (*Autoscaler, erro } return ret, nil // { - // "description": "Returns the specified autoscaler resource.", - // "flatPath": "projects/{project}/zones/{zone}/autoscalers/{autoscaler}", - // "httpMethod": "GET", - // "id": "compute.autoscalers.get", + // "description": "Returns permissions that a caller has on the specified resource.", + // "flatPath": "projects/{project}/zones/{zone}/autoscalers/{resource}/testIamPermissions", + // "httpMethod": "POST", + // "id": "compute.autoscalers.testIamPermissions", // "parameterOrder": [ // "project", // "zone", - // "autoscaler" + // "resource" // ], // "parameters": { - // "autoscaler": { - // "description": "Name of the autoscaler to return.", + // "project": { + // "description": "Project ID for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" // }, - // "project": { - // "description": "Project ID for this request.", + // "resource": { + // "description": "Name or id of the resource for this request.", // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, // "zone": { - // "description": "Name of the zone for this request.", + // "description": "The name of the zone for this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/autoscalers/{autoscaler}", + // "path": "projects/{project}/zones/{zone}/autoscalers/{resource}/testIamPermissions", + // "request": { + // "$ref": "TestPermissionsRequest" + // }, // "response": { - // "$ref": "Autoscaler" + // "$ref": "TestPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -68764,9 +70612,9 @@ func (c *AutoscalersGetCall) Do(opts ...googleapi.CallOption) (*Autoscaler, erro } -// method id "compute.autoscalers.insert": +// method id "compute.autoscalers.update": -type AutoscalersInsertCall struct { +type AutoscalersUpdateCall struct { s *Service project string zone string @@ -68776,19 +70624,26 @@ type AutoscalersInsertCall struct { header_ http.Header } -// Insert: Creates an autoscaler in the specified project using the data +// Update: Updates an autoscaler in the specified project using the data // included in the request. // // - project: Project ID for this request. // - zone: Name of the zone for this request. -func (r *AutoscalersService) Insert(project string, zone string, autoscaler *Autoscaler) *AutoscalersInsertCall { - c := &AutoscalersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *AutoscalersService) Update(project string, zone string, autoscaler *Autoscaler) *AutoscalersUpdateCall { + c := &AutoscalersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.autoscaler = autoscaler return c } +// Autoscaler sets the optional parameter "autoscaler": Name of the +// autoscaler to update. +func (c *AutoscalersUpdateCall) Autoscaler(autoscaler string) *AutoscalersUpdateCall { + c.urlParams_.Set("autoscaler", autoscaler) + return c +} + // RequestId sets the optional parameter "requestId": An optional // request ID to identify requests. Specify a unique request ID so that // if you must retry your request, the server will know to ignore the @@ -68800,7 +70655,7 @@ func (r *AutoscalersService) Insert(project string, zone string, autoscaler *Aut // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *AutoscalersInsertCall) RequestId(requestId string) *AutoscalersInsertCall { +func (c *AutoscalersUpdateCall) RequestId(requestId string) *AutoscalersUpdateCall { c.urlParams_.Set("requestId", requestId) return c } @@ -68808,7 +70663,7 @@ func (c *AutoscalersInsertCall) RequestId(requestId string) *AutoscalersInsertCa // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AutoscalersInsertCall) Fields(s ...googleapi.Field) *AutoscalersInsertCall { +func (c *AutoscalersUpdateCall) Fields(s ...googleapi.Field) *AutoscalersUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -68816,21 +70671,21 @@ func (c *AutoscalersInsertCall) Fields(s ...googleapi.Field) *AutoscalersInsertC // 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 *AutoscalersInsertCall) Context(ctx context.Context) *AutoscalersInsertCall { +func (c *AutoscalersUpdateCall) Context(ctx context.Context) *AutoscalersUpdateCall { 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 *AutoscalersInsertCall) Header() http.Header { +func (c *AutoscalersUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AutoscalersInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *AutoscalersUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -68847,7 +70702,7 @@ func (c *AutoscalersInsertCall) doRequest(alt string) (*http.Response, error) { c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/autoscalers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PUT", urls, body) if err != nil { return nil, err } @@ -68859,14 +70714,14 @@ func (c *AutoscalersInsertCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.autoscalers.insert" call. +// Do executes the "compute.autoscalers.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 *AutoscalersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *AutoscalersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -68897,15 +70752,21 @@ func (c *AutoscalersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Creates an autoscaler in the specified project using the data included in the request.", + // "description": "Updates an autoscaler in the specified project using the data included in the request.", // "flatPath": "projects/{project}/zones/{zone}/autoscalers", - // "httpMethod": "POST", - // "id": "compute.autoscalers.insert", + // "httpMethod": "PUT", + // "id": "compute.autoscalers.update", // "parameterOrder": [ // "project", // "zone" // ], // "parameters": { + // "autoscaler": { + // "description": "Name of the autoscaler to update.", + // "location": "query", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "type": "string" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -68941,182 +70802,110 @@ func (c *AutoscalersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, er } -// method id "compute.autoscalers.list": +// method id "compute.backendBuckets.addSignedUrlKey": -type AutoscalersListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type BackendBucketsAddSignedUrlKeyCall struct { + s *Service + project string + backendBucket string + signedurlkey *SignedUrlKey + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Retrieves a list of autoscalers contained within the specified -// zone. +// AddSignedUrlKey: Adds a key for validating requests with signed URLs +// for this backend bucket. // -// - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *AutoscalersService) List(project string, zone string) *AutoscalersListCall { - c := &AutoscalersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - backendBucket: Name of the BackendBucket resource to which the +// Signed URL Key should be added. The name should conform to RFC1035. +// - project: Project ID for this request. +func (r *BackendBucketsService) AddSignedUrlKey(project string, backendBucket string, signedurlkey *SignedUrlKey) *BackendBucketsAddSignedUrlKeyCall { + c := &BackendBucketsAddSignedUrlKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources -// support two types of filter expressions: expressions that support -// regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a -// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` -// or `:`. For example, if you are filtering Compute Engine instances, -// you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` -// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") -// ``` By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") -// AND (scheduling.automaticRestart = true) ``` If you want to use a -// regular expression, use the `eq` (equal) or `ne` (not equal) operator -// against a single un-parenthesized expression with or without quotes -// or against multiple parenthesized expressions. Examples: `fieldname -// eq unquoted literal` `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" `(fieldname1 eq literal) -// (fieldname2 ne "literal")` The literal value is interpreted as a -// regular expression using Google RE2 library syntax. The literal value -// must match the entire field. For example, to filter for instances -// that do not end with name "instance", you would use `name ne -// .*instance`. -func (c *AutoscalersListCall) Filter(filter string) *AutoscalersListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than `maxResults`, Compute Engine returns -// a `nextPageToken` that can be used to get the next page of results in -// subsequent list requests. Acceptable values are `0` to `500`, -// inclusive. (Default: `500`) -func (c *AutoscalersListCall) MaxResults(maxResults int64) *AutoscalersListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. You can also sort results in -// descending order based on the creation timestamp using -// `orderBy="creationTimestamp desc". This sorts results based on the -// `creationTimestamp` field in reverse chronological order (newest -// result first). Use this to sort resources like operations so that the -// newest operation is returned first. Currently, only sorting by `name` -// or `creationTimestamp desc` is supported. -func (c *AutoscalersListCall) OrderBy(orderBy string) *AutoscalersListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set `pageToken` to the `nextPageToken` returned by a -// previous list request to get the next page of results. -func (c *AutoscalersListCall) PageToken(pageToken string) *AutoscalersListCall { - c.urlParams_.Set("pageToken", pageToken) + c.backendBucket = backendBucket + c.signedurlkey = signedurlkey return c } -// ReturnPartialSuccess sets the optional parameter -// "returnPartialSuccess": Opt-in for partial success behavior which -// provides partial results in case of failure. The default value is -// false. -func (c *AutoscalersListCall) ReturnPartialSuccess(returnPartialSuccess bool) *AutoscalersListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *BackendBucketsAddSignedUrlKeyCall) RequestId(requestId string) *BackendBucketsAddSignedUrlKeyCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AutoscalersListCall) Fields(s ...googleapi.Field) *AutoscalersListCall { +func (c *BackendBucketsAddSignedUrlKeyCall) Fields(s ...googleapi.Field) *BackendBucketsAddSignedUrlKeyCall { 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 *AutoscalersListCall) IfNoneMatch(entityTag string) *AutoscalersListCall { - 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 *AutoscalersListCall) Context(ctx context.Context) *AutoscalersListCall { +func (c *BackendBucketsAddSignedUrlKeyCall) Context(ctx context.Context) *BackendBucketsAddSignedUrlKeyCall { 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 *AutoscalersListCall) Header() http.Header { +func (c *BackendBucketsAddSignedUrlKeyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AutoscalersListCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendBucketsAddSignedUrlKeyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.signedurlkey) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/autoscalers") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{backendBucket}/addSignedUrlKey") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, + "project": c.project, + "backendBucket": c.backendBucket, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.autoscalers.list" call. -// Exactly one of *AutoscalerList or error will be non-nil. Any non-2xx +// Do executes the "compute.backendBuckets.addSignedUrlKey" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either -// *AutoscalerList.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 *AutoscalersListCall) Do(opts ...googleapi.CallOption) (*AutoscalerList, error) { +// *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 *BackendBucketsAddSignedUrlKeyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -69135,7 +70924,7 @@ func (c *AutoscalersListCall) Do(opts ...googleapi.CallOption) (*AutoscalerList, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &AutoscalerList{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -69147,36 +70936,19 @@ func (c *AutoscalersListCall) Do(opts ...googleapi.CallOption) (*AutoscalerList, } return ret, nil // { - // "description": "Retrieves a list of autoscalers contained within the specified zone.", - // "flatPath": "projects/{project}/zones/{zone}/autoscalers", - // "httpMethod": "GET", - // "id": "compute.autoscalers.list", + // "description": "Adds a key for validating requests with signed URLs for this backend bucket.", + // "flatPath": "projects/{project}/global/backendBuckets/{backendBucket}/addSignedUrlKey", + // "httpMethod": "POST", + // "id": "compute.backendBuckets.addSignedUrlKey", // "parameterOrder": [ // "project", - // "zone" + // "backendBucket" // ], // "parameters": { - // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", - // "location": "query", + // "backendBucket": { + // "description": "Name of the BackendBucket resource to which the Signed URL Key should be added. The name should conform to RFC1035.", + // "location": "path", + // "required": true, // "type": "string" // }, // "project": { @@ -69186,83 +70958,46 @@ func (c *AutoscalersListCall) Do(opts ...googleapi.CallOption) (*AutoscalerList, // "required": true, // "type": "string" // }, - // "returnPartialSuccess": { - // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", - // "type": "boolean" - // }, - // "zone": { - // "description": "Name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/autoscalers", + // "path": "projects/{project}/global/backendBuckets/{backendBucket}/addSignedUrlKey", + // "request": { + // "$ref": "SignedUrlKey" + // }, // "response": { - // "$ref": "AutoscalerList" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// 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 *AutoscalersListCall) Pages(ctx context.Context, f func(*AutoscalerList) 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 "compute.autoscalers.patch": +// method id "compute.backendBuckets.delete": -type AutoscalersPatchCall struct { - s *Service - project string - zone string - autoscaler *Autoscaler - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type BackendBucketsDeleteCall struct { + s *Service + project string + backendBucket string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates an autoscaler in the specified project using the data -// included in the request. This method supports PATCH semantics and -// uses the JSON merge patch format and processing rules. +// Delete: Deletes the specified BackendBucket resource. // +// - backendBucket: Name of the BackendBucket resource to delete. // - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *AutoscalersService) Patch(project string, zone string, autoscaler *Autoscaler) *AutoscalersPatchCall { - c := &AutoscalersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *BackendBucketsService) Delete(project string, backendBucket string) *BackendBucketsDeleteCall { + c := &BackendBucketsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.autoscaler = autoscaler - return c -} - -// Autoscaler sets the optional parameter "autoscaler": Name of the -// autoscaler to patch. -func (c *AutoscalersPatchCall) Autoscaler(autoscaler string) *AutoscalersPatchCall { - c.urlParams_.Set("autoscaler", autoscaler) + c.backendBucket = backendBucket return c } @@ -69277,7 +71012,7 @@ func (c *AutoscalersPatchCall) Autoscaler(autoscaler string) *AutoscalersPatchCa // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *AutoscalersPatchCall) RequestId(requestId string) *AutoscalersPatchCall { +func (c *BackendBucketsDeleteCall) RequestId(requestId string) *BackendBucketsDeleteCall { c.urlParams_.Set("requestId", requestId) return c } @@ -69285,7 +71020,7 @@ func (c *AutoscalersPatchCall) RequestId(requestId string) *AutoscalersPatchCall // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AutoscalersPatchCall) Fields(s ...googleapi.Field) *AutoscalersPatchCall { +func (c *BackendBucketsDeleteCall) Fields(s ...googleapi.Field) *BackendBucketsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -69293,21 +71028,21 @@ func (c *AutoscalersPatchCall) Fields(s ...googleapi.Field) *AutoscalersPatchCal // 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 *AutoscalersPatchCall) Context(ctx context.Context) *AutoscalersPatchCall { +func (c *BackendBucketsDeleteCall) Context(ctx context.Context) *BackendBucketsDeleteCall { 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 *AutoscalersPatchCall) Header() http.Header { +func (c *BackendBucketsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AutoscalersPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendBucketsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -69315,35 +71050,30 @@ func (c *AutoscalersPatchCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/autoscalers") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{backendBucket}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, + "project": c.project, + "backendBucket": c.backendBucket, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.autoscalers.patch" call. +// Do executes the "compute.backendBuckets.delete" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *AutoscalersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *BackendBucketsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -69374,19 +71104,20 @@ func (c *AutoscalersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, err } return ret, nil // { - // "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "flatPath": "projects/{project}/zones/{zone}/autoscalers", - // "httpMethod": "PATCH", - // "id": "compute.autoscalers.patch", + // "description": "Deletes the specified BackendBucket resource.", + // "flatPath": "projects/{project}/global/backendBuckets/{backendBucket}", + // "httpMethod": "DELETE", + // "id": "compute.backendBuckets.delete", // "parameterOrder": [ // "project", - // "zone" + // "backendBucket" // ], // "parameters": { - // "autoscaler": { - // "description": "Name of the autoscaler to patch.", - // "location": "query", + // "backendBucket": { + // "description": "Name of the BackendBucket resource to delete.", + // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, // "type": "string" // }, // "project": { @@ -69400,19 +71131,9 @@ func (c *AutoscalersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, err // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/autoscalers", - // "request": { - // "$ref": "Autoscaler" - // }, + // "path": "projects/{project}/global/backendBuckets/{backendBucket}", // "response": { // "$ref": "Operation" // }, @@ -69424,38 +71145,52 @@ func (c *AutoscalersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, err } -// method id "compute.autoscalers.testIamPermissions": +// method id "compute.backendBuckets.deleteSignedUrlKey": -type AutoscalersTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type BackendBucketsDeleteSignedUrlKeyCall struct { + s *Service + project string + backendBucket string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// DeleteSignedUrlKey: Deletes a key for validating requests with signed +// URLs for this backend bucket. // -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *AutoscalersService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *AutoscalersTestIamPermissionsCall { - c := &AutoscalersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - backendBucket: Name of the BackendBucket resource to which the +// Signed URL Key should be added. The name should conform to RFC1035. +// - keyName: The name of the Signed URL Key to delete. +// - project: Project ID for this request. +func (r *BackendBucketsService) DeleteSignedUrlKey(project string, backendBucket string, keyName string) *BackendBucketsDeleteSignedUrlKeyCall { + c := &BackendBucketsDeleteSignedUrlKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest + c.backendBucket = backendBucket + c.urlParams_.Set("keyName", keyName) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *BackendBucketsDeleteSignedUrlKeyCall) RequestId(requestId string) *BackendBucketsDeleteSignedUrlKeyCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AutoscalersTestIamPermissionsCall) Fields(s ...googleapi.Field) *AutoscalersTestIamPermissionsCall { +func (c *BackendBucketsDeleteSignedUrlKeyCall) Fields(s ...googleapi.Field) *BackendBucketsDeleteSignedUrlKeyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -69463,21 +71198,21 @@ func (c *AutoscalersTestIamPermissionsCall) Fields(s ...googleapi.Field) *Autosc // 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 *AutoscalersTestIamPermissionsCall) Context(ctx context.Context) *AutoscalersTestIamPermissionsCall { +func (c *BackendBucketsDeleteSignedUrlKeyCall) Context(ctx context.Context) *BackendBucketsDeleteSignedUrlKeyCall { 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 *AutoscalersTestIamPermissionsCall) Header() http.Header { +func (c *BackendBucketsDeleteSignedUrlKeyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AutoscalersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendBucketsDeleteSignedUrlKeyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -69485,14 +71220,9 @@ func (c *AutoscalersTestIamPermissionsCall) doRequest(alt string) (*http.Respons } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/autoscalers/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{backendBucket}/deleteSignedUrlKey") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -69500,21 +71230,20 @@ func (c *AutoscalersTestIamPermissionsCall) doRequest(alt string) (*http.Respons } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, + "project": c.project, + "backendBucket": c.backendBucket, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.autoscalers.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *AutoscalersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { +// Do executes the "compute.backendBuckets.deleteSignedUrlKey" 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 *BackendBucketsDeleteSignedUrlKeyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -69533,7 +71262,7 @@ func (c *AutoscalersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*T if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestPermissionsResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -69545,164 +71274,146 @@ func (c *AutoscalersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*T } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "flatPath": "projects/{project}/zones/{zone}/autoscalers/{resource}/testIamPermissions", + // "description": "Deletes a key for validating requests with signed URLs for this backend bucket.", + // "flatPath": "projects/{project}/global/backendBuckets/{backendBucket}/deleteSignedUrlKey", // "httpMethod": "POST", - // "id": "compute.autoscalers.testIamPermissions", + // "id": "compute.backendBuckets.deleteSignedUrlKey", // "parameterOrder": [ // "project", - // "zone", - // "resource" + // "backendBucket", + // "keyName" // ], // "parameters": { - // "project": { - // "description": "Project ID for this request.", + // "backendBucket": { + // "description": "Name of the BackendBucket resource to which the Signed URL Key should be added. The name should conform to RFC1035.", // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" // }, - // "resource": { - // "description": "Name or id of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "keyName": { + // "description": "The name of the Signed URL Key to delete.", + // "location": "query", // "required": true, // "type": "string" // }, - // "zone": { - // "description": "The name of the zone for this request.", + // "project": { + // "description": "Project ID for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/autoscalers/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, + // "path": "projects/{project}/global/backendBuckets/{backendBucket}/deleteSignedUrlKey", // "response": { - // "$ref": "TestPermissionsResponse" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.autoscalers.update": +// method id "compute.backendBuckets.get": -type AutoscalersUpdateCall struct { - s *Service - project string - zone string - autoscaler *Autoscaler - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type BackendBucketsGetCall struct { + s *Service + project string + backendBucket string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Update: Updates an autoscaler in the specified project using the data -// included in the request. +// Get: Returns the specified BackendBucket resource. // +// - backendBucket: Name of the BackendBucket resource to return. // - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *AutoscalersService) Update(project string, zone string, autoscaler *Autoscaler) *AutoscalersUpdateCall { - c := &AutoscalersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *BackendBucketsService) Get(project string, backendBucket string) *BackendBucketsGetCall { + c := &BackendBucketsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.autoscaler = autoscaler - return c -} - -// Autoscaler sets the optional parameter "autoscaler": Name of the -// autoscaler to update. -func (c *AutoscalersUpdateCall) Autoscaler(autoscaler string) *AutoscalersUpdateCall { - c.urlParams_.Set("autoscaler", autoscaler) - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *AutoscalersUpdateCall) RequestId(requestId string) *AutoscalersUpdateCall { - c.urlParams_.Set("requestId", requestId) + c.backendBucket = backendBucket 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 *AutoscalersUpdateCall) Fields(s ...googleapi.Field) *AutoscalersUpdateCall { +func (c *BackendBucketsGetCall) Fields(s ...googleapi.Field) *BackendBucketsGetCall { 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 *BackendBucketsGetCall) IfNoneMatch(entityTag string) *BackendBucketsGetCall { + 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 *AutoscalersUpdateCall) Context(ctx context.Context) *AutoscalersUpdateCall { +func (c *BackendBucketsGetCall) Context(ctx context.Context) *BackendBucketsGetCall { 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 *AutoscalersUpdateCall) Header() http.Header { +func (c *BackendBucketsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AutoscalersUpdateCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendBucketsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler) - 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) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/autoscalers") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{backendBucket}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, + "project": c.project, + "backendBucket": c.backendBucket, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.autoscalers.update" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx +// Do executes the "compute.backendBuckets.get" call. +// Exactly one of *BackendBucket 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 *AutoscalersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *BackendBucket.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 *BackendBucketsGetCall) Do(opts ...googleapi.CallOption) (*BackendBucket, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -69721,7 +71432,7 @@ func (c *AutoscalersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, er if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &BackendBucket{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -69733,19 +71444,20 @@ func (c *AutoscalersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Updates an autoscaler in the specified project using the data included in the request.", - // "flatPath": "projects/{project}/zones/{zone}/autoscalers", - // "httpMethod": "PUT", - // "id": "compute.autoscalers.update", + // "description": "Returns the specified BackendBucket resource.", + // "flatPath": "projects/{project}/global/backendBuckets/{backendBucket}", + // "httpMethod": "GET", + // "id": "compute.backendBuckets.get", // "parameterOrder": [ // "project", - // "zone" + // "backendBucket" // ], // "parameters": { - // "autoscaler": { - // "description": "Name of the autoscaler to update.", - // "location": "query", + // "backendBucket": { + // "description": "Name of the BackendBucket resource to return.", + // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, // "type": "string" // }, // "project": { @@ -69754,139 +71466,122 @@ func (c *AutoscalersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, er // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "Name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/autoscalers", - // "request": { - // "$ref": "Autoscaler" - // }, + // "path": "projects/{project}/global/backendBuckets/{backendBucket}", // "response": { - // "$ref": "Operation" + // "$ref": "BackendBucket" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.backendBuckets.addSignedUrlKey": +// method id "compute.backendBuckets.getIamPolicy": -type BackendBucketsAddSignedUrlKeyCall struct { - s *Service - project string - backendBucket string - signedurlkey *SignedUrlKey - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type BackendBucketsGetIamPolicyCall struct { + s *Service + project string + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// AddSignedUrlKey: Adds a key for validating requests with signed URLs -// for this backend bucket. +// GetIamPolicy: Gets the access control policy for a resource. May be +// empty if no such policy or resource exists. // -// - backendBucket: Name of the BackendBucket resource to which the -// Signed URL Key should be added. The name should conform to RFC1035. -// - project: Project ID for this request. -func (r *BackendBucketsService) AddSignedUrlKey(project string, backendBucket string, signedurlkey *SignedUrlKey) *BackendBucketsAddSignedUrlKeyCall { - c := &BackendBucketsAddSignedUrlKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - resource: Name or id of the resource for this request. +func (r *BackendBucketsService) GetIamPolicy(project string, resource string) *BackendBucketsGetIamPolicyCall { + c := &BackendBucketsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.backendBucket = backendBucket - c.signedurlkey = signedurlkey + c.resource = resource return c } -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *BackendBucketsAddSignedUrlKeyCall) RequestId(requestId string) *BackendBucketsAddSignedUrlKeyCall { - c.urlParams_.Set("requestId", requestId) +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *BackendBucketsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *BackendBucketsGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BackendBucketsAddSignedUrlKeyCall) Fields(s ...googleapi.Field) *BackendBucketsAddSignedUrlKeyCall { +func (c *BackendBucketsGetIamPolicyCall) Fields(s ...googleapi.Field) *BackendBucketsGetIamPolicyCall { 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 *BackendBucketsGetIamPolicyCall) IfNoneMatch(entityTag string) *BackendBucketsGetIamPolicyCall { + 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 *BackendBucketsAddSignedUrlKeyCall) Context(ctx context.Context) *BackendBucketsAddSignedUrlKeyCall { +func (c *BackendBucketsGetIamPolicyCall) Context(ctx context.Context) *BackendBucketsGetIamPolicyCall { 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 *BackendBucketsAddSignedUrlKeyCall) Header() http.Header { +func (c *BackendBucketsGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendBucketsAddSignedUrlKeyCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendBucketsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.signedurlkey) - 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) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{backendBucket}/addSignedUrlKey") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{resource}/getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendBucket": c.backendBucket, + "project": c.project, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendBuckets.addSignedUrlKey" 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 *BackendBucketsAddSignedUrlKeyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.backendBuckets.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *BackendBucketsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -69905,7 +71600,7 @@ func (c *BackendBucketsAddSignedUrlKeyCall) Do(opts ...googleapi.CallOption) (*O if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -69917,20 +71612,20 @@ func (c *BackendBucketsAddSignedUrlKeyCall) Do(opts ...googleapi.CallOption) (*O } return ret, nil // { - // "description": "Adds a key for validating requests with signed URLs for this backend bucket.", - // "flatPath": "projects/{project}/global/backendBuckets/{backendBucket}/addSignedUrlKey", - // "httpMethod": "POST", - // "id": "compute.backendBuckets.addSignedUrlKey", + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "flatPath": "projects/{project}/global/backendBuckets/{resource}/getIamPolicy", + // "httpMethod": "GET", + // "id": "compute.backendBuckets.getIamPolicy", // "parameterOrder": [ // "project", - // "backendBucket" + // "resource" // ], // "parameters": { - // "backendBucket": { - // "description": "Name of the BackendBucket resource to which the Signed URL Key should be added. The name should conform to RFC1035.", - // "location": "path", - // "required": true, - // "type": "string" + // "optionsRequestedPolicyVersion": { + // "description": "Requested IAM Policy version.", + // "format": "int32", + // "location": "query", + // "type": "integer" // }, // "project": { // "description": "Project ID for this request.", @@ -69939,46 +71634,46 @@ func (c *BackendBucketsAddSignedUrlKeyCall) Do(opts ...googleapi.CallOption) (*O // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/global/backendBuckets/{backendBucket}/addSignedUrlKey", - // "request": { - // "$ref": "SignedUrlKey" - // }, + // "path": "projects/{project}/global/backendBuckets/{resource}/getIamPolicy", // "response": { - // "$ref": "Operation" + // "$ref": "Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.backendBuckets.delete": +// method id "compute.backendBuckets.insert": -type BackendBucketsDeleteCall struct { +type BackendBucketsInsertCall struct { s *Service project string - backendBucket string + backendbucket *BackendBucket urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Delete: Deletes the specified BackendBucket resource. +// Insert: Creates a BackendBucket resource in the specified project +// using the data included in the request. // -// - backendBucket: Name of the BackendBucket resource to delete. // - project: Project ID for this request. -func (r *BackendBucketsService) Delete(project string, backendBucket string) *BackendBucketsDeleteCall { - c := &BackendBucketsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *BackendBucketsService) Insert(project string, backendbucket *BackendBucket) *BackendBucketsInsertCall { + c := &BackendBucketsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.backendBucket = backendBucket + c.backendbucket = backendbucket return c } @@ -69993,7 +71688,7 @@ func (r *BackendBucketsService) Delete(project string, backendBucket string) *Ba // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *BackendBucketsDeleteCall) RequestId(requestId string) *BackendBucketsDeleteCall { +func (c *BackendBucketsInsertCall) RequestId(requestId string) *BackendBucketsInsertCall { c.urlParams_.Set("requestId", requestId) return c } @@ -70001,7 +71696,7 @@ func (c *BackendBucketsDeleteCall) RequestId(requestId string) *BackendBucketsDe // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BackendBucketsDeleteCall) Fields(s ...googleapi.Field) *BackendBucketsDeleteCall { +func (c *BackendBucketsInsertCall) Fields(s ...googleapi.Field) *BackendBucketsInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -70009,21 +71704,21 @@ func (c *BackendBucketsDeleteCall) Fields(s ...googleapi.Field) *BackendBucketsD // 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 *BackendBucketsDeleteCall) Context(ctx context.Context) *BackendBucketsDeleteCall { +func (c *BackendBucketsInsertCall) Context(ctx context.Context) *BackendBucketsInsertCall { 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 *BackendBucketsDeleteCall) Header() http.Header { +func (c *BackendBucketsInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendBucketsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendBucketsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -70031,30 +71726,34 @@ func (c *BackendBucketsDeleteCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendbucket) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{backendBucket}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendBucket": c.backendBucket, + "project": c.project, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendBuckets.delete" call. +// Do executes the "compute.backendBuckets.insert" 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 *BackendBucketsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *BackendBucketsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -70085,22 +71784,14 @@ func (c *BackendBucketsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Deletes the specified BackendBucket resource.", - // "flatPath": "projects/{project}/global/backendBuckets/{backendBucket}", - // "httpMethod": "DELETE", - // "id": "compute.backendBuckets.delete", + // "description": "Creates a BackendBucket resource in the specified project using the data included in the request.", + // "flatPath": "projects/{project}/global/backendBuckets", + // "httpMethod": "POST", + // "id": "compute.backendBuckets.insert", // "parameterOrder": [ - // "project", - // "backendBucket" + // "project" // ], // "parameters": { - // "backendBucket": { - // "description": "Name of the BackendBucket resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" - // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -70114,7 +71805,10 @@ func (c *BackendBucketsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, // "type": "string" // } // }, - // "path": "projects/{project}/global/backendBuckets/{backendBucket}", + // "path": "projects/{project}/global/backendBuckets", + // "request": { + // "$ref": "BackendBucket" + // }, // "response": { // "$ref": "Operation" // }, @@ -70126,105 +71820,178 @@ func (c *BackendBucketsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, } -// method id "compute.backendBuckets.deleteSignedUrlKey": +// method id "compute.backendBuckets.list": + +type BackendBucketsListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieves the list of BackendBucket resources available to the +// specified project. +// +// - project: Project ID for this request. +func (r *BackendBucketsService) List(project string) *BackendBucketsListCall { + c := &BackendBucketsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources +// support two types of filter expressions: expressions that support +// regular expressions and expressions that follow API improvement +// proposal AIP-160. If you want to use AIP-160, your expression must +// specify the field name, an operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` +// or `:`. For example, if you are filtering Compute Engine instances, +// you can exclude instances named `example-instance` by specifying +// `name != example-instance`. The `:` operator can be used with string +// fields to match substrings. For non-string fields it is equivalent to +// the `=` operator. The `:*` comparison can be used to test whether a +// key has been defined. For example, to find all objects with `owner` +// label use: ``` labels.owner:* ``` You can also filter nested fields. +// For example, you could specify `scheduling.automaticRestart = false` +// to include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` If you want to use a +// regular expression, use the `eq` (equal) or `ne` (not equal) operator +// against a single un-parenthesized expression with or without quotes +// or against multiple parenthesized expressions. Examples: `fieldname +// eq unquoted literal` `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" `(fieldname1 eq literal) +// (fieldname2 ne "literal")` The literal value is interpreted as a +// regular expression using Google RE2 library syntax. The literal value +// must match the entire field. For example, to filter for instances +// that do not end with name "instance", you would use `name ne +// .*instance`. +func (c *BackendBucketsListCall) Filter(filter string) *BackendBucketsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *BackendBucketsListCall) MaxResults(maxResults int64) *BackendBucketsListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} -type BackendBucketsDeleteSignedUrlKeyCall struct { - s *Service - project string - backendBucket string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *BackendBucketsListCall) OrderBy(orderBy string) *BackendBucketsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c } -// DeleteSignedUrlKey: Deletes a key for validating requests with signed -// URLs for this backend bucket. -// -// - backendBucket: Name of the BackendBucket resource to which the -// Signed URL Key should be added. The name should conform to RFC1035. -// - keyName: The name of the Signed URL Key to delete. -// - project: Project ID for this request. -func (r *BackendBucketsService) DeleteSignedUrlKey(project string, backendBucket string, keyName string) *BackendBucketsDeleteSignedUrlKeyCall { - c := &BackendBucketsDeleteSignedUrlKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.backendBucket = backendBucket - c.urlParams_.Set("keyName", keyName) +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *BackendBucketsListCall) PageToken(pageToken string) *BackendBucketsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *BackendBucketsDeleteSignedUrlKeyCall) RequestId(requestId string) *BackendBucketsDeleteSignedUrlKeyCall { - c.urlParams_.Set("requestId", requestId) +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *BackendBucketsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *BackendBucketsListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) 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 *BackendBucketsDeleteSignedUrlKeyCall) Fields(s ...googleapi.Field) *BackendBucketsDeleteSignedUrlKeyCall { +func (c *BackendBucketsListCall) Fields(s ...googleapi.Field) *BackendBucketsListCall { 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 *BackendBucketsListCall) IfNoneMatch(entityTag string) *BackendBucketsListCall { + 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 *BackendBucketsDeleteSignedUrlKeyCall) Context(ctx context.Context) *BackendBucketsDeleteSignedUrlKeyCall { +func (c *BackendBucketsListCall) Context(ctx context.Context) *BackendBucketsListCall { 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 *BackendBucketsDeleteSignedUrlKeyCall) Header() http.Header { +func (c *BackendBucketsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendBucketsDeleteSignedUrlKeyCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendBucketsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{backendBucket}/deleteSignedUrlKey") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendBucket": c.backendBucket, + "project": c.project, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendBuckets.deleteSignedUrlKey" 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 *BackendBucketsDeleteSignedUrlKeyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.backendBuckets.list" call. +// Exactly one of *BackendBucketList or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *BackendBucketList.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 *BackendBucketsListCall) Do(opts ...googleapi.CallOption) (*BackendBucketList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -70243,7 +72010,7 @@ func (c *BackendBucketsDeleteSignedUrlKeyCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &BackendBucketList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -70255,26 +72022,35 @@ func (c *BackendBucketsDeleteSignedUrlKeyCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Deletes a key for validating requests with signed URLs for this backend bucket.", - // "flatPath": "projects/{project}/global/backendBuckets/{backendBucket}/deleteSignedUrlKey", - // "httpMethod": "POST", - // "id": "compute.backendBuckets.deleteSignedUrlKey", + // "description": "Retrieves the list of BackendBucket resources available to the specified project.", + // "flatPath": "projects/{project}/global/backendBuckets", + // "httpMethod": "GET", + // "id": "compute.backendBuckets.list", // "parameterOrder": [ - // "project", - // "backendBucket", - // "keyName" + // "project" // ], // "parameters": { - // "backendBucket": { - // "description": "Name of the BackendBucket resource to which the Signed URL Key should be added. The name should conform to RFC1035.", - // "location": "path", - // "required": true, + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "location": "query", // "type": "string" // }, - // "keyName": { - // "description": "The name of the Signed URL Key to delete.", + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", // "location": "query", - // "required": true, // "type": "string" // }, // "project": { @@ -70284,98 +72060,131 @@ func (c *BackendBucketsDeleteSignedUrlKeyCall) Do(opts ...googleapi.CallOption) // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", // "location": "query", - // "type": "string" + // "type": "boolean" // } // }, - // "path": "projects/{project}/global/backendBuckets/{backendBucket}/deleteSignedUrlKey", + // "path": "projects/{project}/global/backendBuckets", // "response": { - // "$ref": "Operation" + // "$ref": "BackendBucketList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.backendBuckets.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 *BackendBucketsListCall) Pages(ctx context.Context, f func(*BackendBucketList) 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 BackendBucketsGetCall struct { +// method id "compute.backendBuckets.patch": + +type BackendBucketsPatchCall struct { s *Service project string backendBucket string + backendbucket *BackendBucket urlParams_ gensupport.URLParams - ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Returns the specified BackendBucket resource. +// Patch: Updates the specified BackendBucket resource with the data +// included in the request. This method supports PATCH semantics and +// uses the JSON merge patch format and processing rules. // -// - backendBucket: Name of the BackendBucket resource to return. +// - backendBucket: Name of the BackendBucket resource to patch. // - project: Project ID for this request. -func (r *BackendBucketsService) Get(project string, backendBucket string) *BackendBucketsGetCall { - c := &BackendBucketsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *BackendBucketsService) Patch(project string, backendBucket string, backendbucket *BackendBucket) *BackendBucketsPatchCall { + c := &BackendBucketsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.backendBucket = backendBucket + c.backendbucket = backendbucket + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *BackendBucketsPatchCall) RequestId(requestId string) *BackendBucketsPatchCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BackendBucketsGetCall) Fields(s ...googleapi.Field) *BackendBucketsGetCall { +func (c *BackendBucketsPatchCall) Fields(s ...googleapi.Field) *BackendBucketsPatchCall { 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 *BackendBucketsGetCall) IfNoneMatch(entityTag string) *BackendBucketsGetCall { - 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 *BackendBucketsGetCall) Context(ctx context.Context) *BackendBucketsGetCall { +func (c *BackendBucketsPatchCall) Context(ctx context.Context) *BackendBucketsPatchCall { 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 *BackendBucketsGetCall) Header() http.Header { +func (c *BackendBucketsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendBucketsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendBucketsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendbucket) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{backendBucket}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -70387,14 +72196,14 @@ func (c *BackendBucketsGetCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendBuckets.get" call. -// Exactly one of *BackendBucket or error will be non-nil. Any non-2xx +// Do executes the "compute.backendBuckets.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 -// *BackendBucket.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 *BackendBucketsGetCall) Do(opts ...googleapi.CallOption) (*BackendBucket, error) { +// *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 *BackendBucketsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -70413,7 +72222,7 @@ func (c *BackendBucketsGetCall) Do(opts ...googleapi.CallOption) (*BackendBucket if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &BackendBucket{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -70425,17 +72234,17 @@ func (c *BackendBucketsGetCall) Do(opts ...googleapi.CallOption) (*BackendBucket } return ret, nil // { - // "description": "Returns the specified BackendBucket resource.", + // "description": "Updates the specified BackendBucket resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", // "flatPath": "projects/{project}/global/backendBuckets/{backendBucket}", - // "httpMethod": "GET", - // "id": "compute.backendBuckets.get", + // "httpMethod": "PATCH", + // "id": "compute.backendBuckets.patch", // "parameterOrder": [ // "project", // "backendBucket" // ], // "parameters": { // "backendBucket": { - // "description": "Name of the BackendBucket resource to return.", + // "description": "Name of the BackendBucket resource to patch.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -70447,122 +72256,132 @@ func (c *BackendBucketsGetCall) Do(opts ...googleapi.CallOption) (*BackendBucket // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" // } // }, // "path": "projects/{project}/global/backendBuckets/{backendBucket}", - // "response": { + // "request": { // "$ref": "BackendBucket" // }, + // "response": { + // "$ref": "Operation" + // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.backendBuckets.getIamPolicy": +// method id "compute.backendBuckets.setEdgeSecurityPolicy": -type BackendBucketsGetIamPolicyCall struct { - s *Service - project string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type BackendBucketsSetEdgeSecurityPolicyCall struct { + s *Service + project string + backendBucket string + securitypolicyreference *SecurityPolicyReference + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. +// SetEdgeSecurityPolicy: Sets the edge security policy for the +// specified backend bucket. // -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *BackendBucketsService) GetIamPolicy(project string, resource string) *BackendBucketsGetIamPolicyCall { - c := &BackendBucketsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - backendBucket: Name of the BackendService resource to which the +// security policy should be set. The name should conform to RFC1035. +// - project: Project ID for this request. +func (r *BackendBucketsService) SetEdgeSecurityPolicy(project string, backendBucket string, securitypolicyreference *SecurityPolicyReference) *BackendBucketsSetEdgeSecurityPolicyCall { + c := &BackendBucketsSetEdgeSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.resource = resource + c.backendBucket = backendBucket + c.securitypolicyreference = securitypolicyreference return c } -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *BackendBucketsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *BackendBucketsGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *BackendBucketsSetEdgeSecurityPolicyCall) RequestId(requestId string) *BackendBucketsSetEdgeSecurityPolicyCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BackendBucketsGetIamPolicyCall) Fields(s ...googleapi.Field) *BackendBucketsGetIamPolicyCall { +func (c *BackendBucketsSetEdgeSecurityPolicyCall) Fields(s ...googleapi.Field) *BackendBucketsSetEdgeSecurityPolicyCall { 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 *BackendBucketsGetIamPolicyCall) IfNoneMatch(entityTag string) *BackendBucketsGetIamPolicyCall { - 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 *BackendBucketsGetIamPolicyCall) Context(ctx context.Context) *BackendBucketsGetIamPolicyCall { +func (c *BackendBucketsSetEdgeSecurityPolicyCall) Context(ctx context.Context) *BackendBucketsSetEdgeSecurityPolicyCall { 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 *BackendBucketsGetIamPolicyCall) Header() http.Header { +func (c *BackendBucketsSetEdgeSecurityPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendBucketsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendBucketsSetEdgeSecurityPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.securitypolicyreference) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{resource}/getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{backendBucket}/setEdgeSecurityPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, + "project": c.project, + "backendBucket": c.backendBucket, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendBuckets.getIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *BackendBucketsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// Do executes the "compute.backendBuckets.setEdgeSecurityPolicy" 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 *BackendBucketsSetEdgeSecurityPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -70581,7 +72400,7 @@ func (c *BackendBucketsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Poli if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -70593,20 +72412,20 @@ func (c *BackendBucketsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Poli } return ret, nil // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", - // "flatPath": "projects/{project}/global/backendBuckets/{resource}/getIamPolicy", - // "httpMethod": "GET", - // "id": "compute.backendBuckets.getIamPolicy", + // "description": "Sets the edge security policy for the specified backend bucket.", + // "flatPath": "projects/{project}/global/backendBuckets/{backendBucket}/setEdgeSecurityPolicy", + // "httpMethod": "POST", + // "id": "compute.backendBuckets.setEdgeSecurityPolicy", // "parameterOrder": [ // "project", - // "resource" + // "backendBucket" // ], // "parameters": { - // "optionsRequestedPolicyVersion": { - // "description": "Requested IAM Policy version.", - // "format": "int32", - // "location": "query", - // "type": "integer" + // "backendBucket": { + // "description": "Name of the BackendService resource to which the security policy should be set. The name should conform to RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" // }, // "project": { // "description": "Project ID for this request.", @@ -70615,69 +72434,56 @@ func (c *BackendBucketsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Poli // "required": true, // "type": "string" // }, - // "resource": { - // "description": "Name or id of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", // "type": "string" // } // }, - // "path": "projects/{project}/global/backendBuckets/{resource}/getIamPolicy", + // "path": "projects/{project}/global/backendBuckets/{backendBucket}/setEdgeSecurityPolicy", + // "request": { + // "$ref": "SecurityPolicyReference" + // }, // "response": { - // "$ref": "Policy" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.backendBuckets.insert": +// method id "compute.backendBuckets.setIamPolicy": -type BackendBucketsInsertCall struct { - s *Service - project string - backendbucket *BackendBucket - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type BackendBucketsSetIamPolicyCall struct { + s *Service + project string + resource string + globalsetpolicyrequest *GlobalSetPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Insert: Creates a BackendBucket resource in the specified project -// using the data included in the request. +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. // // - project: Project ID for this request. -func (r *BackendBucketsService) Insert(project string, backendbucket *BackendBucket) *BackendBucketsInsertCall { - c := &BackendBucketsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - resource: Name or id of the resource for this request. +func (r *BackendBucketsService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *BackendBucketsSetIamPolicyCall { + c := &BackendBucketsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.backendbucket = backendbucket - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *BackendBucketsInsertCall) RequestId(requestId string) *BackendBucketsInsertCall { - c.urlParams_.Set("requestId", requestId) + c.resource = resource + c.globalsetpolicyrequest = globalsetpolicyrequest 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 *BackendBucketsInsertCall) Fields(s ...googleapi.Field) *BackendBucketsInsertCall { +func (c *BackendBucketsSetIamPolicyCall) Fields(s ...googleapi.Field) *BackendBucketsSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -70685,21 +72491,21 @@ func (c *BackendBucketsInsertCall) Fields(s ...googleapi.Field) *BackendBucketsI // 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 *BackendBucketsInsertCall) Context(ctx context.Context) *BackendBucketsInsertCall { +func (c *BackendBucketsSetIamPolicyCall) Context(ctx context.Context) *BackendBucketsSetIamPolicyCall { 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 *BackendBucketsInsertCall) Header() http.Header { +func (c *BackendBucketsSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendBucketsInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendBucketsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -70707,14 +72513,14 @@ func (c *BackendBucketsInsertCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendbucket) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetpolicyrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{resource}/setIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -70722,19 +72528,20 @@ func (c *BackendBucketsInsertCall) doRequest(alt string) (*http.Response, error) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, + "project": c.project, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendBuckets.insert" 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 *BackendBucketsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.backendBuckets.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *BackendBucketsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -70753,7 +72560,7 @@ func (c *BackendBucketsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -70765,12 +72572,13 @@ func (c *BackendBucketsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Creates a BackendBucket resource in the specified project using the data included in the request.", - // "flatPath": "projects/{project}/global/backendBuckets", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "flatPath": "projects/{project}/global/backendBuckets/{resource}/setIamPolicy", // "httpMethod": "POST", - // "id": "compute.backendBuckets.insert", + // "id": "compute.backendBuckets.setIamPolicy", // "parameterOrder": [ - // "project" + // "project", + // "resource" // ], // "parameters": { // "project": { @@ -70780,18 +72588,20 @@ func (c *BackendBucketsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/global/backendBuckets", + // "path": "projects/{project}/global/backendBuckets/{resource}/setIamPolicy", // "request": { - // "$ref": "BackendBucket" + // "$ref": "GlobalSetPolicyRequest" // }, // "response": { - // "$ref": "Operation" + // "$ref": "Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -70801,178 +72611,93 @@ func (c *BackendBucketsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, } -// method id "compute.backendBuckets.list": +// method id "compute.backendBuckets.testIamPermissions": -type BackendBucketsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type BackendBucketsTestIamPermissionsCall struct { + s *Service + project string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Retrieves the list of BackendBucket resources available to the -// specified project. +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. // // - project: Project ID for this request. -func (r *BackendBucketsService) List(project string) *BackendBucketsListCall { - c := &BackendBucketsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - resource: Name or id of the resource for this request. +func (r *BackendBucketsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *BackendBucketsTestIamPermissionsCall { + c := &BackendBucketsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources -// support two types of filter expressions: expressions that support -// regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a -// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` -// or `:`. For example, if you are filtering Compute Engine instances, -// you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` -// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") -// ``` By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") -// AND (scheduling.automaticRestart = true) ``` If you want to use a -// regular expression, use the `eq` (equal) or `ne` (not equal) operator -// against a single un-parenthesized expression with or without quotes -// or against multiple parenthesized expressions. Examples: `fieldname -// eq unquoted literal` `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" `(fieldname1 eq literal) -// (fieldname2 ne "literal")` The literal value is interpreted as a -// regular expression using Google RE2 library syntax. The literal value -// must match the entire field. For example, to filter for instances -// that do not end with name "instance", you would use `name ne -// .*instance`. -func (c *BackendBucketsListCall) Filter(filter string) *BackendBucketsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than `maxResults`, Compute Engine returns -// a `nextPageToken` that can be used to get the next page of results in -// subsequent list requests. Acceptable values are `0` to `500`, -// inclusive. (Default: `500`) -func (c *BackendBucketsListCall) MaxResults(maxResults int64) *BackendBucketsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. You can also sort results in -// descending order based on the creation timestamp using -// `orderBy="creationTimestamp desc". This sorts results based on the -// `creationTimestamp` field in reverse chronological order (newest -// result first). Use this to sort resources like operations so that the -// newest operation is returned first. Currently, only sorting by `name` -// or `creationTimestamp desc` is supported. -func (c *BackendBucketsListCall) OrderBy(orderBy string) *BackendBucketsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set `pageToken` to the `nextPageToken` returned by a -// previous list request to get the next page of results. -func (c *BackendBucketsListCall) PageToken(pageToken string) *BackendBucketsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter -// "returnPartialSuccess": Opt-in for partial success behavior which -// provides partial results in case of failure. The default value is -// false. -func (c *BackendBucketsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *BackendBucketsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest 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 *BackendBucketsListCall) Fields(s ...googleapi.Field) *BackendBucketsListCall { +func (c *BackendBucketsTestIamPermissionsCall) Fields(s ...googleapi.Field) *BackendBucketsTestIamPermissionsCall { 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 *BackendBucketsListCall) IfNoneMatch(entityTag string) *BackendBucketsListCall { - 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 *BackendBucketsListCall) Context(ctx context.Context) *BackendBucketsListCall { +func (c *BackendBucketsTestIamPermissionsCall) Context(ctx context.Context) *BackendBucketsTestIamPermissionsCall { 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 *BackendBucketsListCall) Header() http.Header { +func (c *BackendBucketsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendBucketsListCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendBucketsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, + "project": c.project, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendBuckets.list" call. -// Exactly one of *BackendBucketList or error will be non-nil. Any +// Do executes the "compute.backendBuckets.testIamPermissions" call. +// Exactly one of *TestPermissionsResponse or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either -// *BackendBucketList.ServerResponse.Header or (if a response was +// *TestPermissionsResponse.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 *BackendBucketsListCall) Do(opts ...googleapi.CallOption) (*BackendBucketList, error) { +func (c *BackendBucketsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -70991,7 +72716,7 @@ func (c *BackendBucketsListCall) Do(opts ...googleapi.CallOption) (*BackendBucke if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &BackendBucketList{ + ret := &TestPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -71003,37 +72728,15 @@ func (c *BackendBucketsListCall) Do(opts ...googleapi.CallOption) (*BackendBucke } return ret, nil // { - // "description": "Retrieves the list of BackendBucket resources available to the specified project.", - // "flatPath": "projects/{project}/global/backendBuckets", - // "httpMethod": "GET", - // "id": "compute.backendBuckets.list", + // "description": "Returns permissions that a caller has on the specified resource.", + // "flatPath": "projects/{project}/global/backendBuckets/{resource}/testIamPermissions", + // "httpMethod": "POST", + // "id": "compute.backendBuckets.testIamPermissions", // "parameterOrder": [ - // "project" + // "project", + // "resource" // ], // "parameters": { - // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -71041,15 +72744,20 @@ func (c *BackendBucketsListCall) Do(opts ...googleapi.CallOption) (*BackendBucke // "required": true, // "type": "string" // }, - // "returnPartialSuccess": { - // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", - // "location": "query", - // "type": "boolean" + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" // } // }, - // "path": "projects/{project}/global/backendBuckets", + // "path": "projects/{project}/global/backendBuckets/{resource}/testIamPermissions", + // "request": { + // "$ref": "TestPermissionsRequest" + // }, // "response": { - // "$ref": "BackendBucketList" + // "$ref": "TestPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -71060,30 +72768,9 @@ func (c *BackendBucketsListCall) Do(opts ...googleapi.CallOption) (*BackendBucke } -// 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 *BackendBucketsListCall) Pages(ctx context.Context, f func(*BackendBucketList) 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 "compute.backendBuckets.patch": +// method id "compute.backendBuckets.update": -type BackendBucketsPatchCall struct { +type BackendBucketsUpdateCall struct { s *Service project string backendBucket string @@ -71093,14 +72780,13 @@ type BackendBucketsPatchCall struct { header_ http.Header } -// Patch: Updates the specified BackendBucket resource with the data -// included in the request. This method supports PATCH semantics and -// uses the JSON merge patch format and processing rules. +// Update: Updates the specified BackendBucket resource with the data +// included in the request. // -// - backendBucket: Name of the BackendBucket resource to patch. +// - backendBucket: Name of the BackendBucket resource to update. // - project: Project ID for this request. -func (r *BackendBucketsService) Patch(project string, backendBucket string, backendbucket *BackendBucket) *BackendBucketsPatchCall { - c := &BackendBucketsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *BackendBucketsService) Update(project string, backendBucket string, backendbucket *BackendBucket) *BackendBucketsUpdateCall { + c := &BackendBucketsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.backendBucket = backendBucket c.backendbucket = backendbucket @@ -71118,7 +72804,7 @@ func (r *BackendBucketsService) Patch(project string, backendBucket string, back // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *BackendBucketsPatchCall) RequestId(requestId string) *BackendBucketsPatchCall { +func (c *BackendBucketsUpdateCall) RequestId(requestId string) *BackendBucketsUpdateCall { c.urlParams_.Set("requestId", requestId) return c } @@ -71126,7 +72812,7 @@ func (c *BackendBucketsPatchCall) RequestId(requestId string) *BackendBucketsPat // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BackendBucketsPatchCall) Fields(s ...googleapi.Field) *BackendBucketsPatchCall { +func (c *BackendBucketsUpdateCall) Fields(s ...googleapi.Field) *BackendBucketsUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -71134,21 +72820,21 @@ func (c *BackendBucketsPatchCall) Fields(s ...googleapi.Field) *BackendBucketsPa // 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 *BackendBucketsPatchCall) Context(ctx context.Context) *BackendBucketsPatchCall { +func (c *BackendBucketsUpdateCall) Context(ctx context.Context) *BackendBucketsUpdateCall { 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 *BackendBucketsPatchCall) Header() http.Header { +func (c *BackendBucketsUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendBucketsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendBucketsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -71165,7 +72851,7 @@ func (c *BackendBucketsPatchCall) doRequest(alt string) (*http.Response, error) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{backendBucket}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("PUT", urls, body) if err != nil { return nil, err } @@ -71177,14 +72863,14 @@ func (c *BackendBucketsPatchCall) doRequest(alt string) (*http.Response, error) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendBuckets.patch" call. +// Do executes the "compute.backendBuckets.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 *BackendBucketsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *BackendBucketsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -71215,17 +72901,17 @@ func (c *BackendBucketsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Updates the specified BackendBucket resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates the specified BackendBucket resource with the data included in the request.", // "flatPath": "projects/{project}/global/backendBuckets/{backendBucket}", - // "httpMethod": "PATCH", - // "id": "compute.backendBuckets.patch", + // "httpMethod": "PUT", + // "id": "compute.backendBuckets.update", // "parameterOrder": [ // "project", // "backendBucket" // ], // "parameters": { // "backendBucket": { - // "description": "Name of the BackendBucket resource to patch.", + // "description": "Name of the BackendBucket resource to update.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -71259,29 +72945,29 @@ func (c *BackendBucketsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, } -// method id "compute.backendBuckets.setEdgeSecurityPolicy": +// method id "compute.backendServices.addSignedUrlKey": -type BackendBucketsSetEdgeSecurityPolicyCall struct { - s *Service - project string - backendBucket string - securitypolicyreference *SecurityPolicyReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type BackendServicesAddSignedUrlKeyCall struct { + s *Service + project string + backendService string + signedurlkey *SignedUrlKey + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetEdgeSecurityPolicy: Sets the edge security policy for the -// specified backend bucket. +// AddSignedUrlKey: Adds a key for validating requests with signed URLs +// for this backend service. // -// - backendBucket: Name of the BackendService resource to which the -// security policy should be set. The name should conform to RFC1035. +// - backendService: Name of the BackendService resource to which the +// Signed URL Key should be added. The name should conform to RFC1035. // - project: Project ID for this request. -func (r *BackendBucketsService) SetEdgeSecurityPolicy(project string, backendBucket string, securitypolicyreference *SecurityPolicyReference) *BackendBucketsSetEdgeSecurityPolicyCall { - c := &BackendBucketsSetEdgeSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *BackendServicesService) AddSignedUrlKey(project string, backendService string, signedurlkey *SignedUrlKey) *BackendServicesAddSignedUrlKeyCall { + c := &BackendServicesAddSignedUrlKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.backendBucket = backendBucket - c.securitypolicyreference = securitypolicyreference + c.backendService = backendService + c.signedurlkey = signedurlkey return c } @@ -71296,7 +72982,7 @@ func (r *BackendBucketsService) SetEdgeSecurityPolicy(project string, backendBuc // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *BackendBucketsSetEdgeSecurityPolicyCall) RequestId(requestId string) *BackendBucketsSetEdgeSecurityPolicyCall { +func (c *BackendServicesAddSignedUrlKeyCall) RequestId(requestId string) *BackendServicesAddSignedUrlKeyCall { c.urlParams_.Set("requestId", requestId) return c } @@ -71304,7 +72990,7 @@ func (c *BackendBucketsSetEdgeSecurityPolicyCall) RequestId(requestId string) *B // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BackendBucketsSetEdgeSecurityPolicyCall) Fields(s ...googleapi.Field) *BackendBucketsSetEdgeSecurityPolicyCall { +func (c *BackendServicesAddSignedUrlKeyCall) Fields(s ...googleapi.Field) *BackendServicesAddSignedUrlKeyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -71312,21 +72998,21 @@ func (c *BackendBucketsSetEdgeSecurityPolicyCall) Fields(s ...googleapi.Field) * // 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 *BackendBucketsSetEdgeSecurityPolicyCall) Context(ctx context.Context) *BackendBucketsSetEdgeSecurityPolicyCall { +func (c *BackendServicesAddSignedUrlKeyCall) Context(ctx context.Context) *BackendServicesAddSignedUrlKeyCall { 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 *BackendBucketsSetEdgeSecurityPolicyCall) Header() http.Header { +func (c *BackendServicesAddSignedUrlKeyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendBucketsSetEdgeSecurityPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendServicesAddSignedUrlKeyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -71334,14 +73020,14 @@ func (c *BackendBucketsSetEdgeSecurityPolicyCall) doRequest(alt string) (*http.R } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.securitypolicyreference) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.signedurlkey) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{backendBucket}/setEdgeSecurityPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}/addSignedUrlKey") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -71349,20 +73035,20 @@ func (c *BackendBucketsSetEdgeSecurityPolicyCall) doRequest(alt string) (*http.R } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendBucket": c.backendBucket, + "project": c.project, + "backendService": c.backendService, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendBuckets.setEdgeSecurityPolicy" call. +// Do executes the "compute.backendServices.addSignedUrlKey" 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 *BackendBucketsSetEdgeSecurityPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *BackendServicesAddSignedUrlKeyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -71393,17 +73079,17 @@ func (c *BackendBucketsSetEdgeSecurityPolicyCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Sets the edge security policy for the specified backend bucket.", - // "flatPath": "projects/{project}/global/backendBuckets/{backendBucket}/setEdgeSecurityPolicy", + // "description": "Adds a key for validating requests with signed URLs for this backend service.", + // "flatPath": "projects/{project}/global/backendServices/{backendService}/addSignedUrlKey", // "httpMethod": "POST", - // "id": "compute.backendBuckets.setEdgeSecurityPolicy", + // "id": "compute.backendServices.addSignedUrlKey", // "parameterOrder": [ // "project", - // "backendBucket" + // "backendService" // ], // "parameters": { - // "backendBucket": { - // "description": "Name of the BackendService resource to which the security policy should be set. The name should conform to RFC1035.", + // "backendService": { + // "description": "Name of the BackendService resource to which the Signed URL Key should be added. The name should conform to RFC1035.", // "location": "path", // "required": true, // "type": "string" @@ -71421,9 +73107,9 @@ func (c *BackendBucketsSetEdgeSecurityPolicyCall) Do(opts ...googleapi.CallOptio // "type": "string" // } // }, - // "path": "projects/{project}/global/backendBuckets/{backendBucket}/setEdgeSecurityPolicy", + // "path": "projects/{project}/global/backendServices/{backendService}/addSignedUrlKey", // "request": { - // "$ref": "SecurityPolicyReference" + // "$ref": "SignedUrlKey" // }, // "response": { // "$ref": "Operation" @@ -71436,93 +73122,191 @@ func (c *BackendBucketsSetEdgeSecurityPolicyCall) Do(opts ...googleapi.CallOptio } -// method id "compute.backendBuckets.setIamPolicy": +// method id "compute.backendServices.aggregatedList": -type BackendBucketsSetIamPolicyCall struct { - s *Service - project string - resource string - globalsetpolicyrequest *GlobalSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type BackendServicesAggregatedListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. +// AggregatedList: Retrieves the list of all BackendService resources, +// regional and global, available to the specified project. // -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *BackendBucketsService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *BackendBucketsSetIamPolicyCall { - c := &BackendBucketsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Name of the project scoping this request. +func (r *BackendServicesService) AggregatedList(project string) *BackendServicesAggregatedListCall { + c := &BackendServicesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.resource = resource - c.globalsetpolicyrequest = globalsetpolicyrequest + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources +// support two types of filter expressions: expressions that support +// regular expressions and expressions that follow API improvement +// proposal AIP-160. If you want to use AIP-160, your expression must +// specify the field name, an operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` +// or `:`. For example, if you are filtering Compute Engine instances, +// you can exclude instances named `example-instance` by specifying +// `name != example-instance`. The `:` operator can be used with string +// fields to match substrings. For non-string fields it is equivalent to +// the `=` operator. The `:*` comparison can be used to test whether a +// key has been defined. For example, to find all objects with `owner` +// label use: ``` labels.owner:* ``` You can also filter nested fields. +// For example, you could specify `scheduling.automaticRestart = false` +// to include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` If you want to use a +// regular expression, use the `eq` (equal) or `ne` (not equal) operator +// against a single un-parenthesized expression with or without quotes +// or against multiple parenthesized expressions. Examples: `fieldname +// eq unquoted literal` `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" `(fieldname1 eq literal) +// (fieldname2 ne "literal")` The literal value is interpreted as a +// regular expression using Google RE2 library syntax. The literal value +// must match the entire field. For example, to filter for instances +// that do not end with name "instance", you would use `name ne +// .*instance`. +func (c *BackendServicesAggregatedListCall) Filter(filter string) *BackendServicesAggregatedListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// IncludeAllScopes sets the optional parameter "includeAllScopes": +// Indicates whether every visible scope for each scope type (zone, +// region, global) should be included in the response. For new resource +// types added after this field, the flag has no effect as new resource +// types will always include every visible scope for each scope type in +// response. For resource types which predate this field, if this flag +// is omitted or false, only scopes of the scope types where the +// resource type is expected to be found will be included. +func (c *BackendServicesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *BackendServicesAggregatedListCall { + c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *BackendServicesAggregatedListCall) MaxResults(maxResults int64) *BackendServicesAggregatedListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *BackendServicesAggregatedListCall) OrderBy(orderBy string) *BackendServicesAggregatedListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *BackendServicesAggregatedListCall) PageToken(pageToken string) *BackendServicesAggregatedListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *BackendServicesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *BackendServicesAggregatedListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) 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 *BackendBucketsSetIamPolicyCall) Fields(s ...googleapi.Field) *BackendBucketsSetIamPolicyCall { +func (c *BackendServicesAggregatedListCall) Fields(s ...googleapi.Field) *BackendServicesAggregatedListCall { 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 *BackendServicesAggregatedListCall) IfNoneMatch(entityTag string) *BackendServicesAggregatedListCall { + 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 *BackendBucketsSetIamPolicyCall) Context(ctx context.Context) *BackendBucketsSetIamPolicyCall { +func (c *BackendServicesAggregatedListCall) Context(ctx context.Context) *BackendServicesAggregatedListCall { 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 *BackendBucketsSetIamPolicyCall) Header() http.Header { +func (c *BackendServicesAggregatedListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendBucketsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendServicesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetpolicyrequest) - 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) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{resource}/setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/backendServices") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, + "project": c.project, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendBuckets.setIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *BackendBucketsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// Do executes the "compute.backendServices.aggregatedList" call. +// Exactly one of *BackendServiceAggregatedList or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *BackendServiceAggregatedList.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 *BackendServicesAggregatedListCall) Do(opts ...googleapi.CallOption) (*BackendServiceAggregatedList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -71541,7 +73325,7 @@ func (c *BackendBucketsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Poli if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &BackendServiceAggregatedList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -71553,74 +73337,131 @@ func (c *BackendBucketsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Poli } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", - // "flatPath": "projects/{project}/global/backendBuckets/{resource}/setIamPolicy", - // "httpMethod": "POST", - // "id": "compute.backendBuckets.setIamPolicy", + // "description": "Retrieves the list of all BackendService resources, regional and global, available to the specified project.", + // "flatPath": "projects/{project}/aggregated/backendServices", + // "httpMethod": "GET", + // "id": "compute.backendServices.aggregatedList", // "parameterOrder": [ - // "project", - // "resource" + // "project" // ], // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "location": "query", + // "type": "string" + // }, + // "includeAllScopes": { + // "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", + // "location": "query", + // "type": "boolean" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, // "project": { - // "description": "Project ID for this request.", + // "description": "Name of the project scoping this request.", // "location": "path", // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" // }, - // "resource": { - // "description": "Name or id of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "location": "query", + // "type": "boolean" // } // }, - // "path": "projects/{project}/global/backendBuckets/{resource}/setIamPolicy", - // "request": { - // "$ref": "GlobalSetPolicyRequest" - // }, + // "path": "projects/{project}/aggregated/backendServices", // "response": { - // "$ref": "Policy" + // "$ref": "BackendServiceAggregatedList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.backendBuckets.testIamPermissions": +// 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 *BackendServicesAggregatedListCall) Pages(ctx context.Context, f func(*BackendServiceAggregatedList) 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 BackendBucketsTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "compute.backendServices.delete": + +type BackendServicesDeleteCall struct { + s *Service + project string + backendService string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// Delete: Deletes the specified BackendService resource. // +// - backendService: Name of the BackendService resource to delete. // - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *BackendBucketsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *BackendBucketsTestIamPermissionsCall { - c := &BackendBucketsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *BackendServicesService) Delete(project string, backendService string) *BackendServicesDeleteCall { + c := &BackendServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest + c.backendService = backendService + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *BackendServicesDeleteCall) RequestId(requestId string) *BackendServicesDeleteCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BackendBucketsTestIamPermissionsCall) Fields(s ...googleapi.Field) *BackendBucketsTestIamPermissionsCall { +func (c *BackendServicesDeleteCall) Fields(s ...googleapi.Field) *BackendServicesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -71628,21 +73469,21 @@ func (c *BackendBucketsTestIamPermissionsCall) Fields(s ...googleapi.Field) *Bac // 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 *BackendBucketsTestIamPermissionsCall) Context(ctx context.Context) *BackendBucketsTestIamPermissionsCall { +func (c *BackendServicesDeleteCall) Context(ctx context.Context) *BackendServicesDeleteCall { 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 *BackendBucketsTestIamPermissionsCall) Header() http.Header { +func (c *BackendServicesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendBucketsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendServicesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -71650,35 +73491,30 @@ func (c *BackendBucketsTestIamPermissionsCall) doRequest(alt string) (*http.Resp } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, + "project": c.project, + "backendService": c.backendService, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendBuckets.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *BackendBucketsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { +// Do executes the "compute.backendServices.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *BackendServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -71697,7 +73533,7 @@ func (c *BackendBucketsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestPermissionsResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -71709,15 +73545,22 @@ func (c *BackendBucketsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "flatPath": "projects/{project}/global/backendBuckets/{resource}/testIamPermissions", - // "httpMethod": "POST", - // "id": "compute.backendBuckets.testIamPermissions", + // "description": "Deletes the specified BackendService resource.", + // "flatPath": "projects/{project}/global/backendServices/{backendService}", + // "httpMethod": "DELETE", + // "id": "compute.backendServices.delete", // "parameterOrder": [ // "project", - // "resource" + // "backendService" // ], // "parameters": { + // "backendService": { + // "description": "Name of the BackendService resource to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -71725,52 +73568,47 @@ func (c *BackendBucketsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) // "required": true, // "type": "string" // }, - // "resource": { - // "description": "Name or id of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", // "type": "string" // } // }, - // "path": "projects/{project}/global/backendBuckets/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, + // "path": "projects/{project}/global/backendServices/{backendService}", // "response": { - // "$ref": "TestPermissionsResponse" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.backendBuckets.update": +// method id "compute.backendServices.deleteSignedUrlKey": -type BackendBucketsUpdateCall struct { - s *Service - project string - backendBucket string - backendbucket *BackendBucket - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type BackendServicesDeleteSignedUrlKeyCall struct { + s *Service + project string + backendService string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Update: Updates the specified BackendBucket resource with the data -// included in the request. +// DeleteSignedUrlKey: Deletes a key for validating requests with signed +// URLs for this backend service. // -// - backendBucket: Name of the BackendBucket resource to update. -// - project: Project ID for this request. -func (r *BackendBucketsService) Update(project string, backendBucket string, backendbucket *BackendBucket) *BackendBucketsUpdateCall { - c := &BackendBucketsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - backendService: Name of the BackendService resource to which the +// Signed URL Key should be added. The name should conform to RFC1035. +// - keyName: The name of the Signed URL Key to delete. +// - project: Project ID for this request. +func (r *BackendServicesService) DeleteSignedUrlKey(project string, backendService string, keyName string) *BackendServicesDeleteSignedUrlKeyCall { + c := &BackendServicesDeleteSignedUrlKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.backendBucket = backendBucket - c.backendbucket = backendbucket + c.backendService = backendService + c.urlParams_.Set("keyName", keyName) return c } @@ -71785,7 +73623,7 @@ func (r *BackendBucketsService) Update(project string, backendBucket string, bac // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *BackendBucketsUpdateCall) RequestId(requestId string) *BackendBucketsUpdateCall { +func (c *BackendServicesDeleteSignedUrlKeyCall) RequestId(requestId string) *BackendServicesDeleteSignedUrlKeyCall { c.urlParams_.Set("requestId", requestId) return c } @@ -71793,7 +73631,7 @@ func (c *BackendBucketsUpdateCall) RequestId(requestId string) *BackendBucketsUp // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BackendBucketsUpdateCall) Fields(s ...googleapi.Field) *BackendBucketsUpdateCall { +func (c *BackendServicesDeleteSignedUrlKeyCall) Fields(s ...googleapi.Field) *BackendServicesDeleteSignedUrlKeyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -71801,21 +73639,21 @@ func (c *BackendBucketsUpdateCall) Fields(s ...googleapi.Field) *BackendBucketsU // 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 *BackendBucketsUpdateCall) Context(ctx context.Context) *BackendBucketsUpdateCall { +func (c *BackendServicesDeleteSignedUrlKeyCall) Context(ctx context.Context) *BackendServicesDeleteSignedUrlKeyCall { 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 *BackendBucketsUpdateCall) Header() http.Header { +func (c *BackendServicesDeleteSignedUrlKeyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendBucketsUpdateCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendServicesDeleteSignedUrlKeyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -71823,35 +73661,30 @@ func (c *BackendBucketsUpdateCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendbucket) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{backendBucket}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}/deleteSignedUrlKey") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendBucket": c.backendBucket, + "project": c.project, + "backendService": c.backendService, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendBuckets.update" call. +// Do executes the "compute.backendServices.deleteSignedUrlKey" 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 *BackendBucketsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *BackendServicesDeleteSignedUrlKeyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -71882,19 +73715,25 @@ func (c *BackendBucketsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Updates the specified BackendBucket resource with the data included in the request.", - // "flatPath": "projects/{project}/global/backendBuckets/{backendBucket}", - // "httpMethod": "PUT", - // "id": "compute.backendBuckets.update", + // "description": "Deletes a key for validating requests with signed URLs for this backend service.", + // "flatPath": "projects/{project}/global/backendServices/{backendService}/deleteSignedUrlKey", + // "httpMethod": "POST", + // "id": "compute.backendServices.deleteSignedUrlKey", // "parameterOrder": [ // "project", - // "backendBucket" + // "backendService", + // "keyName" // ], // "parameters": { - // "backendBucket": { - // "description": "Name of the BackendBucket resource to update.", + // "backendService": { + // "description": "Name of the BackendService resource to which the Signed URL Key should be added. The name should conform to RFC1035.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "keyName": { + // "description": "The name of the Signed URL Key to delete.", + // "location": "query", // "required": true, // "type": "string" // }, @@ -71911,10 +73750,7 @@ func (c *BackendBucketsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, // "type": "string" // } // }, - // "path": "projects/{project}/global/backendBuckets/{backendBucket}", - // "request": { - // "$ref": "BackendBucket" - // }, + // "path": "projects/{project}/global/backendServices/{backendService}/deleteSignedUrlKey", // "response": { // "$ref": "Operation" // }, @@ -71926,91 +73762,80 @@ func (c *BackendBucketsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, } -// method id "compute.backendServices.addSignedUrlKey": +// method id "compute.backendServices.get": -type BackendServicesAddSignedUrlKeyCall struct { +type BackendServicesGetCall struct { s *Service project string backendService string - signedurlkey *SignedUrlKey urlParams_ gensupport.URLParams + ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// AddSignedUrlKey: Adds a key for validating requests with signed URLs -// for this backend service. +// Get: Returns the specified BackendService resource. // -// - backendService: Name of the BackendService resource to which the -// Signed URL Key should be added. The name should conform to RFC1035. -// - project: Project ID for this request. -func (r *BackendServicesService) AddSignedUrlKey(project string, backendService string, signedurlkey *SignedUrlKey) *BackendServicesAddSignedUrlKeyCall { - c := &BackendServicesAddSignedUrlKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - backendService: Name of the BackendService resource to return. +// - project: Project ID for this request. +func (r *BackendServicesService) Get(project string, backendService string) *BackendServicesGetCall { + c := &BackendServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.backendService = backendService - c.signedurlkey = signedurlkey - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *BackendServicesAddSignedUrlKeyCall) RequestId(requestId string) *BackendServicesAddSignedUrlKeyCall { - c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BackendServicesAddSignedUrlKeyCall) Fields(s ...googleapi.Field) *BackendServicesAddSignedUrlKeyCall { +func (c *BackendServicesGetCall) Fields(s ...googleapi.Field) *BackendServicesGetCall { 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 *BackendServicesGetCall) IfNoneMatch(entityTag string) *BackendServicesGetCall { + 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 *BackendServicesAddSignedUrlKeyCall) Context(ctx context.Context) *BackendServicesAddSignedUrlKeyCall { +func (c *BackendServicesGetCall) Context(ctx context.Context) *BackendServicesGetCall { 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 *BackendServicesAddSignedUrlKeyCall) Header() http.Header { +func (c *BackendServicesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendServicesAddSignedUrlKeyCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendServicesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.signedurlkey) - 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) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}/addSignedUrlKey") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -72022,14 +73847,14 @@ func (c *BackendServicesAddSignedUrlKeyCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendServices.addSignedUrlKey" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx +// Do executes the "compute.backendServices.get" call. +// Exactly one of *BackendService 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 *BackendServicesAddSignedUrlKeyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *BackendService.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 *BackendServicesGetCall) Do(opts ...googleapi.CallOption) (*BackendService, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -72048,7 +73873,7 @@ func (c *BackendServicesAddSignedUrlKeyCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &BackendService{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -72060,18 +73885,19 @@ func (c *BackendServicesAddSignedUrlKeyCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Adds a key for validating requests with signed URLs for this backend service.", - // "flatPath": "projects/{project}/global/backendServices/{backendService}/addSignedUrlKey", - // "httpMethod": "POST", - // "id": "compute.backendServices.addSignedUrlKey", + // "description": "Returns the specified BackendService resource.", + // "flatPath": "projects/{project}/global/backendServices/{backendService}", + // "httpMethod": "GET", + // "id": "compute.backendServices.get", // "parameterOrder": [ // "project", // "backendService" // ], // "parameters": { // "backendService": { - // "description": "Name of the BackendService resource to which the Signed URL Key should be added. The name should conform to RFC1035.", + // "description": "Name of the BackendService resource to return.", // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -72081,213 +73907,110 @@ func (c *BackendServicesAddSignedUrlKeyCall) Do(opts ...googleapi.CallOption) (* // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" // } // }, - // "path": "projects/{project}/global/backendServices/{backendService}/addSignedUrlKey", - // "request": { - // "$ref": "SignedUrlKey" - // }, + // "path": "projects/{project}/global/backendServices/{backendService}", // "response": { - // "$ref": "Operation" + // "$ref": "BackendService" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.backendServices.aggregatedList": - -type BackendServicesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of all BackendService resources, -// regional and global, available to the specified project. -// -// - project: Name of the project scoping this request. -func (r *BackendServicesService) AggregatedList(project string) *BackendServicesAggregatedListCall { - c := &BackendServicesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources -// support two types of filter expressions: expressions that support -// regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a -// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` -// or `:`. For example, if you are filtering Compute Engine instances, -// you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` -// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") -// ``` By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") -// AND (scheduling.automaticRestart = true) ``` If you want to use a -// regular expression, use the `eq` (equal) or `ne` (not equal) operator -// against a single un-parenthesized expression with or without quotes -// or against multiple parenthesized expressions. Examples: `fieldname -// eq unquoted literal` `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" `(fieldname1 eq literal) -// (fieldname2 ne "literal")` The literal value is interpreted as a -// regular expression using Google RE2 library syntax. The literal value -// must match the entire field. For example, to filter for instances -// that do not end with name "instance", you would use `name ne -// .*instance`. -func (c *BackendServicesAggregatedListCall) Filter(filter string) *BackendServicesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": -// Indicates whether every visible scope for each scope type (zone, -// region, global) should be included in the response. For new resource -// types added after this field, the flag has no effect as new resource -// types will always include every visible scope for each scope type in -// response. For resource types which predate this field, if this flag -// is omitted or false, only scopes of the scope types where the -// resource type is expected to be found will be included. -func (c *BackendServicesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *BackendServicesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than `maxResults`, Compute Engine returns -// a `nextPageToken` that can be used to get the next page of results in -// subsequent list requests. Acceptable values are `0` to `500`, -// inclusive. (Default: `500`) -func (c *BackendServicesAggregatedListCall) MaxResults(maxResults int64) *BackendServicesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. You can also sort results in -// descending order based on the creation timestamp using -// `orderBy="creationTimestamp desc". This sorts results based on the -// `creationTimestamp` field in reverse chronological order (newest -// result first). Use this to sort resources like operations so that the -// newest operation is returned first. Currently, only sorting by `name` -// or `creationTimestamp desc` is supported. -func (c *BackendServicesAggregatedListCall) OrderBy(orderBy string) *BackendServicesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set `pageToken` to the `nextPageToken` returned by a -// previous list request to get the next page of results. -func (c *BackendServicesAggregatedListCall) PageToken(pageToken string) *BackendServicesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c +// method id "compute.backendServices.getHealth": + +type BackendServicesGetHealthCall struct { + s *Service + project string + backendService string + resourcegroupreference *ResourceGroupReference + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ReturnPartialSuccess sets the optional parameter -// "returnPartialSuccess": Opt-in for partial success behavior which -// provides partial results in case of failure. The default value is -// false. -func (c *BackendServicesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *BackendServicesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// GetHealth: Gets the most recent health check results for this +// BackendService. Example request body: { "group": +// "/zones/us-east1-b/instanceGroups/lb-backend-example" } +// +// - backendService: Name of the BackendService resource to which the +// queried instance belongs. +// - project: . +func (r *BackendServicesService) GetHealth(project string, backendService string, resourcegroupreference *ResourceGroupReference) *BackendServicesGetHealthCall { + c := &BackendServicesGetHealthCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.backendService = backendService + c.resourcegroupreference = resourcegroupreference 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 *BackendServicesAggregatedListCall) Fields(s ...googleapi.Field) *BackendServicesAggregatedListCall { +func (c *BackendServicesGetHealthCall) Fields(s ...googleapi.Field) *BackendServicesGetHealthCall { 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 *BackendServicesAggregatedListCall) IfNoneMatch(entityTag string) *BackendServicesAggregatedListCall { - 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 *BackendServicesAggregatedListCall) Context(ctx context.Context) *BackendServicesAggregatedListCall { +func (c *BackendServicesGetHealthCall) Context(ctx context.Context) *BackendServicesGetHealthCall { 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 *BackendServicesAggregatedListCall) Header() http.Header { +func (c *BackendServicesGetHealthCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendServicesAggregatedListCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendServicesGetHealthCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.resourcegroupreference) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/backendServices") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}/getHealth") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, + "project": c.project, + "backendService": c.backendService, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendServices.aggregatedList" call. -// Exactly one of *BackendServiceAggregatedList or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *BackendServiceAggregatedList.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "compute.backendServices.getHealth" call. +// Exactly one of *BackendServiceGroupHealth or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *BackendServiceGroupHealth.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 *BackendServicesAggregatedListCall) Do(opts ...googleapi.CallOption) (*BackendServiceAggregatedList, error) { +func (c *BackendServicesGetHealthCall) Do(opts ...googleapi.CallOption) (*BackendServiceGroupHealth, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -72306,7 +74029,7 @@ func (c *BackendServicesAggregatedListCall) Do(opts ...googleapi.CallOption) (*B if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &BackendServiceAggregatedList{ + ret := &BackendServiceGroupHealth{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -72318,58 +74041,35 @@ func (c *BackendServicesAggregatedListCall) Do(opts ...googleapi.CallOption) (*B } return ret, nil // { - // "description": "Retrieves the list of all BackendService resources, regional and global, available to the specified project.", - // "flatPath": "projects/{project}/aggregated/backendServices", - // "httpMethod": "GET", - // "id": "compute.backendServices.aggregatedList", + // "description": "Gets the most recent health check results for this BackendService. Example request body: { \"group\": \"/zones/us-east1-b/instanceGroups/lb-backend-example\" }", + // "flatPath": "projects/{project}/global/backendServices/{backendService}/getHealth", + // "httpMethod": "POST", + // "id": "compute.backendServices.getHealth", // "parameterOrder": [ - // "project" + // "project", + // "backendService" // ], // "parameters": { - // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", - // "location": "query", - // "type": "string" - // }, - // "includeAllScopes": { - // "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", - // "location": "query", - // "type": "boolean" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", - // "location": "query", + // "backendService": { + // "description": "Name of the BackendService resource to which the queried instance belongs.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, // "type": "string" // }, // "project": { - // "description": "Name of the project scoping this request.", // "location": "path", // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" - // }, - // "returnPartialSuccess": { - // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", - // "location": "query", - // "type": "boolean" // } // }, - // "path": "projects/{project}/aggregated/backendServices", + // "path": "projects/{project}/global/backendServices/{backendService}/getHealth", + // "request": { + // "$ref": "ResourceGroupReference" + // }, // "response": { - // "$ref": "BackendServiceAggregatedList" + // "$ref": "BackendServiceGroupHealth" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -72380,122 +74080,107 @@ func (c *BackendServicesAggregatedListCall) Do(opts ...googleapi.CallOption) (*B } -// 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 *BackendServicesAggregatedListCall) Pages(ctx context.Context, f func(*BackendServiceAggregatedList) 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 "compute.backendServices.delete": +// method id "compute.backendServices.getIamPolicy": -type BackendServicesDeleteCall struct { - s *Service - project string - backendService string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type BackendServicesGetIamPolicyCall struct { + s *Service + project string + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified BackendService resource. +// GetIamPolicy: Gets the access control policy for a resource. May be +// empty if no such policy or resource exists. // -// - backendService: Name of the BackendService resource to delete. // - project: Project ID for this request. -func (r *BackendServicesService) Delete(project string, backendService string) *BackendServicesDeleteCall { - c := &BackendServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - resource: Name or id of the resource for this request. +func (r *BackendServicesService) GetIamPolicy(project string, resource string) *BackendServicesGetIamPolicyCall { + c := &BackendServicesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.backendService = backendService + c.resource = resource return c } -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *BackendServicesDeleteCall) RequestId(requestId string) *BackendServicesDeleteCall { - c.urlParams_.Set("requestId", requestId) +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *BackendServicesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *BackendServicesGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BackendServicesDeleteCall) Fields(s ...googleapi.Field) *BackendServicesDeleteCall { +func (c *BackendServicesGetIamPolicyCall) Fields(s ...googleapi.Field) *BackendServicesGetIamPolicyCall { 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 *BackendServicesGetIamPolicyCall) IfNoneMatch(entityTag string) *BackendServicesGetIamPolicyCall { + 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 *BackendServicesDeleteCall) Context(ctx context.Context) *BackendServicesDeleteCall { +func (c *BackendServicesGetIamPolicyCall) Context(ctx context.Context) *BackendServicesGetIamPolicyCall { 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 *BackendServicesDeleteCall) Header() http.Header { +func (c *BackendServicesGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendServicesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendServicesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{resource}/getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendService": c.backendService, + "project": c.project, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendServices.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *BackendServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.backendServices.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *BackendServicesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -72514,7 +74199,7 @@ func (c *BackendServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -72526,21 +74211,20 @@ func (c *BackendServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Deletes the specified BackendService resource.", - // "flatPath": "projects/{project}/global/backendServices/{backendService}", - // "httpMethod": "DELETE", - // "id": "compute.backendServices.delete", + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "flatPath": "projects/{project}/global/backendServices/{resource}/getIamPolicy", + // "httpMethod": "GET", + // "id": "compute.backendServices.getIamPolicy", // "parameterOrder": [ // "project", - // "backendService" + // "resource" // ], // "parameters": { - // "backendService": { - // "description": "Name of the BackendService resource to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" + // "optionsRequestedPolicyVersion": { + // "description": "Requested IAM Policy version.", + // "format": "int32", + // "location": "query", + // "type": "integer" // }, // "project": { // "description": "Project ID for this request.", @@ -72549,47 +74233,47 @@ func (c *BackendServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/global/backendServices/{backendService}", + // "path": "projects/{project}/global/backendServices/{resource}/getIamPolicy", // "response": { - // "$ref": "Operation" + // "$ref": "Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.backendServices.deleteSignedUrlKey": +// method id "compute.backendServices.insert": -type BackendServicesDeleteSignedUrlKeyCall struct { +type BackendServicesInsertCall struct { s *Service project string - backendService string + backendservice *BackendService urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// DeleteSignedUrlKey: Deletes a key for validating requests with signed -// URLs for this backend service. +// Insert: Creates a BackendService resource in the specified project +// using the data included in the request. For more information, see +// Backend services overview . // -// - backendService: Name of the BackendService resource to which the -// Signed URL Key should be added. The name should conform to RFC1035. -// - keyName: The name of the Signed URL Key to delete. -// - project: Project ID for this request. -func (r *BackendServicesService) DeleteSignedUrlKey(project string, backendService string, keyName string) *BackendServicesDeleteSignedUrlKeyCall { - c := &BackendServicesDeleteSignedUrlKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +func (r *BackendServicesService) Insert(project string, backendservice *BackendService) *BackendServicesInsertCall { + c := &BackendServicesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.backendService = backendService - c.urlParams_.Set("keyName", keyName) + c.backendservice = backendservice return c } @@ -72604,7 +74288,7 @@ func (r *BackendServicesService) DeleteSignedUrlKey(project string, backendServi // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *BackendServicesDeleteSignedUrlKeyCall) RequestId(requestId string) *BackendServicesDeleteSignedUrlKeyCall { +func (c *BackendServicesInsertCall) RequestId(requestId string) *BackendServicesInsertCall { c.urlParams_.Set("requestId", requestId) return c } @@ -72612,7 +74296,7 @@ func (c *BackendServicesDeleteSignedUrlKeyCall) RequestId(requestId string) *Bac // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BackendServicesDeleteSignedUrlKeyCall) Fields(s ...googleapi.Field) *BackendServicesDeleteSignedUrlKeyCall { +func (c *BackendServicesInsertCall) Fields(s ...googleapi.Field) *BackendServicesInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -72620,21 +74304,21 @@ func (c *BackendServicesDeleteSignedUrlKeyCall) Fields(s ...googleapi.Field) *Ba // 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 *BackendServicesDeleteSignedUrlKeyCall) Context(ctx context.Context) *BackendServicesDeleteSignedUrlKeyCall { +func (c *BackendServicesInsertCall) Context(ctx context.Context) *BackendServicesInsertCall { 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 *BackendServicesDeleteSignedUrlKeyCall) Header() http.Header { +func (c *BackendServicesInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendServicesDeleteSignedUrlKeyCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendServicesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -72642,9 +74326,14 @@ func (c *BackendServicesDeleteSignedUrlKeyCall) doRequest(alt string) (*http.Res } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}/deleteSignedUrlKey") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -72652,20 +74341,19 @@ func (c *BackendServicesDeleteSignedUrlKeyCall) doRequest(alt string) (*http.Res } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendService": c.backendService, + "project": c.project, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendServices.deleteSignedUrlKey" call. +// Do executes the "compute.backendServices.insert" 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 *BackendServicesDeleteSignedUrlKeyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *BackendServicesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -72696,28 +74384,14 @@ func (c *BackendServicesDeleteSignedUrlKeyCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Deletes a key for validating requests with signed URLs for this backend service.", - // "flatPath": "projects/{project}/global/backendServices/{backendService}/deleteSignedUrlKey", + // "description": "Creates a BackendService resource in the specified project using the data included in the request. For more information, see Backend services overview .", + // "flatPath": "projects/{project}/global/backendServices", // "httpMethod": "POST", - // "id": "compute.backendServices.deleteSignedUrlKey", + // "id": "compute.backendServices.insert", // "parameterOrder": [ - // "project", - // "backendService", - // "keyName" + // "project" // ], // "parameters": { - // "backendService": { - // "description": "Name of the BackendService resource to which the Signed URL Key should be added. The name should conform to RFC1035.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "keyName": { - // "description": "The name of the Signed URL Key to delete.", - // "location": "query", - // "required": true, - // "type": "string" - // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -72731,7 +74405,10 @@ func (c *BackendServicesDeleteSignedUrlKeyCall) Do(opts ...googleapi.CallOption) // "type": "string" // } // }, - // "path": "projects/{project}/global/backendServices/{backendService}/deleteSignedUrlKey", + // "path": "projects/{project}/global/backendServices", + // "request": { + // "$ref": "BackendService" + // }, // "response": { // "$ref": "Operation" // }, @@ -72743,33 +74420,113 @@ func (c *BackendServicesDeleteSignedUrlKeyCall) Do(opts ...googleapi.CallOption) } -// method id "compute.backendServices.get": +// method id "compute.backendServices.list": -type BackendServicesGetCall struct { - s *Service - project string - backendService string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type BackendServicesListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified BackendService resource. +// List: Retrieves the list of BackendService resources available to the +// specified project. // -// - backendService: Name of the BackendService resource to return. // - project: Project ID for this request. -func (r *BackendServicesService) Get(project string, backendService string) *BackendServicesGetCall { - c := &BackendServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *BackendServicesService) List(project string) *BackendServicesListCall { + c := &BackendServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.backendService = backendService + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources +// support two types of filter expressions: expressions that support +// regular expressions and expressions that follow API improvement +// proposal AIP-160. If you want to use AIP-160, your expression must +// specify the field name, an operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` +// or `:`. For example, if you are filtering Compute Engine instances, +// you can exclude instances named `example-instance` by specifying +// `name != example-instance`. The `:` operator can be used with string +// fields to match substrings. For non-string fields it is equivalent to +// the `=` operator. The `:*` comparison can be used to test whether a +// key has been defined. For example, to find all objects with `owner` +// label use: ``` labels.owner:* ``` You can also filter nested fields. +// For example, you could specify `scheduling.automaticRestart = false` +// to include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` If you want to use a +// regular expression, use the `eq` (equal) or `ne` (not equal) operator +// against a single un-parenthesized expression with or without quotes +// or against multiple parenthesized expressions. Examples: `fieldname +// eq unquoted literal` `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" `(fieldname1 eq literal) +// (fieldname2 ne "literal")` The literal value is interpreted as a +// regular expression using Google RE2 library syntax. The literal value +// must match the entire field. For example, to filter for instances +// that do not end with name "instance", you would use `name ne +// .*instance`. +func (c *BackendServicesListCall) Filter(filter string) *BackendServicesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *BackendServicesListCall) MaxResults(maxResults int64) *BackendServicesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *BackendServicesListCall) OrderBy(orderBy string) *BackendServicesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *BackendServicesListCall) PageToken(pageToken string) *BackendServicesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *BackendServicesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *BackendServicesListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) 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 *BackendServicesGetCall) Fields(s ...googleapi.Field) *BackendServicesGetCall { +func (c *BackendServicesListCall) Fields(s ...googleapi.Field) *BackendServicesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -72779,7 +74536,7 @@ func (c *BackendServicesGetCall) Fields(s ...googleapi.Field) *BackendServicesGe // 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 *BackendServicesGetCall) IfNoneMatch(entityTag string) *BackendServicesGetCall { +func (c *BackendServicesListCall) IfNoneMatch(entityTag string) *BackendServicesListCall { c.ifNoneMatch_ = entityTag return c } @@ -72787,21 +74544,21 @@ func (c *BackendServicesGetCall) IfNoneMatch(entityTag string) *BackendServicesG // 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 *BackendServicesGetCall) Context(ctx context.Context) *BackendServicesGetCall { +func (c *BackendServicesListCall) Context(ctx context.Context) *BackendServicesListCall { 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 *BackendServicesGetCall) Header() http.Header { +func (c *BackendServicesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendServicesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendServicesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -72814,7 +74571,7 @@ func (c *BackendServicesGetCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -72822,20 +74579,19 @@ func (c *BackendServicesGetCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendService": c.backendService, + "project": c.project, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendServices.get" call. -// Exactly one of *BackendService or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *BackendService.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use +// Do executes the "compute.backendServices.list" call. +// Exactly one of *BackendServiceList or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *BackendServiceList.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 *BackendServicesGetCall) Do(opts ...googleapi.CallOption) (*BackendService, error) { +func (c *BackendServicesListCall) Do(opts ...googleapi.CallOption) (*BackendServiceList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -72854,7 +74610,7 @@ func (c *BackendServicesGetCall) Do(opts ...googleapi.CallOption) (*BackendServi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &BackendService{ + ret := &BackendServiceList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -72866,20 +74622,35 @@ func (c *BackendServicesGetCall) Do(opts ...googleapi.CallOption) (*BackendServi } return ret, nil // { - // "description": "Returns the specified BackendService resource.", - // "flatPath": "projects/{project}/global/backendServices/{backendService}", + // "description": "Retrieves the list of BackendService resources available to the specified project.", + // "flatPath": "projects/{project}/global/backendServices", // "httpMethod": "GET", - // "id": "compute.backendServices.get", + // "id": "compute.backendServices.list", // "parameterOrder": [ - // "project", - // "backendService" + // "project" // ], // "parameters": { - // "backendService": { - // "description": "Name of the BackendService resource to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", // "type": "string" // }, // "project": { @@ -72888,11 +74659,16 @@ func (c *BackendServicesGetCall) Do(opts ...googleapi.CallOption) (*BackendServi // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "location": "query", + // "type": "boolean" // } // }, - // "path": "projects/{project}/global/backendServices/{backendService}", + // "path": "projects/{project}/global/backendServices", // "response": { - // "$ref": "BackendService" + // "$ref": "BackendServiceList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -72903,37 +74679,74 @@ func (c *BackendServicesGetCall) Do(opts ...googleapi.CallOption) (*BackendServi } -// method id "compute.backendServices.getHealth": +// 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 *BackendServicesListCall) Pages(ctx context.Context, f func(*BackendServiceList) 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 BackendServicesGetHealthCall struct { - s *Service - project string - backendService string - resourcegroupreference *ResourceGroupReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "compute.backendServices.patch": + +type BackendServicesPatchCall struct { + s *Service + project string + backendService string + backendservice *BackendService + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetHealth: Gets the most recent health check results for this -// BackendService. Example request body: { "group": -// "/zones/us-east1-b/instanceGroups/lb-backend-example" } +// Patch: Patches the specified BackendService resource with the data +// included in the request. For more information, see Backend services +// overview. This method supports PATCH semantics and uses the JSON +// merge patch format and processing rules. // -// - backendService: Name of the BackendService resource to which the -// queried instance belongs. -// - project: . -func (r *BackendServicesService) GetHealth(project string, backendService string, resourcegroupreference *ResourceGroupReference) *BackendServicesGetHealthCall { - c := &BackendServicesGetHealthCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - backendService: Name of the BackendService resource to patch. +// - project: Project ID for this request. +func (r *BackendServicesService) Patch(project string, backendService string, backendservice *BackendService) *BackendServicesPatchCall { + c := &BackendServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.backendService = backendService - c.resourcegroupreference = resourcegroupreference + c.backendservice = backendservice + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *BackendServicesPatchCall) RequestId(requestId string) *BackendServicesPatchCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BackendServicesGetHealthCall) Fields(s ...googleapi.Field) *BackendServicesGetHealthCall { +func (c *BackendServicesPatchCall) Fields(s ...googleapi.Field) *BackendServicesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -72941,21 +74754,21 @@ func (c *BackendServicesGetHealthCall) Fields(s ...googleapi.Field) *BackendServ // 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 *BackendServicesGetHealthCall) Context(ctx context.Context) *BackendServicesGetHealthCall { +func (c *BackendServicesPatchCall) Context(ctx context.Context) *BackendServicesPatchCall { 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 *BackendServicesGetHealthCall) Header() http.Header { +func (c *BackendServicesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendServicesGetHealthCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendServicesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -72963,16 +74776,16 @@ func (c *BackendServicesGetHealthCall) doRequest(alt string) (*http.Response, er } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.resourcegroupreference) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}/getHealth") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -72984,14 +74797,14 @@ func (c *BackendServicesGetHealthCall) doRequest(alt string) (*http.Response, er return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendServices.getHealth" call. -// Exactly one of *BackendServiceGroupHealth or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *BackendServiceGroupHealth.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 *BackendServicesGetHealthCall) Do(opts ...googleapi.CallOption) (*BackendServiceGroupHealth, error) { +// Do executes the "compute.backendServices.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *BackendServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -73010,7 +74823,7 @@ func (c *BackendServicesGetHealthCall) Do(opts ...googleapi.CallOption) (*Backen if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &BackendServiceGroupHealth{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -73022,146 +74835,155 @@ func (c *BackendServicesGetHealthCall) Do(opts ...googleapi.CallOption) (*Backen } return ret, nil // { - // "description": "Gets the most recent health check results for this BackendService. Example request body: { \"group\": \"/zones/us-east1-b/instanceGroups/lb-backend-example\" }", - // "flatPath": "projects/{project}/global/backendServices/{backendService}/getHealth", - // "httpMethod": "POST", - // "id": "compute.backendServices.getHealth", + // "description": "Patches the specified BackendService resource with the data included in the request. For more information, see Backend services overview. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "flatPath": "projects/{project}/global/backendServices/{backendService}", + // "httpMethod": "PATCH", + // "id": "compute.backendServices.patch", // "parameterOrder": [ // "project", // "backendService" // ], // "parameters": { // "backendService": { - // "description": "Name of the BackendService resource to which the queried instance belongs.", + // "description": "Name of the BackendService resource to patch.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, // "project": { + // "description": "Project ID for this request.", // "location": "path", // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" // } // }, - // "path": "projects/{project}/global/backendServices/{backendService}/getHealth", + // "path": "projects/{project}/global/backendServices/{backendService}", // "request": { - // "$ref": "ResourceGroupReference" + // "$ref": "BackendService" // }, // "response": { - // "$ref": "BackendServiceGroupHealth" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.backendServices.getIamPolicy": +// method id "compute.backendServices.setEdgeSecurityPolicy": -type BackendServicesGetIamPolicyCall struct { - s *Service - project string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type BackendServicesSetEdgeSecurityPolicyCall struct { + s *Service + project string + backendService string + securitypolicyreference *SecurityPolicyReference + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. +// SetEdgeSecurityPolicy: Sets the edge security policy for the +// specified backend service. // -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *BackendServicesService) GetIamPolicy(project string, resource string) *BackendServicesGetIamPolicyCall { - c := &BackendServicesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - backendService: Name of the BackendService resource to which the +// edge security policy should be set. The name should conform to +// RFC1035. +// - project: Project ID for this request. +func (r *BackendServicesService) SetEdgeSecurityPolicy(project string, backendService string, securitypolicyreference *SecurityPolicyReference) *BackendServicesSetEdgeSecurityPolicyCall { + c := &BackendServicesSetEdgeSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.resource = resource + c.backendService = backendService + c.securitypolicyreference = securitypolicyreference return c } -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *BackendServicesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *BackendServicesGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *BackendServicesSetEdgeSecurityPolicyCall) RequestId(requestId string) *BackendServicesSetEdgeSecurityPolicyCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BackendServicesGetIamPolicyCall) Fields(s ...googleapi.Field) *BackendServicesGetIamPolicyCall { +func (c *BackendServicesSetEdgeSecurityPolicyCall) Fields(s ...googleapi.Field) *BackendServicesSetEdgeSecurityPolicyCall { 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 *BackendServicesGetIamPolicyCall) IfNoneMatch(entityTag string) *BackendServicesGetIamPolicyCall { - 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 *BackendServicesGetIamPolicyCall) Context(ctx context.Context) *BackendServicesGetIamPolicyCall { +func (c *BackendServicesSetEdgeSecurityPolicyCall) Context(ctx context.Context) *BackendServicesSetEdgeSecurityPolicyCall { 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 *BackendServicesGetIamPolicyCall) Header() http.Header { +func (c *BackendServicesSetEdgeSecurityPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendServicesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendServicesSetEdgeSecurityPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.securitypolicyreference) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{resource}/getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}/setEdgeSecurityPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, + "project": c.project, + "backendService": c.backendService, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendServices.getIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *BackendServicesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// Do executes the "compute.backendServices.setEdgeSecurityPolicy" 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 *BackendServicesSetEdgeSecurityPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -73180,7 +75002,7 @@ func (c *BackendServicesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Pol if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -73192,20 +75014,20 @@ func (c *BackendServicesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Pol } return ret, nil // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", - // "flatPath": "projects/{project}/global/backendServices/{resource}/getIamPolicy", - // "httpMethod": "GET", - // "id": "compute.backendServices.getIamPolicy", + // "description": "Sets the edge security policy for the specified backend service.", + // "flatPath": "projects/{project}/global/backendServices/{backendService}/setEdgeSecurityPolicy", + // "httpMethod": "POST", + // "id": "compute.backendServices.setEdgeSecurityPolicy", // "parameterOrder": [ // "project", - // "resource" + // "backendService" // ], // "parameters": { - // "optionsRequestedPolicyVersion": { - // "description": "Requested IAM Policy version.", - // "format": "int32", - // "location": "query", - // "type": "integer" + // "backendService": { + // "description": "Name of the BackendService resource to which the edge security policy should be set. The name should conform to RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" // }, // "project": { // "description": "Project ID for this request.", @@ -73214,70 +75036,56 @@ func (c *BackendServicesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Pol // "required": true, // "type": "string" // }, - // "resource": { - // "description": "Name or id of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", // "type": "string" // } // }, - // "path": "projects/{project}/global/backendServices/{resource}/getIamPolicy", + // "path": "projects/{project}/global/backendServices/{backendService}/setEdgeSecurityPolicy", + // "request": { + // "$ref": "SecurityPolicyReference" + // }, // "response": { - // "$ref": "Policy" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.backendServices.insert": +// method id "compute.backendServices.setIamPolicy": -type BackendServicesInsertCall struct { - s *Service - project string - backendservice *BackendService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type BackendServicesSetIamPolicyCall struct { + s *Service + project string + resource string + globalsetpolicyrequest *GlobalSetPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Insert: Creates a BackendService resource in the specified project -// using the data included in the request. For more information, see -// Backend services overview . +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. // // - project: Project ID for this request. -func (r *BackendServicesService) Insert(project string, backendservice *BackendService) *BackendServicesInsertCall { - c := &BackendServicesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - resource: Name or id of the resource for this request. +func (r *BackendServicesService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *BackendServicesSetIamPolicyCall { + c := &BackendServicesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.backendservice = backendservice - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *BackendServicesInsertCall) RequestId(requestId string) *BackendServicesInsertCall { - c.urlParams_.Set("requestId", requestId) + c.resource = resource + c.globalsetpolicyrequest = globalsetpolicyrequest 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 *BackendServicesInsertCall) Fields(s ...googleapi.Field) *BackendServicesInsertCall { +func (c *BackendServicesSetIamPolicyCall) Fields(s ...googleapi.Field) *BackendServicesSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -73285,21 +75093,21 @@ func (c *BackendServicesInsertCall) Fields(s ...googleapi.Field) *BackendService // 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 *BackendServicesInsertCall) Context(ctx context.Context) *BackendServicesInsertCall { +func (c *BackendServicesSetIamPolicyCall) Context(ctx context.Context) *BackendServicesSetIamPolicyCall { 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 *BackendServicesInsertCall) Header() http.Header { +func (c *BackendServicesSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendServicesInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendServicesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -73307,14 +75115,14 @@ func (c *BackendServicesInsertCall) doRequest(alt string) (*http.Response, error } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetpolicyrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{resource}/setIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -73322,19 +75130,20 @@ func (c *BackendServicesInsertCall) doRequest(alt string) (*http.Response, error } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, + "project": c.project, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendServices.insert" 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 *BackendServicesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.backendServices.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *BackendServicesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -73353,7 +75162,7 @@ func (c *BackendServicesInsertCall) Do(opts ...googleapi.CallOption) (*Operation if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -73365,12 +75174,13 @@ func (c *BackendServicesInsertCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Creates a BackendService resource in the specified project using the data included in the request. For more information, see Backend services overview .", - // "flatPath": "projects/{project}/global/backendServices", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "flatPath": "projects/{project}/global/backendServices/{resource}/setIamPolicy", // "httpMethod": "POST", - // "id": "compute.backendServices.insert", + // "id": "compute.backendServices.setIamPolicy", // "parameterOrder": [ - // "project" + // "project", + // "resource" // ], // "parameters": { // "project": { @@ -73380,18 +75190,20 @@ func (c *BackendServicesInsertCall) Do(opts ...googleapi.CallOption) (*Operation // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/global/backendServices", + // "path": "projects/{project}/global/backendServices/{resource}/setIamPolicy", // "request": { - // "$ref": "BackendService" + // "$ref": "GlobalSetPolicyRequest" // }, // "response": { - // "$ref": "Operation" + // "$ref": "Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -73401,178 +75213,111 @@ func (c *BackendServicesInsertCall) Do(opts ...googleapi.CallOption) (*Operation } -// method id "compute.backendServices.list": - -type BackendServicesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of BackendService resources available to the -// specified project. -// -// - project: Project ID for this request. -func (r *BackendServicesService) List(project string) *BackendServicesListCall { - c := &BackendServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources -// support two types of filter expressions: expressions that support -// regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a -// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` -// or `:`. For example, if you are filtering Compute Engine instances, -// you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` -// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") -// ``` By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") -// AND (scheduling.automaticRestart = true) ``` If you want to use a -// regular expression, use the `eq` (equal) or `ne` (not equal) operator -// against a single un-parenthesized expression with or without quotes -// or against multiple parenthesized expressions. Examples: `fieldname -// eq unquoted literal` `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" `(fieldname1 eq literal) -// (fieldname2 ne "literal")` The literal value is interpreted as a -// regular expression using Google RE2 library syntax. The literal value -// must match the entire field. For example, to filter for instances -// that do not end with name "instance", you would use `name ne -// .*instance`. -func (c *BackendServicesListCall) Filter(filter string) *BackendServicesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than `maxResults`, Compute Engine returns -// a `nextPageToken` that can be used to get the next page of results in -// subsequent list requests. Acceptable values are `0` to `500`, -// inclusive. (Default: `500`) -func (c *BackendServicesListCall) MaxResults(maxResults int64) *BackendServicesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} +// method id "compute.backendServices.setSecurityPolicy": -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. You can also sort results in -// descending order based on the creation timestamp using -// `orderBy="creationTimestamp desc". This sorts results based on the -// `creationTimestamp` field in reverse chronological order (newest -// result first). Use this to sort resources like operations so that the -// newest operation is returned first. Currently, only sorting by `name` -// or `creationTimestamp desc` is supported. -func (c *BackendServicesListCall) OrderBy(orderBy string) *BackendServicesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c +type BackendServicesSetSecurityPolicyCall struct { + s *Service + project string + backendService string + securitypolicyreference *SecurityPolicyReference + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set `pageToken` to the `nextPageToken` returned by a -// previous list request to get the next page of results. -func (c *BackendServicesListCall) PageToken(pageToken string) *BackendServicesListCall { - c.urlParams_.Set("pageToken", pageToken) + +// SetSecurityPolicy: Sets the Google Cloud Armor security policy for +// the specified backend service. For more information, see Google Cloud +// Armor Overview +// +// - backendService: Name of the BackendService resource to which the +// security policy should be set. The name should conform to RFC1035. +// - project: Project ID for this request. +func (r *BackendServicesService) SetSecurityPolicy(project string, backendService string, securitypolicyreference *SecurityPolicyReference) *BackendServicesSetSecurityPolicyCall { + c := &BackendServicesSetSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.backendService = backendService + c.securitypolicyreference = securitypolicyreference return c } -// ReturnPartialSuccess sets the optional parameter -// "returnPartialSuccess": Opt-in for partial success behavior which -// provides partial results in case of failure. The default value is -// false. -func (c *BackendServicesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *BackendServicesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *BackendServicesSetSecurityPolicyCall) RequestId(requestId string) *BackendServicesSetSecurityPolicyCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BackendServicesListCall) Fields(s ...googleapi.Field) *BackendServicesListCall { +func (c *BackendServicesSetSecurityPolicyCall) Fields(s ...googleapi.Field) *BackendServicesSetSecurityPolicyCall { 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 *BackendServicesListCall) IfNoneMatch(entityTag string) *BackendServicesListCall { - 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 *BackendServicesListCall) Context(ctx context.Context) *BackendServicesListCall { +func (c *BackendServicesSetSecurityPolicyCall) Context(ctx context.Context) *BackendServicesSetSecurityPolicyCall { 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 *BackendServicesListCall) Header() http.Header { +func (c *BackendServicesSetSecurityPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendServicesListCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendServicesSetSecurityPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.securitypolicyreference) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}/setSecurityPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, + "project": c.project, + "backendService": c.backendService, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendServices.list" call. -// Exactly one of *BackendServiceList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *BackendServiceList.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 *BackendServicesListCall) Do(opts ...googleapi.CallOption) (*BackendServiceList, error) { +// Do executes the "compute.backendServices.setSecurityPolicy" 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 *BackendServicesSetSecurityPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -73591,7 +75336,7 @@ func (c *BackendServicesListCall) Do(opts ...googleapi.CallOption) (*BackendServ if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &BackendServiceList{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -73603,35 +75348,19 @@ func (c *BackendServicesListCall) Do(opts ...googleapi.CallOption) (*BackendServ } return ret, nil // { - // "description": "Retrieves the list of BackendService resources available to the specified project.", - // "flatPath": "projects/{project}/global/backendServices", - // "httpMethod": "GET", - // "id": "compute.backendServices.list", + // "description": "Sets the Google Cloud Armor security policy for the specified backend service. For more information, see Google Cloud Armor Overview", + // "flatPath": "projects/{project}/global/backendServices/{backendService}/setSecurityPolicy", + // "httpMethod": "POST", + // "id": "compute.backendServices.setSecurityPolicy", // "parameterOrder": [ - // "project" + // "project", + // "backendService" // ], // "parameters": { - // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", - // "location": "query", + // "backendService": { + // "description": "Name of the BackendService resource to which the security policy should be set. The name should conform to RFC1035.", + // "location": "path", + // "required": true, // "type": "string" // }, // "project": { @@ -73641,93 +75370,56 @@ func (c *BackendServicesListCall) Do(opts ...googleapi.CallOption) (*BackendServ // "required": true, // "type": "string" // }, - // "returnPartialSuccess": { - // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", - // "type": "boolean" + // "type": "string" // } // }, - // "path": "projects/{project}/global/backendServices", + // "path": "projects/{project}/global/backendServices/{backendService}/setSecurityPolicy", + // "request": { + // "$ref": "SecurityPolicyReference" + // }, // "response": { - // "$ref": "BackendServiceList" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// 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 *BackendServicesListCall) Pages(ctx context.Context, f func(*BackendServiceList) 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 "compute.backendServices.patch": +// method id "compute.backendServices.testIamPermissions": -type BackendServicesPatchCall struct { - s *Service - project string - backendService string - backendservice *BackendService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type BackendServicesTestIamPermissionsCall struct { + s *Service + project string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Patches the specified BackendService resource with the data -// included in the request. For more information, see Backend services -// overview. This method supports PATCH semantics and uses the JSON -// merge patch format and processing rules. +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. // -// - backendService: Name of the BackendService resource to patch. // - project: Project ID for this request. -func (r *BackendServicesService) Patch(project string, backendService string, backendservice *BackendService) *BackendServicesPatchCall { - c := &BackendServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - resource: Name or id of the resource for this request. +func (r *BackendServicesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *BackendServicesTestIamPermissionsCall { + c := &BackendServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.backendService = backendService - c.backendservice = backendservice - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *BackendServicesPatchCall) RequestId(requestId string) *BackendServicesPatchCall { - c.urlParams_.Set("requestId", requestId) + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest 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 *BackendServicesPatchCall) Fields(s ...googleapi.Field) *BackendServicesPatchCall { +func (c *BackendServicesTestIamPermissionsCall) Fields(s ...googleapi.Field) *BackendServicesTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -73735,21 +75427,21 @@ func (c *BackendServicesPatchCall) Fields(s ...googleapi.Field) *BackendServices // 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 *BackendServicesPatchCall) Context(ctx context.Context) *BackendServicesPatchCall { +func (c *BackendServicesTestIamPermissionsCall) Context(ctx context.Context) *BackendServicesTestIamPermissionsCall { 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 *BackendServicesPatchCall) Header() http.Header { +func (c *BackendServicesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendServicesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendServicesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -73757,35 +75449,35 @@ func (c *BackendServicesPatchCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendService": c.backendService, + "project": c.project, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendServices.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *BackendServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.backendServices.testIamPermissions" call. +// Exactly one of *TestPermissionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.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 *BackendServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -73804,7 +75496,7 @@ func (c *BackendServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &TestPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -73816,22 +75508,15 @@ func (c *BackendServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Patches the specified BackendService resource with the data included in the request. For more information, see Backend services overview. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "flatPath": "projects/{project}/global/backendServices/{backendService}", - // "httpMethod": "PATCH", - // "id": "compute.backendServices.patch", + // "description": "Returns permissions that a caller has on the specified resource.", + // "flatPath": "projects/{project}/global/backendServices/{resource}/testIamPermissions", + // "httpMethod": "POST", + // "id": "compute.backendServices.testIamPermissions", // "parameterOrder": [ // "project", - // "backendService" + // "resource" // ], // "parameters": { - // "backendService": { - // "description": "Name of the BackendService resource to patch.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" - // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -73839,51 +75524,53 @@ func (c *BackendServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/global/backendServices/{backendService}", + // "path": "projects/{project}/global/backendServices/{resource}/testIamPermissions", // "request": { - // "$ref": "BackendService" + // "$ref": "TestPermissionsRequest" // }, // "response": { - // "$ref": "Operation" + // "$ref": "TestPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.backendServices.setEdgeSecurityPolicy": +// method id "compute.backendServices.update": -type BackendServicesSetEdgeSecurityPolicyCall struct { - s *Service - project string - backendService string - securitypolicyreference *SecurityPolicyReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type BackendServicesUpdateCall struct { + s *Service + project string + backendService string + backendservice *BackendService + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetEdgeSecurityPolicy: Sets the edge security policy for the -// specified backend service. +// Update: Updates the specified BackendService resource with the data +// included in the request. For more information, see Backend services +// overview. // -// - backendService: Name of the BackendService resource to which the -// edge security policy should be set. The name should conform to -// RFC1035. -// - project: Project ID for this request. -func (r *BackendServicesService) SetEdgeSecurityPolicy(project string, backendService string, securitypolicyreference *SecurityPolicyReference) *BackendServicesSetEdgeSecurityPolicyCall { - c := &BackendServicesSetEdgeSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - backendService: Name of the BackendService resource to update. +// - project: Project ID for this request. +func (r *BackendServicesService) Update(project string, backendService string, backendservice *BackendService) *BackendServicesUpdateCall { + c := &BackendServicesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.backendService = backendService - c.securitypolicyreference = securitypolicyreference + c.backendservice = backendservice return c } @@ -73898,7 +75585,7 @@ func (r *BackendServicesService) SetEdgeSecurityPolicy(project string, backendSe // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *BackendServicesSetEdgeSecurityPolicyCall) RequestId(requestId string) *BackendServicesSetEdgeSecurityPolicyCall { +func (c *BackendServicesUpdateCall) RequestId(requestId string) *BackendServicesUpdateCall { c.urlParams_.Set("requestId", requestId) return c } @@ -73906,7 +75593,7 @@ func (c *BackendServicesSetEdgeSecurityPolicyCall) RequestId(requestId string) * // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BackendServicesSetEdgeSecurityPolicyCall) Fields(s ...googleapi.Field) *BackendServicesSetEdgeSecurityPolicyCall { +func (c *BackendServicesUpdateCall) Fields(s ...googleapi.Field) *BackendServicesUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -73914,21 +75601,21 @@ func (c *BackendServicesSetEdgeSecurityPolicyCall) Fields(s ...googleapi.Field) // 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 *BackendServicesSetEdgeSecurityPolicyCall) Context(ctx context.Context) *BackendServicesSetEdgeSecurityPolicyCall { +func (c *BackendServicesUpdateCall) Context(ctx context.Context) *BackendServicesUpdateCall { 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 *BackendServicesSetEdgeSecurityPolicyCall) Header() http.Header { +func (c *BackendServicesUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendServicesSetEdgeSecurityPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *BackendServicesUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -73936,16 +75623,16 @@ func (c *BackendServicesSetEdgeSecurityPolicyCall) doRequest(alt string) (*http. } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.securitypolicyreference) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}/setEdgeSecurityPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PUT", urls, body) if err != nil { return nil, err } @@ -73957,14 +75644,14 @@ func (c *BackendServicesSetEdgeSecurityPolicyCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendServices.setEdgeSecurityPolicy" call. +// Do executes the "compute.backendServices.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 *BackendServicesSetEdgeSecurityPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *BackendServicesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -73995,18 +75682,19 @@ func (c *BackendServicesSetEdgeSecurityPolicyCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Sets the edge security policy for the specified backend service.", - // "flatPath": "projects/{project}/global/backendServices/{backendService}/setEdgeSecurityPolicy", - // "httpMethod": "POST", - // "id": "compute.backendServices.setEdgeSecurityPolicy", + // "description": "Updates the specified BackendService resource with the data included in the request. For more information, see Backend services overview.", + // "flatPath": "projects/{project}/global/backendServices/{backendService}", + // "httpMethod": "PUT", + // "id": "compute.backendServices.update", // "parameterOrder": [ // "project", // "backendService" // ], // "parameters": { // "backendService": { - // "description": "Name of the BackendService resource to which the edge security policy should be set. The name should conform to RFC1035.", + // "description": "Name of the BackendService resource to update.", // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -74023,9 +75711,9 @@ func (c *BackendServicesSetEdgeSecurityPolicyCall) Do(opts ...googleapi.CallOpti // "type": "string" // } // }, - // "path": "projects/{project}/global/backendServices/{backendService}/setEdgeSecurityPolicy", + // "path": "projects/{project}/global/backendServices/{backendService}", // "request": { - // "$ref": "SecurityPolicyReference" + // "$ref": "BackendService" // }, // "response": { // "$ref": "Operation" @@ -74038,93 +75726,190 @@ func (c *BackendServicesSetEdgeSecurityPolicyCall) Do(opts ...googleapi.CallOpti } -// method id "compute.backendServices.setIamPolicy": +// method id "compute.diskTypes.aggregatedList": -type BackendServicesSetIamPolicyCall struct { - s *Service - project string - resource string - globalsetpolicyrequest *GlobalSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type DiskTypesAggregatedListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. +// AggregatedList: Retrieves an aggregated list of disk types. // // - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *BackendServicesService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *BackendServicesSetIamPolicyCall { - c := &BackendServicesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *DiskTypesService) AggregatedList(project string) *DiskTypesAggregatedListCall { + c := &DiskTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.resource = resource - c.globalsetpolicyrequest = globalsetpolicyrequest + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources +// support two types of filter expressions: expressions that support +// regular expressions and expressions that follow API improvement +// proposal AIP-160. If you want to use AIP-160, your expression must +// specify the field name, an operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` +// or `:`. For example, if you are filtering Compute Engine instances, +// you can exclude instances named `example-instance` by specifying +// `name != example-instance`. The `:` operator can be used with string +// fields to match substrings. For non-string fields it is equivalent to +// the `=` operator. The `:*` comparison can be used to test whether a +// key has been defined. For example, to find all objects with `owner` +// label use: ``` labels.owner:* ``` You can also filter nested fields. +// For example, you could specify `scheduling.automaticRestart = false` +// to include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` If you want to use a +// regular expression, use the `eq` (equal) or `ne` (not equal) operator +// against a single un-parenthesized expression with or without quotes +// or against multiple parenthesized expressions. Examples: `fieldname +// eq unquoted literal` `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" `(fieldname1 eq literal) +// (fieldname2 ne "literal")` The literal value is interpreted as a +// regular expression using Google RE2 library syntax. The literal value +// must match the entire field. For example, to filter for instances +// that do not end with name "instance", you would use `name ne +// .*instance`. +func (c *DiskTypesAggregatedListCall) Filter(filter string) *DiskTypesAggregatedListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// IncludeAllScopes sets the optional parameter "includeAllScopes": +// Indicates whether every visible scope for each scope type (zone, +// region, global) should be included in the response. For new resource +// types added after this field, the flag has no effect as new resource +// types will always include every visible scope for each scope type in +// response. For resource types which predate this field, if this flag +// is omitted or false, only scopes of the scope types where the +// resource type is expected to be found will be included. +func (c *DiskTypesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *DiskTypesAggregatedListCall { + c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *DiskTypesAggregatedListCall) MaxResults(maxResults int64) *DiskTypesAggregatedListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *DiskTypesAggregatedListCall) OrderBy(orderBy string) *DiskTypesAggregatedListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *DiskTypesAggregatedListCall) PageToken(pageToken string) *DiskTypesAggregatedListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *DiskTypesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *DiskTypesAggregatedListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) 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 *BackendServicesSetIamPolicyCall) Fields(s ...googleapi.Field) *BackendServicesSetIamPolicyCall { +func (c *DiskTypesAggregatedListCall) Fields(s ...googleapi.Field) *DiskTypesAggregatedListCall { 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 *DiskTypesAggregatedListCall) IfNoneMatch(entityTag string) *DiskTypesAggregatedListCall { + 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 *BackendServicesSetIamPolicyCall) Context(ctx context.Context) *BackendServicesSetIamPolicyCall { +func (c *DiskTypesAggregatedListCall) Context(ctx context.Context) *DiskTypesAggregatedListCall { 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 *BackendServicesSetIamPolicyCall) Header() http.Header { +func (c *DiskTypesAggregatedListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendServicesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *DiskTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetpolicyrequest) - 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) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{resource}/setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/diskTypes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, + "project": c.project, }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.backendServices.setIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *BackendServicesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.diskTypes.aggregatedList" call. +// Exactly one of *DiskTypeAggregatedList or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *DiskTypeAggregatedList.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 *DiskTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*DiskTypeAggregatedList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -74143,7 +75928,7 @@ func (c *BackendServicesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Pol if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &DiskTypeAggregatedList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -74155,15 +75940,42 @@ func (c *BackendServicesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Pol } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", - // "flatPath": "projects/{project}/global/backendServices/{resource}/setIamPolicy", - // "httpMethod": "POST", - // "id": "compute.backendServices.setIamPolicy", + // "description": "Retrieves an aggregated list of disk types.", + // "flatPath": "projects/{project}/aggregated/diskTypes", + // "httpMethod": "GET", + // "id": "compute.diskTypes.aggregatedList", // "parameterOrder": [ - // "project", - // "resource" + // "project" // ], // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "location": "query", + // "type": "string" + // }, + // "includeAllScopes": { + // "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", + // "location": "query", + // "type": "boolean" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -74171,134 +75983,143 @@ func (c *BackendServicesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Pol // "required": true, // "type": "string" // }, - // "resource": { - // "description": "Name or id of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "location": "query", + // "type": "boolean" // } // }, - // "path": "projects/{project}/global/backendServices/{resource}/setIamPolicy", - // "request": { - // "$ref": "GlobalSetPolicyRequest" - // }, + // "path": "projects/{project}/aggregated/diskTypes", // "response": { - // "$ref": "Policy" + // "$ref": "DiskTypeAggregatedList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.backendServices.setSecurityPolicy": +// 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 *DiskTypesAggregatedListCall) Pages(ctx context.Context, f func(*DiskTypeAggregatedList) 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 BackendServicesSetSecurityPolicyCall struct { - s *Service - project string - backendService string - securitypolicyreference *SecurityPolicyReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "compute.diskTypes.get": + +type DiskTypesGetCall struct { + s *Service + project string + zone string + diskType string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// SetSecurityPolicy: Sets the Google Cloud Armor security policy for -// the specified backend service. For more information, see Google Cloud -// Armor Overview +// Get: Returns the specified disk type. // -// - backendService: Name of the BackendService resource to which the -// security policy should be set. The name should conform to RFC1035. -// - project: Project ID for this request. -func (r *BackendServicesService) SetSecurityPolicy(project string, backendService string, securitypolicyreference *SecurityPolicyReference) *BackendServicesSetSecurityPolicyCall { - c := &BackendServicesSetSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - diskType: Name of the disk type to return. +// - project: Project ID for this request. +// - zone: The name of the zone for this request. +func (r *DiskTypesService) Get(project string, zone string, diskType string) *DiskTypesGetCall { + c := &DiskTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.backendService = backendService - c.securitypolicyreference = securitypolicyreference - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *BackendServicesSetSecurityPolicyCall) RequestId(requestId string) *BackendServicesSetSecurityPolicyCall { - c.urlParams_.Set("requestId", requestId) + c.zone = zone + c.diskType = diskType 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 *BackendServicesSetSecurityPolicyCall) Fields(s ...googleapi.Field) *BackendServicesSetSecurityPolicyCall { +func (c *DiskTypesGetCall) Fields(s ...googleapi.Field) *DiskTypesGetCall { 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 *DiskTypesGetCall) IfNoneMatch(entityTag string) *DiskTypesGetCall { + 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 *BackendServicesSetSecurityPolicyCall) Context(ctx context.Context) *BackendServicesSetSecurityPolicyCall { +func (c *DiskTypesGetCall) Context(ctx context.Context) *DiskTypesGetCall { 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 *BackendServicesSetSecurityPolicyCall) Header() http.Header { +func (c *DiskTypesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendServicesSetSecurityPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *DiskTypesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.securitypolicyreference) - 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) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}/setSecurityPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/diskTypes/{diskType}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendService": c.backendService, + "project": c.project, + "zone": c.zone, + "diskType": c.diskType, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendServices.setSecurityPolicy" 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 +// Do executes the "compute.diskTypes.get" call. +// Exactly one of *DiskType or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *DiskType.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 *BackendServicesSetSecurityPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *DiskTypesGetCall) Do(opts ...googleapi.CallOption) (*DiskType, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -74317,7 +76138,7 @@ func (c *BackendServicesSetSecurityPolicyCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &DiskType{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -74329,18 +76150,20 @@ func (c *BackendServicesSetSecurityPolicyCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Sets the Google Cloud Armor security policy for the specified backend service. For more information, see Google Cloud Armor Overview", - // "flatPath": "projects/{project}/global/backendServices/{backendService}/setSecurityPolicy", - // "httpMethod": "POST", - // "id": "compute.backendServices.setSecurityPolicy", + // "description": "Returns the specified disk type.", + // "flatPath": "projects/{project}/zones/{zone}/diskTypes/{diskType}", + // "httpMethod": "GET", + // "id": "compute.diskTypes.get", // "parameterOrder": [ // "project", - // "backendService" + // "zone", + // "diskType" // ], // "parameters": { - // "backendService": { - // "description": "Name of the BackendService resource to which the security policy should be set. The name should conform to RFC1035.", + // "diskType": { + // "description": "Name of the disk type to return.", // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -74351,114 +76174,203 @@ func (c *BackendServicesSetSecurityPolicyCall) Do(opts ...googleapi.CallOption) // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/global/backendServices/{backendService}/setSecurityPolicy", - // "request": { - // "$ref": "SecurityPolicyReference" - // }, + // "path": "projects/{project}/zones/{zone}/diskTypes/{diskType}", // "response": { - // "$ref": "Operation" + // "$ref": "DiskType" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.backendServices.testIamPermissions": +// method id "compute.diskTypes.list": -type BackendServicesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type DiskTypesListCall struct { + s *Service + project string + zone string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// List: Retrieves a list of disk types available to the specified +// project. // // - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *BackendServicesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *BackendServicesTestIamPermissionsCall { - c := &BackendServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - zone: The name of the zone for this request. +func (r *DiskTypesService) List(project string, zone string) *DiskTypesListCall { + c := &DiskTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest + c.zone = zone + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources +// support two types of filter expressions: expressions that support +// regular expressions and expressions that follow API improvement +// proposal AIP-160. If you want to use AIP-160, your expression must +// specify the field name, an operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` +// or `:`. For example, if you are filtering Compute Engine instances, +// you can exclude instances named `example-instance` by specifying +// `name != example-instance`. The `:` operator can be used with string +// fields to match substrings. For non-string fields it is equivalent to +// the `=` operator. The `:*` comparison can be used to test whether a +// key has been defined. For example, to find all objects with `owner` +// label use: ``` labels.owner:* ``` You can also filter nested fields. +// For example, you could specify `scheduling.automaticRestart = false` +// to include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` If you want to use a +// regular expression, use the `eq` (equal) or `ne` (not equal) operator +// against a single un-parenthesized expression with or without quotes +// or against multiple parenthesized expressions. Examples: `fieldname +// eq unquoted literal` `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" `(fieldname1 eq literal) +// (fieldname2 ne "literal")` The literal value is interpreted as a +// regular expression using Google RE2 library syntax. The literal value +// must match the entire field. For example, to filter for instances +// that do not end with name "instance", you would use `name ne +// .*instance`. +func (c *DiskTypesListCall) Filter(filter string) *DiskTypesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *DiskTypesListCall) MaxResults(maxResults int64) *DiskTypesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *DiskTypesListCall) OrderBy(orderBy string) *DiskTypesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *DiskTypesListCall) PageToken(pageToken string) *DiskTypesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *DiskTypesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *DiskTypesListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) 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 *BackendServicesTestIamPermissionsCall) Fields(s ...googleapi.Field) *BackendServicesTestIamPermissionsCall { +func (c *DiskTypesListCall) Fields(s ...googleapi.Field) *DiskTypesListCall { 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 *DiskTypesListCall) IfNoneMatch(entityTag string) *DiskTypesListCall { + 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 *BackendServicesTestIamPermissionsCall) Context(ctx context.Context) *BackendServicesTestIamPermissionsCall { +func (c *DiskTypesListCall) Context(ctx context.Context) *DiskTypesListCall { 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 *BackendServicesTestIamPermissionsCall) Header() http.Header { +func (c *DiskTypesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendServicesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *DiskTypesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - 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) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/diskTypes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, + "project": c.project, + "zone": c.zone, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendServices.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *BackendServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { +// Do executes the "compute.diskTypes.list" call. +// Exactly one of *DiskTypeList or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *DiskTypeList.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 *DiskTypesListCall) Do(opts ...googleapi.CallOption) (*DiskTypeList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -74477,7 +76389,7 @@ func (c *BackendServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestPermissionsResponse{ + ret := &DiskTypeList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -74489,15 +76401,38 @@ func (c *BackendServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "flatPath": "projects/{project}/global/backendServices/{resource}/testIamPermissions", - // "httpMethod": "POST", - // "id": "compute.backendServices.testIamPermissions", + // "description": "Retrieves a list of disk types available to the specified project.", + // "flatPath": "projects/{project}/zones/{zone}/diskTypes", + // "httpMethod": "GET", + // "id": "compute.diskTypes.list", // "parameterOrder": [ // "project", - // "resource" + // "zone" // ], // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -74505,20 +76440,22 @@ func (c *BackendServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) // "required": true, // "type": "string" // }, - // "resource": { - // "description": "Name or id of the resource for this request.", + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "location": "query", + // "type": "boolean" + // }, + // "zone": { + // "description": "The name of the zone for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/global/backendServices/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, + // "path": "projects/{project}/zones/{zone}/diskTypes", // "response": { - // "$ref": "TestPermissionsResponse" + // "$ref": "DiskTypeList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -74529,29 +76466,53 @@ func (c *BackendServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) } -// method id "compute.backendServices.update": +// 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 *DiskTypesListCall) Pages(ctx context.Context, f func(*DiskTypeList) 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 BackendServicesUpdateCall struct { - s *Service - project string - backendService string - backendservice *BackendService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "compute.disks.addResourcePolicies": + +type DisksAddResourcePoliciesCall struct { + s *Service + project string + zone string + disk string + disksaddresourcepoliciesrequest *DisksAddResourcePoliciesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Update: Updates the specified BackendService resource with the data -// included in the request. For more information, see Backend services -// overview. +// AddResourcePolicies: Adds existing resource policies to a disk. You +// can only add one policy which will be applied to this disk for +// scheduling snapshot creation. // -// - backendService: Name of the BackendService resource to update. +// - disk: The disk name for this request. // - project: Project ID for this request. -func (r *BackendServicesService) Update(project string, backendService string, backendservice *BackendService) *BackendServicesUpdateCall { - c := &BackendServicesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - zone: The name of the zone for this request. +func (r *DisksService) AddResourcePolicies(project string, zone string, disk string, disksaddresourcepoliciesrequest *DisksAddResourcePoliciesRequest) *DisksAddResourcePoliciesCall { + c := &DisksAddResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.backendService = backendService - c.backendservice = backendservice + c.zone = zone + c.disk = disk + c.disksaddresourcepoliciesrequest = disksaddresourcepoliciesrequest return c } @@ -74566,7 +76527,7 @@ func (r *BackendServicesService) Update(project string, backendService string, b // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *BackendServicesUpdateCall) RequestId(requestId string) *BackendServicesUpdateCall { +func (c *DisksAddResourcePoliciesCall) RequestId(requestId string) *DisksAddResourcePoliciesCall { c.urlParams_.Set("requestId", requestId) return c } @@ -74574,7 +76535,7 @@ func (c *BackendServicesUpdateCall) RequestId(requestId string) *BackendServices // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *BackendServicesUpdateCall) Fields(s ...googleapi.Field) *BackendServicesUpdateCall { +func (c *DisksAddResourcePoliciesCall) Fields(s ...googleapi.Field) *DisksAddResourcePoliciesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -74582,21 +76543,21 @@ func (c *BackendServicesUpdateCall) Fields(s ...googleapi.Field) *BackendService // 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 *BackendServicesUpdateCall) Context(ctx context.Context) *BackendServicesUpdateCall { +func (c *DisksAddResourcePoliciesCall) Context(ctx context.Context) *DisksAddResourcePoliciesCall { 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 *BackendServicesUpdateCall) Header() http.Header { +func (c *DisksAddResourcePoliciesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *BackendServicesUpdateCall) doRequest(alt string) (*http.Response, error) { +func (c *DisksAddResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -74604,35 +76565,36 @@ func (c *BackendServicesUpdateCall) doRequest(alt string) (*http.Response, error } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.disksaddresourcepoliciesrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}/addResourcePolicies") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "backendService": c.backendService, + "project": c.project, + "zone": c.zone, + "disk": c.disk, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.backendServices.update" call. +// Do executes the "compute.disks.addResourcePolicies" 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 *BackendServicesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *DisksAddResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -74663,17 +76625,18 @@ func (c *BackendServicesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Updates the specified BackendService resource with the data included in the request. For more information, see Backend services overview.", - // "flatPath": "projects/{project}/global/backendServices/{backendService}", - // "httpMethod": "PUT", - // "id": "compute.backendServices.update", + // "description": "Adds existing resource policies to a disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation.", + // "flatPath": "projects/{project}/zones/{zone}/disks/{disk}/addResourcePolicies", + // "httpMethod": "POST", + // "id": "compute.disks.addResourcePolicies", // "parameterOrder": [ // "project", - // "backendService" + // "zone", + // "disk" // ], // "parameters": { - // "backendService": { - // "description": "Name of the BackendService resource to update.", + // "disk": { + // "description": "The disk name for this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -74690,11 +76653,18 @@ func (c *BackendServicesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" // } // }, - // "path": "projects/{project}/global/backendServices/{backendService}", + // "path": "projects/{project}/zones/{zone}/disks/{disk}/addResourcePolicies", // "request": { - // "$ref": "BackendService" + // "$ref": "DisksAddResourcePoliciesRequest" // }, // "response": { // "$ref": "Operation" @@ -74707,9 +76677,9 @@ func (c *BackendServicesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation } -// method id "compute.diskTypes.aggregatedList": +// method id "compute.disks.aggregatedList": -type DiskTypesAggregatedListCall struct { +type DisksAggregatedListCall struct { s *Service project string urlParams_ gensupport.URLParams @@ -74718,11 +76688,11 @@ type DiskTypesAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of disk types. +// AggregatedList: Retrieves an aggregated list of persistent disks. // // - project: Project ID for this request. -func (r *DiskTypesService) AggregatedList(project string) *DiskTypesAggregatedListCall { - c := &DiskTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *DisksService) AggregatedList(project string) *DisksAggregatedListCall { + c := &DisksAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project return c } @@ -74762,7 +76732,7 @@ func (r *DiskTypesService) AggregatedList(project string) *DiskTypesAggregatedLi // must match the entire field. For example, to filter for instances // that do not end with name "instance", you would use `name ne // .*instance`. -func (c *DiskTypesAggregatedListCall) Filter(filter string) *DiskTypesAggregatedListCall { +func (c *DisksAggregatedListCall) Filter(filter string) *DisksAggregatedListCall { c.urlParams_.Set("filter", filter) return c } @@ -74775,7 +76745,7 @@ func (c *DiskTypesAggregatedListCall) Filter(filter string) *DiskTypesAggregated // response. For resource types which predate this field, if this flag // is omitted or false, only scopes of the scope types where the // resource type is expected to be found will be included. -func (c *DiskTypesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *DiskTypesAggregatedListCall { +func (c *DisksAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *DisksAggregatedListCall { c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) return c } @@ -74786,7 +76756,7 @@ func (c *DiskTypesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *D // a `nextPageToken` that can be used to get the next page of results in // subsequent list requests. Acceptable values are `0` to `500`, // inclusive. (Default: `500`) -func (c *DiskTypesAggregatedListCall) MaxResults(maxResults int64) *DiskTypesAggregatedListCall { +func (c *DisksAggregatedListCall) MaxResults(maxResults int64) *DisksAggregatedListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -74800,7 +76770,7 @@ func (c *DiskTypesAggregatedListCall) MaxResults(maxResults int64) *DiskTypesAgg // result first). Use this to sort resources like operations so that the // newest operation is returned first. Currently, only sorting by `name` // or `creationTimestamp desc` is supported. -func (c *DiskTypesAggregatedListCall) OrderBy(orderBy string) *DiskTypesAggregatedListCall { +func (c *DisksAggregatedListCall) OrderBy(orderBy string) *DisksAggregatedListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -74808,7 +76778,7 @@ func (c *DiskTypesAggregatedListCall) OrderBy(orderBy string) *DiskTypesAggregat // PageToken sets the optional parameter "pageToken": Specifies a page // token to use. Set `pageToken` to the `nextPageToken` returned by a // previous list request to get the next page of results. -func (c *DiskTypesAggregatedListCall) PageToken(pageToken string) *DiskTypesAggregatedListCall { +func (c *DisksAggregatedListCall) PageToken(pageToken string) *DisksAggregatedListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -74817,7 +76787,7 @@ func (c *DiskTypesAggregatedListCall) PageToken(pageToken string) *DiskTypesAggr // "returnPartialSuccess": Opt-in for partial success behavior which // provides partial results in case of failure. The default value is // false. -func (c *DiskTypesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *DiskTypesAggregatedListCall { +func (c *DisksAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *DisksAggregatedListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -74825,7 +76795,7 @@ func (c *DiskTypesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *DiskTypesAggregatedListCall) Fields(s ...googleapi.Field) *DiskTypesAggregatedListCall { +func (c *DisksAggregatedListCall) Fields(s ...googleapi.Field) *DisksAggregatedListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -74835,7 +76805,7 @@ func (c *DiskTypesAggregatedListCall) Fields(s ...googleapi.Field) *DiskTypesAgg // 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 *DiskTypesAggregatedListCall) IfNoneMatch(entityTag string) *DiskTypesAggregatedListCall { +func (c *DisksAggregatedListCall) IfNoneMatch(entityTag string) *DisksAggregatedListCall { c.ifNoneMatch_ = entityTag return c } @@ -74843,21 +76813,21 @@ func (c *DiskTypesAggregatedListCall) IfNoneMatch(entityTag string) *DiskTypesAg // 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 *DiskTypesAggregatedListCall) Context(ctx context.Context) *DiskTypesAggregatedListCall { +func (c *DisksAggregatedListCall) Context(ctx context.Context) *DisksAggregatedListCall { 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 *DiskTypesAggregatedListCall) Header() http.Header { +func (c *DisksAggregatedListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DiskTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) { +func (c *DisksAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -74870,7 +76840,7 @@ func (c *DiskTypesAggregatedListCall) doRequest(alt string) (*http.Response, err var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/diskTypes") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/disks") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -74883,14 +76853,14 @@ func (c *DiskTypesAggregatedListCall) doRequest(alt string) (*http.Response, err return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.diskTypes.aggregatedList" call. -// Exactly one of *DiskTypeAggregatedList or error will be non-nil. Any +// Do executes the "compute.disks.aggregatedList" call. +// Exactly one of *DiskAggregatedList or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either -// *DiskTypeAggregatedList.ServerResponse.Header or (if a response was +// *DiskAggregatedList.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 *DiskTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*DiskTypeAggregatedList, error) { +func (c *DisksAggregatedListCall) Do(opts ...googleapi.CallOption) (*DiskAggregatedList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -74909,7 +76879,7 @@ func (c *DiskTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*DiskTyp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &DiskTypeAggregatedList{ + ret := &DiskAggregatedList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -74921,10 +76891,10 @@ func (c *DiskTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*DiskTyp } return ret, nil // { - // "description": "Retrieves an aggregated list of disk types.", - // "flatPath": "projects/{project}/aggregated/diskTypes", + // "description": "Retrieves an aggregated list of persistent disks.", + // "flatPath": "projects/{project}/aggregated/disks", // "httpMethod": "GET", - // "id": "compute.diskTypes.aggregatedList", + // "id": "compute.disks.aggregatedList", // "parameterOrder": [ // "project" // ], @@ -74970,9 +76940,9 @@ func (c *DiskTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*DiskTyp // "type": "boolean" // } // }, - // "path": "projects/{project}/aggregated/diskTypes", + // "path": "projects/{project}/aggregated/disks", // "response": { - // "$ref": "DiskTypeAggregatedList" + // "$ref": "DiskAggregatedList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -74986,7 +76956,7 @@ func (c *DiskTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*DiskTyp // 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 *DiskTypesAggregatedListCall) Pages(ctx context.Context, f func(*DiskTypeAggregatedList) error) error { +func (c *DisksAggregatedListCall) Pages(ctx context.Context, f func(*DiskAggregatedList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -75004,103 +76974,108 @@ func (c *DiskTypesAggregatedListCall) Pages(ctx context.Context, f func(*DiskTyp } } -// method id "compute.diskTypes.get": +// method id "compute.disks.bulkInsert": -type DiskTypesGetCall struct { - s *Service - project string - zone string - diskType string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type DisksBulkInsertCall struct { + s *Service + project string + zone string + bulkinsertdiskresource *BulkInsertDiskResource + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified disk type. +// BulkInsert: Bulk create a set of disks. // -// - diskType: Name of the disk type to return. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *DiskTypesService) Get(project string, zone string, diskType string) *DiskTypesGetCall { - c := &DiskTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *DisksService) BulkInsert(project string, zone string, bulkinsertdiskresource *BulkInsertDiskResource) *DisksBulkInsertCall { + c := &DisksBulkInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.diskType = diskType + c.bulkinsertdiskresource = bulkinsertdiskresource + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *DisksBulkInsertCall) RequestId(requestId string) *DisksBulkInsertCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *DiskTypesGetCall) Fields(s ...googleapi.Field) *DiskTypesGetCall { +func (c *DisksBulkInsertCall) Fields(s ...googleapi.Field) *DisksBulkInsertCall { 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 *DiskTypesGetCall) IfNoneMatch(entityTag string) *DiskTypesGetCall { - 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 *DiskTypesGetCall) Context(ctx context.Context) *DiskTypesGetCall { +func (c *DisksBulkInsertCall) Context(ctx context.Context) *DisksBulkInsertCall { 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 *DiskTypesGetCall) Header() http.Header { +func (c *DisksBulkInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DiskTypesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *DisksBulkInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.bulkinsertdiskresource) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/diskTypes/{diskType}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/bulkInsert") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "diskType": c.diskType, + "project": c.project, + "zone": c.zone, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.diskTypes.get" call. -// Exactly one of *DiskType or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *DiskType.ServerResponse.Header or (if a response was returned at +// Do executes the "compute.disks.bulkInsert" 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 *DiskTypesGetCall) Do(opts ...googleapi.CallOption) (*DiskType, error) { +func (c *DisksBulkInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -75119,7 +77094,7 @@ func (c *DiskTypesGetCall) Do(opts ...googleapi.CallOption) (*DiskType, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &DiskType{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -75131,23 +77106,15 @@ func (c *DiskTypesGetCall) Do(opts ...googleapi.CallOption) (*DiskType, error) { } return ret, nil // { - // "description": "Returns the specified disk type.", - // "flatPath": "projects/{project}/zones/{zone}/diskTypes/{diskType}", - // "httpMethod": "GET", - // "id": "compute.diskTypes.get", + // "description": "Bulk create a set of disks.", + // "flatPath": "projects/{project}/zones/{zone}/disks/bulkInsert", + // "httpMethod": "POST", + // "id": "compute.disks.bulkInsert", // "parameterOrder": [ // "project", - // "zone", - // "diskType" + // "zone" // ], // "parameters": { - // "diskType": { - // "description": "Name of the disk type to return.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" - // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -75155,6 +77122,11 @@ func (c *DiskTypesGetCall) Do(opts ...googleapi.CallOption) (*DiskType, error) { // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, // "zone": { // "description": "The name of the zone for this request.", // "location": "path", @@ -75163,176 +77135,118 @@ func (c *DiskTypesGetCall) Do(opts ...googleapi.CallOption) (*DiskType, error) { // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/diskTypes/{diskType}", + // "path": "projects/{project}/zones/{zone}/disks/bulkInsert", + // "request": { + // "$ref": "BulkInsertDiskResource" + // }, // "response": { - // "$ref": "DiskType" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.diskTypes.list": +// method id "compute.disks.createSnapshot": -type DiskTypesListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type DisksCreateSnapshotCall struct { + s *Service + project string + zone string + disk string + snapshot *Snapshot + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Retrieves a list of disk types available to the specified -// project. +// CreateSnapshot: Creates a snapshot of a specified persistent disk. +// For regular snapshot creation, consider using snapshots.insert +// instead, as that method supports more features, such as creating +// snapshots in a project different from the source disk project. // +// - disk: Name of the persistent disk to snapshot. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *DiskTypesService) List(project string, zone string) *DiskTypesListCall { - c := &DiskTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *DisksService) CreateSnapshot(project string, zone string, disk string, snapshot *Snapshot) *DisksCreateSnapshotCall { + c := &DisksCreateSnapshotCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone + c.disk = disk + c.snapshot = snapshot return c } -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources -// support two types of filter expressions: expressions that support -// regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a -// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` -// or `:`. For example, if you are filtering Compute Engine instances, -// you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` -// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") -// ``` By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") -// AND (scheduling.automaticRestart = true) ``` If you want to use a -// regular expression, use the `eq` (equal) or `ne` (not equal) operator -// against a single un-parenthesized expression with or without quotes -// or against multiple parenthesized expressions. Examples: `fieldname -// eq unquoted literal` `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" `(fieldname1 eq literal) -// (fieldname2 ne "literal")` The literal value is interpreted as a -// regular expression using Google RE2 library syntax. The literal value -// must match the entire field. For example, to filter for instances -// that do not end with name "instance", you would use `name ne -// .*instance`. -func (c *DiskTypesListCall) Filter(filter string) *DiskTypesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than `maxResults`, Compute Engine returns -// a `nextPageToken` that can be used to get the next page of results in -// subsequent list requests. Acceptable values are `0` to `500`, -// inclusive. (Default: `500`) -func (c *DiskTypesListCall) MaxResults(maxResults int64) *DiskTypesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. You can also sort results in -// descending order based on the creation timestamp using -// `orderBy="creationTimestamp desc". This sorts results based on the -// `creationTimestamp` field in reverse chronological order (newest -// result first). Use this to sort resources like operations so that the -// newest operation is returned first. Currently, only sorting by `name` -// or `creationTimestamp desc` is supported. -func (c *DiskTypesListCall) OrderBy(orderBy string) *DiskTypesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set `pageToken` to the `nextPageToken` returned by a -// previous list request to get the next page of results. -func (c *DiskTypesListCall) PageToken(pageToken string) *DiskTypesListCall { - c.urlParams_.Set("pageToken", pageToken) +// GuestFlush sets the optional parameter "guestFlush": [Input Only] +// Whether to attempt an application consistent snapshot by informing +// the OS to prepare for the snapshot process. +func (c *DisksCreateSnapshotCall) GuestFlush(guestFlush bool) *DisksCreateSnapshotCall { + c.urlParams_.Set("guestFlush", fmt.Sprint(guestFlush)) return c } -// ReturnPartialSuccess sets the optional parameter -// "returnPartialSuccess": Opt-in for partial success behavior which -// provides partial results in case of failure. The default value is -// false. -func (c *DiskTypesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *DiskTypesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *DisksCreateSnapshotCall) RequestId(requestId string) *DisksCreateSnapshotCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *DiskTypesListCall) Fields(s ...googleapi.Field) *DiskTypesListCall { +func (c *DisksCreateSnapshotCall) Fields(s ...googleapi.Field) *DisksCreateSnapshotCall { 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 *DiskTypesListCall) IfNoneMatch(entityTag string) *DiskTypesListCall { - 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 *DiskTypesListCall) Context(ctx context.Context) *DiskTypesListCall { +func (c *DisksCreateSnapshotCall) Context(ctx context.Context) *DisksCreateSnapshotCall { 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 *DiskTypesListCall) Header() http.Header { +func (c *DisksCreateSnapshotCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DiskTypesListCall) doRequest(alt string) (*http.Response, error) { +func (c *DisksCreateSnapshotCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.snapshot) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/diskTypes") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}/createSnapshot") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -75340,18 +77254,19 @@ func (c *DiskTypesListCall) doRequest(alt string) (*http.Response, error) { googleapi.Expand(req.URL, map[string]string{ "project": c.project, "zone": c.zone, + "disk": c.disk, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.diskTypes.list" call. -// Exactly one of *DiskTypeList or error will be non-nil. Any non-2xx +// Do executes the "compute.disks.createSnapshot" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either -// *DiskTypeList.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 *DiskTypesListCall) Do(opts ...googleapi.CallOption) (*DiskTypeList, error) { +func (c *DisksCreateSnapshotCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -75370,7 +77285,7 @@ func (c *DiskTypesListCall) Do(opts ...googleapi.CallOption) (*DiskTypeList, err if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &DiskTypeList{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -75382,37 +77297,27 @@ func (c *DiskTypesListCall) Do(opts ...googleapi.CallOption) (*DiskTypeList, err } return ret, nil // { - // "description": "Retrieves a list of disk types available to the specified project.", - // "flatPath": "projects/{project}/zones/{zone}/diskTypes", - // "httpMethod": "GET", - // "id": "compute.diskTypes.list", + // "description": "Creates a snapshot of a specified persistent disk. For regular snapshot creation, consider using snapshots.insert instead, as that method supports more features, such as creating snapshots in a project different from the source disk project.", + // "flatPath": "projects/{project}/zones/{zone}/disks/{disk}/createSnapshot", + // "httpMethod": "POST", + // "id": "compute.disks.createSnapshot", // "parameterOrder": [ // "project", - // "zone" + // "zone", + // "disk" // ], // "parameters": { - // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", - // "location": "query", + // "disk": { + // "description": "Name of the persistent disk to snapshot.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, // "type": "string" // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "guestFlush": { + // "description": "[Input Only] Whether to attempt an application consistent snapshot by informing the OS to prepare for the snapshot process.", // "location": "query", - // "type": "string" + // "type": "boolean" // }, // "project": { // "description": "Project ID for this request.", @@ -75421,10 +77326,10 @@ func (c *DiskTypesListCall) Do(opts ...googleapi.CallOption) (*DiskTypeList, err // "required": true, // "type": "string" // }, - // "returnPartialSuccess": { - // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", - // "type": "boolean" + // "type": "string" // }, // "zone": { // "description": "The name of the zone for this request.", @@ -75434,66 +77339,46 @@ func (c *DiskTypesListCall) Do(opts ...googleapi.CallOption) (*DiskTypeList, err // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/diskTypes", + // "path": "projects/{project}/zones/{zone}/disks/{disk}/createSnapshot", + // "request": { + // "$ref": "Snapshot" + // }, // "response": { - // "$ref": "DiskTypeList" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// 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 *DiskTypesListCall) Pages(ctx context.Context, f func(*DiskTypeList) 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 "compute.disks.addResourcePolicies": +// method id "compute.disks.delete": -type DisksAddResourcePoliciesCall struct { - s *Service - project string - zone string - disk string - disksaddresourcepoliciesrequest *DisksAddResourcePoliciesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type DisksDeleteCall struct { + s *Service + project string + zone string + disk string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// AddResourcePolicies: Adds existing resource policies to a disk. You -// can only add one policy which will be applied to this disk for -// scheduling snapshot creation. +// Delete: Deletes the specified persistent disk. Deleting a disk +// removes its data permanently and is irreversible. However, deleting a +// disk does not delete any snapshots previously made from the disk. You +// must separately delete snapshots. // -// - disk: The disk name for this request. +// - disk: Name of the persistent disk to delete. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *DisksService) AddResourcePolicies(project string, zone string, disk string, disksaddresourcepoliciesrequest *DisksAddResourcePoliciesRequest) *DisksAddResourcePoliciesCall { - c := &DisksAddResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *DisksService) Delete(project string, zone string, disk string) *DisksDeleteCall { + c := &DisksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.disk = disk - c.disksaddresourcepoliciesrequest = disksaddresourcepoliciesrequest return c } @@ -75508,7 +77393,7 @@ func (r *DisksService) AddResourcePolicies(project string, zone string, disk str // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *DisksAddResourcePoliciesCall) RequestId(requestId string) *DisksAddResourcePoliciesCall { +func (c *DisksDeleteCall) RequestId(requestId string) *DisksDeleteCall { c.urlParams_.Set("requestId", requestId) return c } @@ -75516,7 +77401,7 @@ func (c *DisksAddResourcePoliciesCall) RequestId(requestId string) *DisksAddReso // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *DisksAddResourcePoliciesCall) Fields(s ...googleapi.Field) *DisksAddResourcePoliciesCall { +func (c *DisksDeleteCall) Fields(s ...googleapi.Field) *DisksDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -75524,21 +77409,21 @@ func (c *DisksAddResourcePoliciesCall) Fields(s ...googleapi.Field) *DisksAddRes // 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 *DisksAddResourcePoliciesCall) Context(ctx context.Context) *DisksAddResourcePoliciesCall { +func (c *DisksDeleteCall) Context(ctx context.Context) *DisksDeleteCall { 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 *DisksAddResourcePoliciesCall) Header() http.Header { +func (c *DisksDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DisksAddResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { +func (c *DisksDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -75546,16 +77431,11 @@ func (c *DisksAddResourcePoliciesCall) doRequest(alt string) (*http.Response, er } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.disksaddresourcepoliciesrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}/addResourcePolicies") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -75568,14 +77448,14 @@ func (c *DisksAddResourcePoliciesCall) doRequest(alt string) (*http.Response, er return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.disks.addResourcePolicies" call. +// Do executes the "compute.disks.delete" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *DisksAddResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *DisksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -75606,10 +77486,10 @@ func (c *DisksAddResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Operat } return ret, nil // { - // "description": "Adds existing resource policies to a disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation.", - // "flatPath": "projects/{project}/zones/{zone}/disks/{disk}/addResourcePolicies", - // "httpMethod": "POST", - // "id": "compute.disks.addResourcePolicies", + // "description": "Deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.", + // "flatPath": "projects/{project}/zones/{zone}/disks/{disk}", + // "httpMethod": "DELETE", + // "id": "compute.disks.delete", // "parameterOrder": [ // "project", // "zone", @@ -75617,9 +77497,8 @@ func (c *DisksAddResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Operat // ], // "parameters": { // "disk": { - // "description": "The disk name for this request.", + // "description": "Name of the persistent disk to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -75643,10 +77522,7 @@ func (c *DisksAddResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Operat // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/disks/{disk}/addResourcePolicies", - // "request": { - // "$ref": "DisksAddResourcePoliciesRequest" - // }, + // "path": "projects/{project}/zones/{zone}/disks/{disk}", // "response": { // "$ref": "Operation" // }, @@ -75658,125 +77534,36 @@ func (c *DisksAddResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Operat } -// method id "compute.disks.aggregatedList": +// method id "compute.disks.get": -type DisksAggregatedListCall struct { +type DisksGetCall struct { s *Service project string + zone string + disk string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// AggregatedList: Retrieves an aggregated list of persistent disks. +// Get: Returns the specified persistent disk. // +// - disk: Name of the persistent disk to return. // - project: Project ID for this request. -func (r *DisksService) AggregatedList(project string) *DisksAggregatedListCall { - c := &DisksAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - zone: The name of the zone for this request. +func (r *DisksService) Get(project string, zone string, disk string) *DisksGetCall { + c := &DisksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources -// support two types of filter expressions: expressions that support -// regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a -// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` -// or `:`. For example, if you are filtering Compute Engine instances, -// you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` -// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") -// ``` By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") -// AND (scheduling.automaticRestart = true) ``` If you want to use a -// regular expression, use the `eq` (equal) or `ne` (not equal) operator -// against a single un-parenthesized expression with or without quotes -// or against multiple parenthesized expressions. Examples: `fieldname -// eq unquoted literal` `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" `(fieldname1 eq literal) -// (fieldname2 ne "literal")` The literal value is interpreted as a -// regular expression using Google RE2 library syntax. The literal value -// must match the entire field. For example, to filter for instances -// that do not end with name "instance", you would use `name ne -// .*instance`. -func (c *DisksAggregatedListCall) Filter(filter string) *DisksAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": -// Indicates whether every visible scope for each scope type (zone, -// region, global) should be included in the response. For new resource -// types added after this field, the flag has no effect as new resource -// types will always include every visible scope for each scope type in -// response. For resource types which predate this field, if this flag -// is omitted or false, only scopes of the scope types where the -// resource type is expected to be found will be included. -func (c *DisksAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *DisksAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than `maxResults`, Compute Engine returns -// a `nextPageToken` that can be used to get the next page of results in -// subsequent list requests. Acceptable values are `0` to `500`, -// inclusive. (Default: `500`) -func (c *DisksAggregatedListCall) MaxResults(maxResults int64) *DisksAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. You can also sort results in -// descending order based on the creation timestamp using -// `orderBy="creationTimestamp desc". This sorts results based on the -// `creationTimestamp` field in reverse chronological order (newest -// result first). Use this to sort resources like operations so that the -// newest operation is returned first. Currently, only sorting by `name` -// or `creationTimestamp desc` is supported. -func (c *DisksAggregatedListCall) OrderBy(orderBy string) *DisksAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set `pageToken` to the `nextPageToken` returned by a -// previous list request to get the next page of results. -func (c *DisksAggregatedListCall) PageToken(pageToken string) *DisksAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter -// "returnPartialSuccess": Opt-in for partial success behavior which -// provides partial results in case of failure. The default value is -// false. -func (c *DisksAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *DisksAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + c.zone = zone + c.disk = disk 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 *DisksAggregatedListCall) Fields(s ...googleapi.Field) *DisksAggregatedListCall { +func (c *DisksGetCall) Fields(s ...googleapi.Field) *DisksGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -75786,7 +77573,7 @@ func (c *DisksAggregatedListCall) Fields(s ...googleapi.Field) *DisksAggregatedL // 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 *DisksAggregatedListCall) IfNoneMatch(entityTag string) *DisksAggregatedListCall { +func (c *DisksGetCall) IfNoneMatch(entityTag string) *DisksGetCall { c.ifNoneMatch_ = entityTag return c } @@ -75794,21 +77581,21 @@ func (c *DisksAggregatedListCall) IfNoneMatch(entityTag string) *DisksAggregated // 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 *DisksAggregatedListCall) Context(ctx context.Context) *DisksAggregatedListCall { +func (c *DisksGetCall) Context(ctx context.Context) *DisksGetCall { 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 *DisksAggregatedListCall) Header() http.Header { +func (c *DisksGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DisksAggregatedListCall) doRequest(alt string) (*http.Response, error) { +func (c *DisksGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -75821,7 +77608,7 @@ func (c *DisksAggregatedListCall) doRequest(alt string) (*http.Response, error) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/disks") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -75830,18 +77617,20 @@ func (c *DisksAggregatedListCall) doRequest(alt string) (*http.Response, error) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, + "zone": c.zone, + "disk": c.disk, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.disks.aggregatedList" call. -// Exactly one of *DiskAggregatedList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *DiskAggregatedList.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 *DisksAggregatedListCall) Do(opts ...googleapi.CallOption) (*DiskAggregatedList, error) { +// Do executes the "compute.disks.get" call. +// Exactly one of *Disk or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Disk.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 *DisksGetCall) Do(opts ...googleapi.CallOption) (*Disk, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -75860,7 +77649,7 @@ func (c *DisksAggregatedListCall) Do(opts ...googleapi.CallOption) (*DiskAggrega if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &DiskAggregatedList{ + ret := &Disk{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -75872,40 +77661,21 @@ func (c *DisksAggregatedListCall) Do(opts ...googleapi.CallOption) (*DiskAggrega } return ret, nil // { - // "description": "Retrieves an aggregated list of persistent disks.", - // "flatPath": "projects/{project}/aggregated/disks", + // "description": "Returns the specified persistent disk.", + // "flatPath": "projects/{project}/zones/{zone}/disks/{disk}", // "httpMethod": "GET", - // "id": "compute.disks.aggregatedList", + // "id": "compute.disks.get", // "parameterOrder": [ - // "project" + // "project", + // "zone", + // "disk" // ], // "parameters": { - // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", - // "location": "query", - // "type": "string" - // }, - // "includeAllScopes": { - // "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", - // "location": "query", - // "type": "boolean" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", - // "location": "query", + // "disk": { + // "description": "Name of the persistent disk to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, // "type": "string" // }, // "project": { @@ -75915,15 +77685,17 @@ func (c *DisksAggregatedListCall) Do(opts ...googleapi.CallOption) (*DiskAggrega // "required": true, // "type": "string" // }, - // "returnPartialSuccess": { - // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", - // "location": "query", - // "type": "boolean" + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" // } // }, - // "path": "projects/{project}/aggregated/disks", + // "path": "projects/{project}/zones/{zone}/disks/{disk}", // "response": { - // "$ref": "DiskAggregatedList" + // "$ref": "Disk" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -75934,129 +77706,111 @@ func (c *DisksAggregatedListCall) Do(opts ...googleapi.CallOption) (*DiskAggrega } -// 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 *DisksAggregatedListCall) Pages(ctx context.Context, f func(*DiskAggregatedList) 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 "compute.disks.bulkInsert": +// method id "compute.disks.getIamPolicy": -type DisksBulkInsertCall struct { - s *Service - project string - zone string - bulkinsertdiskresource *BulkInsertDiskResource - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type DisksGetIamPolicyCall struct { + s *Service + project string + zone string + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// BulkInsert: Bulk create a set of disks. +// GetIamPolicy: Gets the access control policy for a resource. May be +// empty if no such policy or resource exists. // // - project: Project ID for this request. +// - resource: Name or id of the resource for this request. // - zone: The name of the zone for this request. -func (r *DisksService) BulkInsert(project string, zone string, bulkinsertdiskresource *BulkInsertDiskResource) *DisksBulkInsertCall { - c := &DisksBulkInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *DisksService) GetIamPolicy(project string, zone string, resource string) *DisksGetIamPolicyCall { + c := &DisksGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.bulkinsertdiskresource = bulkinsertdiskresource + c.resource = resource return c } -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *DisksBulkInsertCall) RequestId(requestId string) *DisksBulkInsertCall { - c.urlParams_.Set("requestId", requestId) +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *DisksGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *DisksGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *DisksBulkInsertCall) Fields(s ...googleapi.Field) *DisksBulkInsertCall { +func (c *DisksGetIamPolicyCall) Fields(s ...googleapi.Field) *DisksGetIamPolicyCall { 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 *DisksGetIamPolicyCall) IfNoneMatch(entityTag string) *DisksGetIamPolicyCall { + 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 *DisksBulkInsertCall) Context(ctx context.Context) *DisksBulkInsertCall { +func (c *DisksGetIamPolicyCall) Context(ctx context.Context) *DisksGetIamPolicyCall { 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 *DisksBulkInsertCall) Header() http.Header { +func (c *DisksGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DisksBulkInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *DisksGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.bulkinsertdiskresource) - 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) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/bulkInsert") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{resource}/getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, + "project": c.project, + "zone": c.zone, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.disks.bulkInsert" 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 *DisksBulkInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.disks.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *DisksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -76075,7 +77829,7 @@ func (c *DisksBulkInsertCall) Do(opts ...googleapi.CallOption) (*Operation, erro if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -76087,15 +77841,22 @@ func (c *DisksBulkInsertCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Bulk create a set of disks.", - // "flatPath": "projects/{project}/zones/{zone}/disks/bulkInsert", - // "httpMethod": "POST", - // "id": "compute.disks.bulkInsert", + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "flatPath": "projects/{project}/zones/{zone}/disks/{resource}/getIamPolicy", + // "httpMethod": "GET", + // "id": "compute.disks.getIamPolicy", // "parameterOrder": [ // "project", - // "zone" + // "zone", + // "resource" // ], // "parameters": { + // "optionsRequestedPolicyVersion": { + // "description": "Requested IAM Policy version.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -76103,9 +77864,11 @@ func (c *DisksBulkInsertCall) Do(opts ...googleapi.CallOption) (*Operation, erro // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, // "type": "string" // }, // "zone": { @@ -76116,56 +77879,45 @@ func (c *DisksBulkInsertCall) Do(opts ...googleapi.CallOption) (*Operation, erro // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/disks/bulkInsert", - // "request": { - // "$ref": "BulkInsertDiskResource" - // }, + // "path": "projects/{project}/zones/{zone}/disks/{resource}/getIamPolicy", // "response": { - // "$ref": "Operation" + // "$ref": "Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.disks.createSnapshot": +// method id "compute.disks.insert": -type DisksCreateSnapshotCall struct { +type DisksInsertCall struct { s *Service project string zone string - disk string - snapshot *Snapshot + disk *Disk urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// CreateSnapshot: Creates a snapshot of a specified persistent disk. -// For regular snapshot creation, consider using snapshots.insert -// instead, as that method supports more features, such as creating -// snapshots in a project different from the source disk project. +// Insert: Creates a persistent disk in the specified project using the +// data in the request. You can create a disk from a source +// (sourceImage, sourceSnapshot, or sourceDisk) or create an empty 500 +// GB data disk by omitting all properties. You can also create a disk +// that is larger than the default size by specifying the sizeGb +// property. // -// - disk: Name of the persistent disk to snapshot. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *DisksService) CreateSnapshot(project string, zone string, disk string, snapshot *Snapshot) *DisksCreateSnapshotCall { - c := &DisksCreateSnapshotCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *DisksService) Insert(project string, zone string, disk *Disk) *DisksInsertCall { + c := &DisksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.disk = disk - c.snapshot = snapshot - return c -} - -// GuestFlush sets the optional parameter "guestFlush": [Input Only] -// Whether to attempt an application consistent snapshot by informing -// the OS to prepare for the snapshot process. -func (c *DisksCreateSnapshotCall) GuestFlush(guestFlush bool) *DisksCreateSnapshotCall { - c.urlParams_.Set("guestFlush", fmt.Sprint(guestFlush)) return c } @@ -76180,15 +77932,22 @@ func (c *DisksCreateSnapshotCall) GuestFlush(guestFlush bool) *DisksCreateSnapsh // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *DisksCreateSnapshotCall) RequestId(requestId string) *DisksCreateSnapshotCall { +func (c *DisksInsertCall) RequestId(requestId string) *DisksInsertCall { c.urlParams_.Set("requestId", requestId) return c } +// SourceImage sets the optional parameter "sourceImage": Source image +// to restore onto a disk. This field is optional. +func (c *DisksInsertCall) SourceImage(sourceImage string) *DisksInsertCall { + c.urlParams_.Set("sourceImage", sourceImage) + 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 *DisksCreateSnapshotCall) Fields(s ...googleapi.Field) *DisksCreateSnapshotCall { +func (c *DisksInsertCall) Fields(s ...googleapi.Field) *DisksInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -76196,21 +77955,21 @@ func (c *DisksCreateSnapshotCall) Fields(s ...googleapi.Field) *DisksCreateSnaps // 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 *DisksCreateSnapshotCall) Context(ctx context.Context) *DisksCreateSnapshotCall { +func (c *DisksInsertCall) Context(ctx context.Context) *DisksInsertCall { 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 *DisksCreateSnapshotCall) Header() http.Header { +func (c *DisksInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DisksCreateSnapshotCall) doRequest(alt string) (*http.Response, error) { +func (c *DisksInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -76218,14 +77977,14 @@ func (c *DisksCreateSnapshotCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.snapshot) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.disk) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}/createSnapshot") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -76235,19 +77994,18 @@ func (c *DisksCreateSnapshotCall) doRequest(alt string) (*http.Response, error) googleapi.Expand(req.URL, map[string]string{ "project": c.project, "zone": c.zone, - "disk": c.disk, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.disks.createSnapshot" call. +// Do executes the "compute.disks.insert" 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 *DisksCreateSnapshotCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *DisksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -76278,28 +78036,15 @@ func (c *DisksCreateSnapshotCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Creates a snapshot of a specified persistent disk. For regular snapshot creation, consider using snapshots.insert instead, as that method supports more features, such as creating snapshots in a project different from the source disk project.", - // "flatPath": "projects/{project}/zones/{zone}/disks/{disk}/createSnapshot", + // "description": "Creates a persistent disk in the specified project using the data in the request. You can create a disk from a source (sourceImage, sourceSnapshot, or sourceDisk) or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property.", + // "flatPath": "projects/{project}/zones/{zone}/disks", // "httpMethod": "POST", - // "id": "compute.disks.createSnapshot", + // "id": "compute.disks.insert", // "parameterOrder": [ // "project", - // "zone", - // "disk" + // "zone" // ], // "parameters": { - // "disk": { - // "description": "Name of the persistent disk to snapshot.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" - // }, - // "guestFlush": { - // "description": "[Input Only] Whether to attempt an application consistent snapshot by informing the OS to prepare for the snapshot process.", - // "location": "query", - // "type": "boolean" - // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -76312,6 +78057,11 @@ func (c *DisksCreateSnapshotCall) Do(opts ...googleapi.CallOption) (*Operation, // "location": "query", // "type": "string" // }, + // "sourceImage": { + // "description": "Source image to restore onto a disk. This field is optional.", + // "location": "query", + // "type": "string" + // }, // "zone": { // "description": "The name of the zone for this request.", // "location": "path", @@ -76320,9 +78070,9 @@ func (c *DisksCreateSnapshotCall) Do(opts ...googleapi.CallOption) (*Operation, // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/disks/{disk}/createSnapshot", + // "path": "projects/{project}/zones/{zone}/disks", // "request": { - // "$ref": "Snapshot" + // "$ref": "Disk" // }, // "response": { // "$ref": "Operation" @@ -76335,88 +78085,163 @@ func (c *DisksCreateSnapshotCall) Do(opts ...googleapi.CallOption) (*Operation, } -// method id "compute.disks.delete": +// method id "compute.disks.list": + +type DisksListCall struct { + s *Service + project string + zone string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieves a list of persistent disks contained within the +// specified zone. +// +// - project: Project ID for this request. +// - zone: The name of the zone for this request. +func (r *DisksService) List(project string, zone string) *DisksListCall { + c := &DisksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources +// support two types of filter expressions: expressions that support +// regular expressions and expressions that follow API improvement +// proposal AIP-160. If you want to use AIP-160, your expression must +// specify the field name, an operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` +// or `:`. For example, if you are filtering Compute Engine instances, +// you can exclude instances named `example-instance` by specifying +// `name != example-instance`. The `:` operator can be used with string +// fields to match substrings. For non-string fields it is equivalent to +// the `=` operator. The `:*` comparison can be used to test whether a +// key has been defined. For example, to find all objects with `owner` +// label use: ``` labels.owner:* ``` You can also filter nested fields. +// For example, you could specify `scheduling.automaticRestart = false` +// to include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` If you want to use a +// regular expression, use the `eq` (equal) or `ne` (not equal) operator +// against a single un-parenthesized expression with or without quotes +// or against multiple parenthesized expressions. Examples: `fieldname +// eq unquoted literal` `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" `(fieldname1 eq literal) +// (fieldname2 ne "literal")` The literal value is interpreted as a +// regular expression using Google RE2 library syntax. The literal value +// must match the entire field. For example, to filter for instances +// that do not end with name "instance", you would use `name ne +// .*instance`. +func (c *DisksListCall) Filter(filter string) *DisksListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *DisksListCall) MaxResults(maxResults int64) *DisksListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} -type DisksDeleteCall struct { - s *Service - project string - zone string - disk string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *DisksListCall) OrderBy(orderBy string) *DisksListCall { + c.urlParams_.Set("orderBy", orderBy) + return c } -// Delete: Deletes the specified persistent disk. Deleting a disk -// removes its data permanently and is irreversible. However, deleting a -// disk does not delete any snapshots previously made from the disk. You -// must separately delete snapshots. -// -// - disk: Name of the persistent disk to delete. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) Delete(project string, zone string, disk string) *DisksDeleteCall { - c := &DisksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.disk = disk +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *DisksListCall) PageToken(pageToken string) *DisksListCall { + c.urlParams_.Set("pageToken", pageToken) return c } -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *DisksDeleteCall) RequestId(requestId string) *DisksDeleteCall { - c.urlParams_.Set("requestId", requestId) +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *DisksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *DisksListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) 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 *DisksDeleteCall) Fields(s ...googleapi.Field) *DisksDeleteCall { +func (c *DisksListCall) Fields(s ...googleapi.Field) *DisksListCall { 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 *DisksListCall) IfNoneMatch(entityTag string) *DisksListCall { + 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 *DisksDeleteCall) Context(ctx context.Context) *DisksDeleteCall { +func (c *DisksListCall) Context(ctx context.Context) *DisksListCall { 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 *DisksDeleteCall) Header() http.Header { +func (c *DisksListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DisksDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *DisksListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -76424,19 +78249,18 @@ func (c *DisksDeleteCall) doRequest(alt string) (*http.Response, error) { googleapi.Expand(req.URL, map[string]string{ "project": c.project, "zone": c.zone, - "disk": c.disk, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.disks.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at +// Do executes the "compute.disks.list" call. +// Exactly one of *DiskList or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *DiskList.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 *DisksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *DisksListCall) Do(opts ...googleapi.CallOption) (*DiskList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -76455,7 +78279,7 @@ func (c *DisksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &DiskList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -76467,20 +78291,36 @@ func (c *DisksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { } return ret, nil // { - // "description": "Deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.", - // "flatPath": "projects/{project}/zones/{zone}/disks/{disk}", - // "httpMethod": "DELETE", - // "id": "compute.disks.delete", + // "description": "Retrieves a list of persistent disks contained within the specified zone.", + // "flatPath": "projects/{project}/zones/{zone}/disks", + // "httpMethod": "GET", + // "id": "compute.disks.list", // "parameterOrder": [ // "project", - // "zone", - // "disk" + // "zone" // ], // "parameters": { - // "disk": { - // "description": "Name of the persistent disk to delete.", - // "location": "path", - // "required": true, + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", // "type": "string" // }, // "project": { @@ -76490,10 +78330,10 @@ func (c *DisksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", // "location": "query", - // "type": "string" + // "type": "boolean" // }, // "zone": { // "description": "The name of the zone for this request.", @@ -76503,95 +78343,126 @@ func (c *DisksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/disks/{disk}", + // "path": "projects/{project}/zones/{zone}/disks", // "response": { - // "$ref": "Operation" + // "$ref": "DiskList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.disks.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 *DisksListCall) Pages(ctx context.Context, f func(*DiskList) 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 DisksGetCall struct { - s *Service - project string - zone string - disk string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "compute.disks.removeResourcePolicies": + +type DisksRemoveResourcePoliciesCall struct { + s *Service + project string + zone string + disk string + disksremoveresourcepoliciesrequest *DisksRemoveResourcePoliciesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified persistent disk. +// RemoveResourcePolicies: Removes resource policies from a disk. // -// - disk: Name of the persistent disk to return. +// - disk: The disk name for this request. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *DisksService) Get(project string, zone string, disk string) *DisksGetCall { - c := &DisksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *DisksService) RemoveResourcePolicies(project string, zone string, disk string, disksremoveresourcepoliciesrequest *DisksRemoveResourcePoliciesRequest) *DisksRemoveResourcePoliciesCall { + c := &DisksRemoveResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.disk = disk + c.disksremoveresourcepoliciesrequest = disksremoveresourcepoliciesrequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *DisksRemoveResourcePoliciesCall) RequestId(requestId string) *DisksRemoveResourcePoliciesCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *DisksGetCall) Fields(s ...googleapi.Field) *DisksGetCall { +func (c *DisksRemoveResourcePoliciesCall) Fields(s ...googleapi.Field) *DisksRemoveResourcePoliciesCall { 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 *DisksGetCall) IfNoneMatch(entityTag string) *DisksGetCall { - 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 *DisksGetCall) Context(ctx context.Context) *DisksGetCall { +func (c *DisksRemoveResourcePoliciesCall) Context(ctx context.Context) *DisksRemoveResourcePoliciesCall { 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 *DisksGetCall) Header() http.Header { +func (c *DisksRemoveResourcePoliciesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DisksGetCall) doRequest(alt string) (*http.Response, error) { +func (c *DisksRemoveResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.disksremoveresourcepoliciesrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}/removeResourcePolicies") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -76604,14 +78475,14 @@ func (c *DisksGetCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.disks.get" call. -// Exactly one of *Disk or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Disk.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 *DisksGetCall) Do(opts ...googleapi.CallOption) (*Disk, error) { +// Do executes the "compute.disks.removeResourcePolicies" 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 *DisksRemoveResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -76630,7 +78501,7 @@ func (c *DisksGetCall) Do(opts ...googleapi.CallOption) (*Disk, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Disk{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -76642,10 +78513,10 @@ func (c *DisksGetCall) Do(opts ...googleapi.CallOption) (*Disk, error) { } return ret, nil // { - // "description": "Returns the specified persistent disk.", - // "flatPath": "projects/{project}/zones/{zone}/disks/{disk}", - // "httpMethod": "GET", - // "id": "compute.disks.get", + // "description": "Removes resource policies from a disk.", + // "flatPath": "projects/{project}/zones/{zone}/disks/{disk}/removeResourcePolicies", + // "httpMethod": "POST", + // "id": "compute.disks.removeResourcePolicies", // "parameterOrder": [ // "project", // "zone", @@ -76653,7 +78524,7 @@ func (c *DisksGetCall) Do(opts ...googleapi.CallOption) (*Disk, error) { // ], // "parameters": { // "disk": { - // "description": "Name of the persistent disk to return.", + // "description": "The disk name for this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -76666,6 +78537,11 @@ func (c *DisksGetCall) Do(opts ...googleapi.CallOption) (*Disk, error) { // "required": true, // "type": "string" // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, // "zone": { // "description": "The name of the zone for this request.", // "location": "path", @@ -76674,124 +78550,128 @@ func (c *DisksGetCall) Do(opts ...googleapi.CallOption) (*Disk, error) { // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/disks/{disk}", + // "path": "projects/{project}/zones/{zone}/disks/{disk}/removeResourcePolicies", + // "request": { + // "$ref": "DisksRemoveResourcePoliciesRequest" + // }, // "response": { - // "$ref": "Disk" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.disks.getIamPolicy": +// method id "compute.disks.resize": -type DisksGetIamPolicyCall struct { - s *Service - project string - zone string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type DisksResizeCall struct { + s *Service + project string + zone string + disk string + disksresizerequest *DisksResizeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. +// Resize: Resizes the specified persistent disk. You can only increase +// the size of the disk. // +// - disk: The name of the persistent disk. // - project: Project ID for this request. -// - resource: Name or id of the resource for this request. // - zone: The name of the zone for this request. -func (r *DisksService) GetIamPolicy(project string, zone string, resource string) *DisksGetIamPolicyCall { - c := &DisksGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *DisksService) Resize(project string, zone string, disk string, disksresizerequest *DisksResizeRequest) *DisksResizeCall { + c := &DisksResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.resource = resource + c.disk = disk + c.disksresizerequest = disksresizerequest return c } -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *DisksGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *DisksGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *DisksResizeCall) RequestId(requestId string) *DisksResizeCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *DisksGetIamPolicyCall) Fields(s ...googleapi.Field) *DisksGetIamPolicyCall { +func (c *DisksResizeCall) Fields(s ...googleapi.Field) *DisksResizeCall { 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 *DisksGetIamPolicyCall) IfNoneMatch(entityTag string) *DisksGetIamPolicyCall { - 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 *DisksGetIamPolicyCall) Context(ctx context.Context) *DisksGetIamPolicyCall { +func (c *DisksResizeCall) Context(ctx context.Context) *DisksResizeCall { 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 *DisksGetIamPolicyCall) Header() http.Header { +func (c *DisksResizeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DisksGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *DisksResizeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.disksresizerequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{resource}/getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}/resize") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, + "project": c.project, + "zone": c.zone, + "disk": c.disk, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.disks.getIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *DisksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// Do executes the "compute.disks.resize" 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 *DisksResizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -76810,7 +78690,7 @@ func (c *DisksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -76822,21 +78702,22 @@ func (c *DisksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error } return ret, nil // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", - // "flatPath": "projects/{project}/zones/{zone}/disks/{resource}/getIamPolicy", - // "httpMethod": "GET", - // "id": "compute.disks.getIamPolicy", + // "description": "Resizes the specified persistent disk. You can only increase the size of the disk.", + // "flatPath": "projects/{project}/zones/{zone}/disks/{disk}/resize", + // "httpMethod": "POST", + // "id": "compute.disks.resize", // "parameterOrder": [ // "project", // "zone", - // "resource" + // "disk" // ], // "parameters": { - // "optionsRequestedPolicyVersion": { - // "description": "Requested IAM Policy version.", - // "format": "int32", - // "location": "query", - // "type": "integer" + // "disk": { + // "description": "The name of the persistent disk.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" // }, // "project": { // "description": "Project ID for this request.", @@ -76845,11 +78726,9 @@ func (c *DisksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error // "required": true, // "type": "string" // }, - // "resource": { - // "description": "Name or id of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", // "type": "string" // }, // "zone": { @@ -76860,75 +78739,53 @@ func (c *DisksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/disks/{resource}/getIamPolicy", + // "path": "projects/{project}/zones/{zone}/disks/{disk}/resize", + // "request": { + // "$ref": "DisksResizeRequest" + // }, // "response": { - // "$ref": "Policy" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.disks.insert": +// method id "compute.disks.setIamPolicy": -type DisksInsertCall struct { - s *Service - project string - zone string - disk *Disk - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type DisksSetIamPolicyCall struct { + s *Service + project string + zone string + resource string + zonesetpolicyrequest *ZoneSetPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Insert: Creates a persistent disk in the specified project using the -// data in the request. You can create a disk from a source -// (sourceImage, sourceSnapshot, or sourceDisk) or create an empty 500 -// GB data disk by omitting all properties. You can also create a disk -// that is larger than the default size by specifying the sizeGb -// property. +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. // // - project: Project ID for this request. +// - resource: Name or id of the resource for this request. // - zone: The name of the zone for this request. -func (r *DisksService) Insert(project string, zone string, disk *Disk) *DisksInsertCall { - c := &DisksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *DisksService) SetIamPolicy(project string, zone string, resource string, zonesetpolicyrequest *ZoneSetPolicyRequest) *DisksSetIamPolicyCall { + c := &DisksSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.disk = disk - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *DisksInsertCall) RequestId(requestId string) *DisksInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// SourceImage sets the optional parameter "sourceImage": Source image -// to restore onto a disk. This field is optional. -func (c *DisksInsertCall) SourceImage(sourceImage string) *DisksInsertCall { - c.urlParams_.Set("sourceImage", sourceImage) + c.resource = resource + c.zonesetpolicyrequest = zonesetpolicyrequest 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 *DisksInsertCall) Fields(s ...googleapi.Field) *DisksInsertCall { +func (c *DisksSetIamPolicyCall) Fields(s ...googleapi.Field) *DisksSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -76936,21 +78793,21 @@ func (c *DisksInsertCall) Fields(s ...googleapi.Field) *DisksInsertCall { // 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 *DisksInsertCall) Context(ctx context.Context) *DisksInsertCall { +func (c *DisksSetIamPolicyCall) Context(ctx context.Context) *DisksSetIamPolicyCall { 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 *DisksInsertCall) Header() http.Header { +func (c *DisksSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DisksInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *DisksSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -76958,14 +78815,14 @@ func (c *DisksInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.disk) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.zonesetpolicyrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{resource}/setIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -76973,20 +78830,21 @@ func (c *DisksInsertCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, + "project": c.project, + "zone": c.zone, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.disks.insert" 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 *DisksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.disks.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *DisksSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -77005,7 +78863,7 @@ func (c *DisksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -77017,13 +78875,14 @@ func (c *DisksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { } return ret, nil // { - // "description": "Creates a persistent disk in the specified project using the data in the request. You can create a disk from a source (sourceImage, sourceSnapshot, or sourceDisk) or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property.", - // "flatPath": "projects/{project}/zones/{zone}/disks", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "flatPath": "projects/{project}/zones/{zone}/disks/{resource}/setIamPolicy", // "httpMethod": "POST", - // "id": "compute.disks.insert", + // "id": "compute.disks.setIamPolicy", // "parameterOrder": [ // "project", - // "zone" + // "zone", + // "resource" // ], // "parameters": { // "project": { @@ -77033,14 +78892,11 @@ func (c *DisksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "sourceImage": { - // "description": "Source image to restore onto a disk. This field is optional.", - // "location": "query", + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, // "type": "string" // }, // "zone": { @@ -77051,12 +78907,12 @@ func (c *DisksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/disks", + // "path": "projects/{project}/zones/{zone}/disks/{resource}/setIamPolicy", // "request": { - // "$ref": "Disk" + // "$ref": "ZoneSetPolicyRequest" // }, // "response": { - // "$ref": "Operation" + // "$ref": "Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -77066,182 +78922,113 @@ func (c *DisksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { } -// method id "compute.disks.list": +// method id "compute.disks.setLabels": -type DisksListCall struct { - s *Service - project string - zone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type DisksSetLabelsCall struct { + s *Service + project string + zone string + resource string + zonesetlabelsrequest *ZoneSetLabelsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Retrieves a list of persistent disks contained within the -// specified zone. +// SetLabels: Sets the labels on a disk. To learn more about labels, +// read the Labeling Resources documentation. // // - project: Project ID for this request. +// - resource: Name or id of the resource for this request. // - zone: The name of the zone for this request. -func (r *DisksService) List(project string, zone string) *DisksListCall { - c := &DisksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *DisksService) SetLabels(project string, zone string, resource string, zonesetlabelsrequest *ZoneSetLabelsRequest) *DisksSetLabelsCall { + c := &DisksSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone + c.resource = resource + c.zonesetlabelsrequest = zonesetlabelsrequest return c } -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources -// support two types of filter expressions: expressions that support -// regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a -// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` -// or `:`. For example, if you are filtering Compute Engine instances, -// you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` -// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") -// ``` By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") -// AND (scheduling.automaticRestart = true) ``` If you want to use a -// regular expression, use the `eq` (equal) or `ne` (not equal) operator -// against a single un-parenthesized expression with or without quotes -// or against multiple parenthesized expressions. Examples: `fieldname -// eq unquoted literal` `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" `(fieldname1 eq literal) -// (fieldname2 ne "literal")` The literal value is interpreted as a -// regular expression using Google RE2 library syntax. The literal value -// must match the entire field. For example, to filter for instances -// that do not end with name "instance", you would use `name ne -// .*instance`. -func (c *DisksListCall) Filter(filter string) *DisksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than `maxResults`, Compute Engine returns -// a `nextPageToken` that can be used to get the next page of results in -// subsequent list requests. Acceptable values are `0` to `500`, -// inclusive. (Default: `500`) -func (c *DisksListCall) MaxResults(maxResults int64) *DisksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. You can also sort results in -// descending order based on the creation timestamp using -// `orderBy="creationTimestamp desc". This sorts results based on the -// `creationTimestamp` field in reverse chronological order (newest -// result first). Use this to sort resources like operations so that the -// newest operation is returned first. Currently, only sorting by `name` -// or `creationTimestamp desc` is supported. -func (c *DisksListCall) OrderBy(orderBy string) *DisksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set `pageToken` to the `nextPageToken` returned by a -// previous list request to get the next page of results. -func (c *DisksListCall) PageToken(pageToken string) *DisksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter -// "returnPartialSuccess": Opt-in for partial success behavior which -// provides partial results in case of failure. The default value is -// false. -func (c *DisksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *DisksListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *DisksSetLabelsCall) RequestId(requestId string) *DisksSetLabelsCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *DisksListCall) Fields(s ...googleapi.Field) *DisksListCall { +func (c *DisksSetLabelsCall) Fields(s ...googleapi.Field) *DisksSetLabelsCall { 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 *DisksListCall) IfNoneMatch(entityTag string) *DisksListCall { - 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 *DisksListCall) Context(ctx context.Context) *DisksListCall { +func (c *DisksSetLabelsCall) Context(ctx context.Context) *DisksSetLabelsCall { 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 *DisksListCall) Header() http.Header { +func (c *DisksSetLabelsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DisksListCall) doRequest(alt string) (*http.Response, error) { +func (c *DisksSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.zonesetlabelsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{resource}/setLabels") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, + "project": c.project, + "zone": c.zone, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.disks.list" call. -// Exactly one of *DiskList or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *DiskList.ServerResponse.Header or (if a response was returned at +// Do executes the "compute.disks.setLabels" 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 *DisksListCall) Do(opts ...googleapi.CallOption) (*DiskList, error) { +func (c *DisksSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -77260,7 +79047,7 @@ func (c *DisksListCall) Do(opts ...googleapi.CallOption) (*DiskList, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &DiskList{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -77272,38 +79059,16 @@ func (c *DisksListCall) Do(opts ...googleapi.CallOption) (*DiskList, error) { } return ret, nil // { - // "description": "Retrieves a list of persistent disks contained within the specified zone.", - // "flatPath": "projects/{project}/zones/{zone}/disks", - // "httpMethod": "GET", - // "id": "compute.disks.list", + // "description": "Sets the labels on a disk. To learn more about labels, read the Labeling Resources documentation.", + // "flatPath": "projects/{project}/zones/{zone}/disks/{resource}/setLabels", + // "httpMethod": "POST", + // "id": "compute.disks.setLabels", // "parameterOrder": [ // "project", - // "zone" + // "zone", + // "resource" // ], // "parameters": { - // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -77311,10 +79076,17 @@ func (c *DisksListCall) Do(opts ...googleapi.CallOption) (*DiskList, error) { // "required": true, // "type": "string" // }, - // "returnPartialSuccess": { - // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", - // "type": "boolean" + // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" // }, // "zone": { // "description": "The name of the zone for this request.", @@ -77324,64 +79096,46 @@ func (c *DisksListCall) Do(opts ...googleapi.CallOption) (*DiskList, error) { // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/disks", + // "path": "projects/{project}/zones/{zone}/disks/{resource}/setLabels", + // "request": { + // "$ref": "ZoneSetLabelsRequest" + // }, // "response": { - // "$ref": "DiskList" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// 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 *DisksListCall) Pages(ctx context.Context, f func(*DiskList) 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 "compute.disks.removeResourcePolicies": +// method id "compute.disks.startAsyncReplication": -type DisksRemoveResourcePoliciesCall struct { - s *Service - project string - zone string - disk string - disksremoveresourcepoliciesrequest *DisksRemoveResourcePoliciesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type DisksStartAsyncReplicationCall struct { + s *Service + project string + zone string + disk string + disksstartasyncreplicationrequest *DisksStartAsyncReplicationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// RemoveResourcePolicies: Removes resource policies from a disk. +// StartAsyncReplication: Starts asynchronous replication. Must be +// invoked on the primary disk. // -// - disk: The disk name for this request. +// - disk: The name of the persistent disk. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *DisksService) RemoveResourcePolicies(project string, zone string, disk string, disksremoveresourcepoliciesrequest *DisksRemoveResourcePoliciesRequest) *DisksRemoveResourcePoliciesCall { - c := &DisksRemoveResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *DisksService) StartAsyncReplication(project string, zone string, disk string, disksstartasyncreplicationrequest *DisksStartAsyncReplicationRequest) *DisksStartAsyncReplicationCall { + c := &DisksStartAsyncReplicationCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.disk = disk - c.disksremoveresourcepoliciesrequest = disksremoveresourcepoliciesrequest + c.disksstartasyncreplicationrequest = disksstartasyncreplicationrequest return c } @@ -77396,7 +79150,7 @@ func (r *DisksService) RemoveResourcePolicies(project string, zone string, disk // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *DisksRemoveResourcePoliciesCall) RequestId(requestId string) *DisksRemoveResourcePoliciesCall { +func (c *DisksStartAsyncReplicationCall) RequestId(requestId string) *DisksStartAsyncReplicationCall { c.urlParams_.Set("requestId", requestId) return c } @@ -77404,7 +79158,7 @@ func (c *DisksRemoveResourcePoliciesCall) RequestId(requestId string) *DisksRemo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *DisksRemoveResourcePoliciesCall) Fields(s ...googleapi.Field) *DisksRemoveResourcePoliciesCall { +func (c *DisksStartAsyncReplicationCall) Fields(s ...googleapi.Field) *DisksStartAsyncReplicationCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -77412,21 +79166,21 @@ func (c *DisksRemoveResourcePoliciesCall) Fields(s ...googleapi.Field) *DisksRem // 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 *DisksRemoveResourcePoliciesCall) Context(ctx context.Context) *DisksRemoveResourcePoliciesCall { +func (c *DisksStartAsyncReplicationCall) Context(ctx context.Context) *DisksStartAsyncReplicationCall { 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 *DisksRemoveResourcePoliciesCall) Header() http.Header { +func (c *DisksStartAsyncReplicationCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DisksRemoveResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { +func (c *DisksStartAsyncReplicationCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -77434,14 +79188,14 @@ func (c *DisksRemoveResourcePoliciesCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.disksremoveresourcepoliciesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.disksstartasyncreplicationrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}/removeResourcePolicies") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}/startAsyncReplication") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -77456,14 +79210,14 @@ func (c *DisksRemoveResourcePoliciesCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.disks.removeResourcePolicies" call. +// Do executes the "compute.disks.startAsyncReplication" 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 *DisksRemoveResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *DisksStartAsyncReplicationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -77494,10 +79248,10 @@ func (c *DisksRemoveResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Removes resource policies from a disk.", - // "flatPath": "projects/{project}/zones/{zone}/disks/{disk}/removeResourcePolicies", + // "description": "Starts asynchronous replication. Must be invoked on the primary disk.", + // "flatPath": "projects/{project}/zones/{zone}/disks/{disk}/startAsyncReplication", // "httpMethod": "POST", - // "id": "compute.disks.removeResourcePolicies", + // "id": "compute.disks.startAsyncReplication", // "parameterOrder": [ // "project", // "zone", @@ -77505,7 +79259,7 @@ func (c *DisksRemoveResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Ope // ], // "parameters": { // "disk": { - // "description": "The disk name for this request.", + // "description": "The name of the persistent disk.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -77531,9 +79285,9 @@ func (c *DisksRemoveResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Ope // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/disks/{disk}/removeResourcePolicies", + // "path": "projects/{project}/zones/{zone}/disks/{disk}/startAsyncReplication", // "request": { - // "$ref": "DisksRemoveResourcePoliciesRequest" + // "$ref": "DisksStartAsyncReplicationRequest" // }, // "response": { // "$ref": "Operation" @@ -77546,31 +79300,29 @@ func (c *DisksRemoveResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Ope } -// method id "compute.disks.resize": +// method id "compute.disks.stopAsyncReplication": -type DisksResizeCall struct { - s *Service - project string - zone string - disk string - disksresizerequest *DisksResizeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type DisksStopAsyncReplicationCall struct { + s *Service + project string + zone string + disk string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Resize: Resizes the specified persistent disk. You can only increase -// the size of the disk. +// StopAsyncReplication: Stops asynchronous replication. Can be invoked +// either on the primary or on the secondary disk. // // - disk: The name of the persistent disk. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *DisksService) Resize(project string, zone string, disk string, disksresizerequest *DisksResizeRequest) *DisksResizeCall { - c := &DisksResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *DisksService) StopAsyncReplication(project string, zone string, disk string) *DisksStopAsyncReplicationCall { + c := &DisksStopAsyncReplicationCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.disk = disk - c.disksresizerequest = disksresizerequest return c } @@ -77585,7 +79337,7 @@ func (r *DisksService) Resize(project string, zone string, disk string, disksres // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *DisksResizeCall) RequestId(requestId string) *DisksResizeCall { +func (c *DisksStopAsyncReplicationCall) RequestId(requestId string) *DisksStopAsyncReplicationCall { c.urlParams_.Set("requestId", requestId) return c } @@ -77593,7 +79345,7 @@ func (c *DisksResizeCall) RequestId(requestId string) *DisksResizeCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *DisksResizeCall) Fields(s ...googleapi.Field) *DisksResizeCall { +func (c *DisksStopAsyncReplicationCall) Fields(s ...googleapi.Field) *DisksStopAsyncReplicationCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -77601,21 +79353,21 @@ func (c *DisksResizeCall) Fields(s ...googleapi.Field) *DisksResizeCall { // 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 *DisksResizeCall) Context(ctx context.Context) *DisksResizeCall { +func (c *DisksStopAsyncReplicationCall) Context(ctx context.Context) *DisksStopAsyncReplicationCall { 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 *DisksResizeCall) Header() http.Header { +func (c *DisksStopAsyncReplicationCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DisksResizeCall) doRequest(alt string) (*http.Response, error) { +func (c *DisksStopAsyncReplicationCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -77623,14 +79375,9 @@ func (c *DisksResizeCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.disksresizerequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}/resize") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}/stopAsyncReplication") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -77645,14 +79392,14 @@ func (c *DisksResizeCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.disks.resize" call. +// Do executes the "compute.disks.stopAsyncReplication" 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 *DisksResizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *DisksStopAsyncReplicationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -77683,10 +79430,10 @@ func (c *DisksResizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { } return ret, nil // { - // "description": "Resizes the specified persistent disk. You can only increase the size of the disk.", - // "flatPath": "projects/{project}/zones/{zone}/disks/{disk}/resize", + // "description": "Stops asynchronous replication. Can be invoked either on the primary or on the secondary disk.", + // "flatPath": "projects/{project}/zones/{zone}/disks/{disk}/stopAsyncReplication", // "httpMethod": "POST", - // "id": "compute.disks.resize", + // "id": "compute.disks.stopAsyncReplication", // "parameterOrder": [ // "project", // "zone", @@ -77720,10 +79467,7 @@ func (c *DisksResizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/disks/{disk}/resize", - // "request": { - // "$ref": "DisksResizeRequest" - // }, + // "path": "projects/{project}/zones/{zone}/disks/{disk}/stopAsyncReplication", // "response": { // "$ref": "Operation" // }, @@ -77735,38 +79479,53 @@ func (c *DisksResizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { } -// method id "compute.disks.setIamPolicy": +// method id "compute.disks.stopGroupAsyncReplication": -type DisksSetIamPolicyCall struct { - s *Service - project string - zone string - resource string - zonesetpolicyrequest *ZoneSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type DisksStopGroupAsyncReplicationCall struct { + s *Service + project string + zone string + disksstopgroupasyncreplicationresource *DisksStopGroupAsyncReplicationResource + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. +// StopGroupAsyncReplication: Stops asynchronous replication for a +// consistency group of disks. Can be invoked either in the primary or +// secondary scope. // -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) SetIamPolicy(project string, zone string, resource string, zonesetpolicyrequest *ZoneSetPolicyRequest) *DisksSetIamPolicyCall { - c := &DisksSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - zone: The name of the zone for this request. This must be the zone +// of the primary or secondary disks in the consistency group. +func (r *DisksService) StopGroupAsyncReplication(project string, zone string, disksstopgroupasyncreplicationresource *DisksStopGroupAsyncReplicationResource) *DisksStopGroupAsyncReplicationCall { + c := &DisksStopGroupAsyncReplicationCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.resource = resource - c.zonesetpolicyrequest = zonesetpolicyrequest + c.disksstopgroupasyncreplicationresource = disksstopgroupasyncreplicationresource + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *DisksStopGroupAsyncReplicationCall) RequestId(requestId string) *DisksStopGroupAsyncReplicationCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *DisksSetIamPolicyCall) Fields(s ...googleapi.Field) *DisksSetIamPolicyCall { +func (c *DisksStopGroupAsyncReplicationCall) Fields(s ...googleapi.Field) *DisksStopGroupAsyncReplicationCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -77774,21 +79533,21 @@ func (c *DisksSetIamPolicyCall) Fields(s ...googleapi.Field) *DisksSetIamPolicyC // 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 *DisksSetIamPolicyCall) Context(ctx context.Context) *DisksSetIamPolicyCall { +func (c *DisksStopGroupAsyncReplicationCall) Context(ctx context.Context) *DisksStopGroupAsyncReplicationCall { 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 *DisksSetIamPolicyCall) Header() http.Header { +func (c *DisksStopGroupAsyncReplicationCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DisksSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *DisksStopGroupAsyncReplicationCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -77796,14 +79555,14 @@ func (c *DisksSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.zonesetpolicyrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.disksstopgroupasyncreplicationresource) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{resource}/setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/stopGroupAsyncReplication") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -77811,21 +79570,20 @@ func (c *DisksSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, + "project": c.project, + "zone": c.zone, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.disks.setIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *DisksSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// Do executes the "compute.disks.stopGroupAsyncReplication" 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 *DisksStopGroupAsyncReplicationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -77844,7 +79602,7 @@ func (c *DisksSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -77856,14 +79614,13 @@ func (c *DisksSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", - // "flatPath": "projects/{project}/zones/{zone}/disks/{resource}/setIamPolicy", + // "description": "Stops asynchronous replication for a consistency group of disks. Can be invoked either in the primary or secondary scope.", + // "flatPath": "projects/{project}/zones/{zone}/disks/stopGroupAsyncReplication", // "httpMethod": "POST", - // "id": "compute.disks.setIamPolicy", + // "id": "compute.disks.stopGroupAsyncReplication", // "parameterOrder": [ // "project", - // "zone", - // "resource" + // "zone" // ], // "parameters": { // "project": { @@ -77873,27 +79630,25 @@ func (c *DisksSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error // "required": true, // "type": "string" // }, - // "resource": { - // "description": "Name or id of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", // "type": "string" // }, // "zone": { - // "description": "The name of the zone for this request.", + // "description": "The name of the zone for this request. This must be the zone of the primary or secondary disks in the consistency group.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/disks/{resource}/setIamPolicy", + // "path": "projects/{project}/zones/{zone}/disks/stopGroupAsyncReplication", // "request": { - // "$ref": "ZoneSetPolicyRequest" + // "$ref": "DisksStopGroupAsyncReplicationResource" // }, // "response": { - // "$ref": "Policy" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -77903,54 +79658,38 @@ func (c *DisksSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error } -// method id "compute.disks.setLabels": +// method id "compute.disks.testIamPermissions": -type DisksSetLabelsCall struct { - s *Service - project string - zone string - resource string - zonesetlabelsrequest *ZoneSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type DisksTestIamPermissionsCall struct { + s *Service + project string + zone string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetLabels: Sets the labels on a disk. To learn more about labels, -// read the Labeling Resources documentation. +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. // // - project: Project ID for this request. // - resource: Name or id of the resource for this request. // - zone: The name of the zone for this request. -func (r *DisksService) SetLabels(project string, zone string, resource string, zonesetlabelsrequest *ZoneSetLabelsRequest) *DisksSetLabelsCall { - c := &DisksSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *DisksService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *DisksTestIamPermissionsCall { + c := &DisksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.resource = resource - c.zonesetlabelsrequest = zonesetlabelsrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *DisksSetLabelsCall) RequestId(requestId string) *DisksSetLabelsCall { - c.urlParams_.Set("requestId", requestId) + c.testpermissionsrequest = testpermissionsrequest 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 *DisksSetLabelsCall) Fields(s ...googleapi.Field) *DisksSetLabelsCall { +func (c *DisksTestIamPermissionsCall) Fields(s ...googleapi.Field) *DisksTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -77958,21 +79697,21 @@ func (c *DisksSetLabelsCall) Fields(s ...googleapi.Field) *DisksSetLabelsCall { // 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 *DisksSetLabelsCall) Context(ctx context.Context) *DisksSetLabelsCall { +func (c *DisksTestIamPermissionsCall) Context(ctx context.Context) *DisksTestIamPermissionsCall { 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 *DisksSetLabelsCall) Header() http.Header { +func (c *DisksTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DisksSetLabelsCall) doRequest(alt string) (*http.Response, error) { +func (c *DisksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -77980,14 +79719,14 @@ func (c *DisksSetLabelsCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.zonesetlabelsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{resource}/setLabels") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -78002,14 +79741,14 @@ func (c *DisksSetLabelsCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.disks.setLabels" 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 *DisksSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.disks.testIamPermissions" call. +// Exactly one of *TestPermissionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.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 *DisksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -78028,7 +79767,7 @@ func (c *DisksSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &TestPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -78040,10 +79779,10 @@ func (c *DisksSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error } return ret, nil // { - // "description": "Sets the labels on a disk. To learn more about labels, read the Labeling Resources documentation.", - // "flatPath": "projects/{project}/zones/{zone}/disks/{resource}/setLabels", + // "description": "Returns permissions that a caller has on the specified resource.", + // "flatPath": "projects/{project}/zones/{zone}/disks/{resource}/testIamPermissions", // "httpMethod": "POST", - // "id": "compute.disks.setLabels", + // "id": "compute.disks.testIamPermissions", // "parameterOrder": [ // "project", // "zone", @@ -78057,11 +79796,6 @@ func (c *DisksSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, // "resource": { // "description": "Name or id of the resource for this request.", // "location": "path", @@ -78077,46 +79811,55 @@ func (c *DisksSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/disks/{resource}/setLabels", + // "path": "projects/{project}/zones/{zone}/disks/{resource}/testIamPermissions", // "request": { - // "$ref": "ZoneSetLabelsRequest" + // "$ref": "TestPermissionsRequest" // }, // "response": { - // "$ref": "Operation" + // "$ref": "TestPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.disks.startAsyncReplication": +// method id "compute.disks.update": -type DisksStartAsyncReplicationCall struct { - s *Service - project string - zone string - disk string - disksstartasyncreplicationrequest *DisksStartAsyncReplicationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type DisksUpdateCall struct { + s *Service + project string + zone string + disk string + disk2 *Disk + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// StartAsyncReplication: Starts asynchronous replication. Must be -// invoked on the primary disk. +// Update: Updates the specified disk with the data included in the +// request. The update is performed only on selected fields included as +// part of update-mask. Only the following fields can be modified: +// user_license. // -// - disk: The name of the persistent disk. +// - disk: The disk name for this request. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *DisksService) StartAsyncReplication(project string, zone string, disk string, disksstartasyncreplicationrequest *DisksStartAsyncReplicationRequest) *DisksStartAsyncReplicationCall { - c := &DisksStartAsyncReplicationCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *DisksService) Update(project string, zone string, disk string, disk2 *Disk) *DisksUpdateCall { + c := &DisksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.disk = disk - c.disksstartasyncreplicationrequest = disksstartasyncreplicationrequest + c.disk2 = disk2 + return c +} + +// Paths sets the optional parameter "paths": +func (c *DisksUpdateCall) Paths(paths ...string) *DisksUpdateCall { + c.urlParams_.SetMulti("paths", append([]string{}, paths...)) return c } @@ -78131,15 +79874,22 @@ func (r *DisksService) StartAsyncReplication(project string, zone string, disk s // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *DisksStartAsyncReplicationCall) RequestId(requestId string) *DisksStartAsyncReplicationCall { +func (c *DisksUpdateCall) RequestId(requestId string) *DisksUpdateCall { c.urlParams_.Set("requestId", requestId) return c } +// UpdateMask sets the optional parameter "updateMask": update_mask +// indicates fields to be updated as part of this request. +func (c *DisksUpdateCall) UpdateMask(updateMask string) *DisksUpdateCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *DisksStartAsyncReplicationCall) Fields(s ...googleapi.Field) *DisksStartAsyncReplicationCall { +func (c *DisksUpdateCall) Fields(s ...googleapi.Field) *DisksUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -78147,21 +79897,21 @@ func (c *DisksStartAsyncReplicationCall) Fields(s ...googleapi.Field) *DisksStar // 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 *DisksStartAsyncReplicationCall) Context(ctx context.Context) *DisksStartAsyncReplicationCall { +func (c *DisksUpdateCall) Context(ctx context.Context) *DisksUpdateCall { 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 *DisksStartAsyncReplicationCall) Header() http.Header { +func (c *DisksUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DisksStartAsyncReplicationCall) doRequest(alt string) (*http.Response, error) { +func (c *DisksUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -78169,16 +79919,16 @@ func (c *DisksStartAsyncReplicationCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.disksstartasyncreplicationrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.disk2) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}/startAsyncReplication") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -78191,14 +79941,14 @@ func (c *DisksStartAsyncReplicationCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.disks.startAsyncReplication" call. +// Do executes the "compute.disks.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 *DisksStartAsyncReplicationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *DisksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -78229,10 +79979,10 @@ func (c *DisksStartAsyncReplicationCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Starts asynchronous replication. Must be invoked on the primary disk.", - // "flatPath": "projects/{project}/zones/{zone}/disks/{disk}/startAsyncReplication", - // "httpMethod": "POST", - // "id": "compute.disks.startAsyncReplication", + // "description": "Updates the specified disk with the data included in the request. The update is performed only on selected fields included as part of update-mask. Only the following fields can be modified: user_license.", + // "flatPath": "projects/{project}/zones/{zone}/disks/{disk}", + // "httpMethod": "PATCH", + // "id": "compute.disks.update", // "parameterOrder": [ // "project", // "zone", @@ -78240,12 +79990,17 @@ func (c *DisksStartAsyncReplicationCall) Do(opts ...googleapi.CallOption) (*Oper // ], // "parameters": { // "disk": { - // "description": "The name of the persistent disk.", + // "description": "The disk name for this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, + // "paths": { + // "location": "query", + // "repeated": true, + // "type": "string" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -78258,6 +80013,12 @@ func (c *DisksStartAsyncReplicationCall) Do(opts ...googleapi.CallOption) (*Oper // "location": "query", // "type": "string" // }, + // "updateMask": { + // "description": "update_mask indicates fields to be updated as part of this request.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, // "zone": { // "description": "The name of the zone for this request.", // "location": "path", @@ -78266,9 +80027,9 @@ func (c *DisksStartAsyncReplicationCall) Do(opts ...googleapi.CallOption) (*Oper // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/disks/{disk}/startAsyncReplication", + // "path": "projects/{project}/zones/{zone}/disks/{disk}", // "request": { - // "$ref": "DisksStartAsyncReplicationRequest" + // "$ref": "Disk" // }, // "response": { // "$ref": "Operation" @@ -78281,29 +80042,25 @@ func (c *DisksStartAsyncReplicationCall) Do(opts ...googleapi.CallOption) (*Oper } -// method id "compute.disks.stopAsyncReplication": +// method id "compute.externalVpnGateways.delete": -type DisksStopAsyncReplicationCall struct { - s *Service - project string - zone string - disk string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ExternalVpnGatewaysDeleteCall struct { + s *Service + project string + externalVpnGateway string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// StopAsyncReplication: Stops asynchronous replication. Can be invoked -// either on the primary or on the secondary disk. +// Delete: Deletes the specified externalVpnGateway. // -// - disk: The name of the persistent disk. +// - externalVpnGateway: Name of the externalVpnGateways to delete. // - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) StopAsyncReplication(project string, zone string, disk string) *DisksStopAsyncReplicationCall { - c := &DisksStopAsyncReplicationCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ExternalVpnGatewaysService) Delete(project string, externalVpnGateway string) *ExternalVpnGatewaysDeleteCall { + c := &ExternalVpnGatewaysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.disk = disk + c.externalVpnGateway = externalVpnGateway return c } @@ -78318,7 +80075,7 @@ func (r *DisksService) StopAsyncReplication(project string, zone string, disk st // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *DisksStopAsyncReplicationCall) RequestId(requestId string) *DisksStopAsyncReplicationCall { +func (c *ExternalVpnGatewaysDeleteCall) RequestId(requestId string) *ExternalVpnGatewaysDeleteCall { c.urlParams_.Set("requestId", requestId) return c } @@ -78326,7 +80083,7 @@ func (c *DisksStopAsyncReplicationCall) RequestId(requestId string) *DisksStopAs // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *DisksStopAsyncReplicationCall) Fields(s ...googleapi.Field) *DisksStopAsyncReplicationCall { +func (c *ExternalVpnGatewaysDeleteCall) Fields(s ...googleapi.Field) *ExternalVpnGatewaysDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -78334,21 +80091,21 @@ func (c *DisksStopAsyncReplicationCall) Fields(s ...googleapi.Field) *DisksStopA // 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 *DisksStopAsyncReplicationCall) Context(ctx context.Context) *DisksStopAsyncReplicationCall { +func (c *ExternalVpnGatewaysDeleteCall) Context(ctx context.Context) *ExternalVpnGatewaysDeleteCall { 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 *DisksStopAsyncReplicationCall) Header() http.Header { +func (c *ExternalVpnGatewaysDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DisksStopAsyncReplicationCall) doRequest(alt string) (*http.Response, error) { +func (c *ExternalVpnGatewaysDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -78358,29 +80115,28 @@ func (c *DisksStopAsyncReplicationCall) doRequest(alt string) (*http.Response, e var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}/stopAsyncReplication") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/externalVpnGateways/{externalVpnGateway}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "disk": c.disk, + "project": c.project, + "externalVpnGateway": c.externalVpnGateway, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.disks.stopAsyncReplication" call. +// Do executes the "compute.externalVpnGateways.delete" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *DisksStopAsyncReplicationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ExternalVpnGatewaysDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -78411,20 +80167,19 @@ func (c *DisksStopAsyncReplicationCall) Do(opts ...googleapi.CallOption) (*Opera } return ret, nil // { - // "description": "Stops asynchronous replication. Can be invoked either on the primary or on the secondary disk.", - // "flatPath": "projects/{project}/zones/{zone}/disks/{disk}/stopAsyncReplication", - // "httpMethod": "POST", - // "id": "compute.disks.stopAsyncReplication", + // "description": "Deletes the specified externalVpnGateway.", + // "flatPath": "projects/{project}/global/externalVpnGateways/{externalVpnGateway}", + // "httpMethod": "DELETE", + // "id": "compute.externalVpnGateways.delete", // "parameterOrder": [ // "project", - // "zone", - // "disk" + // "externalVpnGateway" // ], // "parameters": { - // "disk": { - // "description": "The name of the persistent disk.", + // "externalVpnGateway": { + // "description": "Name of the externalVpnGateways to delete.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // }, @@ -78439,16 +80194,9 @@ func (c *DisksStopAsyncReplicationCall) Do(opts ...googleapi.CallOption) (*Opera // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/disks/{disk}/stopAsyncReplication", + // "path": "projects/{project}/global/externalVpnGateways/{externalVpnGateway}", // "response": { // "$ref": "Operation" // }, @@ -78460,111 +80208,100 @@ func (c *DisksStopAsyncReplicationCall) Do(opts ...googleapi.CallOption) (*Opera } -// method id "compute.disks.stopGroupAsyncReplication": +// method id "compute.externalVpnGateways.get": -type DisksStopGroupAsyncReplicationCall struct { - s *Service - project string - zone string - disksstopgroupasyncreplicationresource *DisksStopGroupAsyncReplicationResource - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ExternalVpnGatewaysGetCall struct { + s *Service + project string + externalVpnGateway string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// StopGroupAsyncReplication: Stops asynchronous replication for a -// consistency group of disks. Can be invoked either in the primary or -// secondary scope. +// Get: Returns the specified externalVpnGateway. Get a list of +// available externalVpnGateways by making a list() request. // -// - project: Project ID for this request. -// - zone: The name of the zone for this request. This must be the zone -// of the primary or secondary disks in the consistency group. -func (r *DisksService) StopGroupAsyncReplication(project string, zone string, disksstopgroupasyncreplicationresource *DisksStopGroupAsyncReplicationResource) *DisksStopGroupAsyncReplicationCall { - c := &DisksStopGroupAsyncReplicationCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - externalVpnGateway: Name of the externalVpnGateway to return. +// - project: Project ID for this request. +func (r *ExternalVpnGatewaysService) Get(project string, externalVpnGateway string) *ExternalVpnGatewaysGetCall { + c := &ExternalVpnGatewaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.disksstopgroupasyncreplicationresource = disksstopgroupasyncreplicationresource - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *DisksStopGroupAsyncReplicationCall) RequestId(requestId string) *DisksStopGroupAsyncReplicationCall { - c.urlParams_.Set("requestId", requestId) + c.externalVpnGateway = externalVpnGateway 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 *DisksStopGroupAsyncReplicationCall) Fields(s ...googleapi.Field) *DisksStopGroupAsyncReplicationCall { +func (c *ExternalVpnGatewaysGetCall) Fields(s ...googleapi.Field) *ExternalVpnGatewaysGetCall { 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 *ExternalVpnGatewaysGetCall) IfNoneMatch(entityTag string) *ExternalVpnGatewaysGetCall { + 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 *DisksStopGroupAsyncReplicationCall) Context(ctx context.Context) *DisksStopGroupAsyncReplicationCall { +func (c *ExternalVpnGatewaysGetCall) Context(ctx context.Context) *ExternalVpnGatewaysGetCall { 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 *DisksStopGroupAsyncReplicationCall) Header() http.Header { +func (c *ExternalVpnGatewaysGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DisksStopGroupAsyncReplicationCall) doRequest(alt string) (*http.Response, error) { +func (c *ExternalVpnGatewaysGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.disksstopgroupasyncreplicationresource) - 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) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/stopGroupAsyncReplication") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/externalVpnGateways/{externalVpnGateway}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, + "project": c.project, + "externalVpnGateway": c.externalVpnGateway, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.disks.stopGroupAsyncReplication" 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 *DisksStopGroupAsyncReplicationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.externalVpnGateways.get" call. +// Exactly one of *ExternalVpnGateway or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ExternalVpnGateway.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 *ExternalVpnGatewaysGetCall) Do(opts ...googleapi.CallOption) (*ExternalVpnGateway, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -78583,7 +80320,7 @@ func (c *DisksStopGroupAsyncReplicationCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &ExternalVpnGateway{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -78595,82 +80332,85 @@ func (c *DisksStopGroupAsyncReplicationCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Stops asynchronous replication for a consistency group of disks. Can be invoked either in the primary or secondary scope.", - // "flatPath": "projects/{project}/zones/{zone}/disks/stopGroupAsyncReplication", - // "httpMethod": "POST", - // "id": "compute.disks.stopGroupAsyncReplication", + // "description": "Returns the specified externalVpnGateway. Get a list of available externalVpnGateways by making a list() request.", + // "flatPath": "projects/{project}/global/externalVpnGateways/{externalVpnGateway}", + // "httpMethod": "GET", + // "id": "compute.externalVpnGateways.get", // "parameterOrder": [ // "project", - // "zone" + // "externalVpnGateway" // ], // "parameters": { - // "project": { - // "description": "Project ID for this request.", + // "externalVpnGateway": { + // "description": "Name of the externalVpnGateway to return.", // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request. This must be the zone of the primary or secondary disks in the consistency group.", + // "project": { + // "description": "Project ID for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/disks/stopGroupAsyncReplication", - // "request": { - // "$ref": "DisksStopGroupAsyncReplicationResource" - // }, + // "path": "projects/{project}/global/externalVpnGateways/{externalVpnGateway}", // "response": { - // "$ref": "Operation" + // "$ref": "ExternalVpnGateway" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.disks.testIamPermissions": +// method id "compute.externalVpnGateways.insert": -type DisksTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ExternalVpnGatewaysInsertCall struct { + s *Service + project string + externalvpngateway *ExternalVpnGateway + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// Insert: Creates a ExternalVpnGateway in the specified project using +// the data included in the request. // // - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *DisksTestIamPermissionsCall { - c := &DisksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ExternalVpnGatewaysService) Insert(project string, externalvpngateway *ExternalVpnGateway) *ExternalVpnGatewaysInsertCall { + c := &ExternalVpnGatewaysInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest + c.externalvpngateway = externalvpngateway + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *ExternalVpnGatewaysInsertCall) RequestId(requestId string) *ExternalVpnGatewaysInsertCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *DisksTestIamPermissionsCall) Fields(s ...googleapi.Field) *DisksTestIamPermissionsCall { +func (c *ExternalVpnGatewaysInsertCall) Fields(s ...googleapi.Field) *ExternalVpnGatewaysInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -78678,21 +80418,21 @@ func (c *DisksTestIamPermissionsCall) Fields(s ...googleapi.Field) *DisksTestIam // 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 *DisksTestIamPermissionsCall) Context(ctx context.Context) *DisksTestIamPermissionsCall { +func (c *ExternalVpnGatewaysInsertCall) Context(ctx context.Context) *ExternalVpnGatewaysInsertCall { 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 *DisksTestIamPermissionsCall) Header() http.Header { +func (c *ExternalVpnGatewaysInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DisksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ExternalVpnGatewaysInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -78700,14 +80440,14 @@ func (c *DisksTestIamPermissionsCall) doRequest(alt string) (*http.Response, err } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.externalvpngateway) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/externalVpnGateways") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -78715,21 +80455,19 @@ func (c *DisksTestIamPermissionsCall) doRequest(alt string) (*http.Response, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.disks.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *DisksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { + "project": c.project, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.externalVpnGateways.insert" 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 *ExternalVpnGatewaysInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -78748,7 +80486,7 @@ func (c *DisksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPer if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestPermissionsResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -78760,14 +80498,12 @@ func (c *DisksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPer } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "flatPath": "projects/{project}/zones/{zone}/disks/{resource}/testIamPermissions", + // "description": "Creates a ExternalVpnGateway in the specified project using the data included in the request.", + // "flatPath": "projects/{project}/global/externalVpnGateways", // "httpMethod": "POST", - // "id": "compute.disks.testIamPermissions", + // "id": "compute.externalVpnGateways.insert", // "parameterOrder": [ - // "project", - // "zone", - // "resource" + // "project" // ], // "parameters": { // "project": { @@ -78777,159 +80513,199 @@ func (c *DisksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPer // "required": true, // "type": "string" // }, - // "resource": { - // "description": "Name or id of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" - // }, - // "zone": { - // "description": "The name of the zone for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/disks/{resource}/testIamPermissions", + // "path": "projects/{project}/global/externalVpnGateways", // "request": { - // "$ref": "TestPermissionsRequest" + // "$ref": "ExternalVpnGateway" // }, // "response": { - // "$ref": "TestPermissionsResponse" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.disks.update": +// method id "compute.externalVpnGateways.list": -type DisksUpdateCall struct { - s *Service - project string - zone string - disk string - disk2 *Disk - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ExternalVpnGatewaysListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Update: Updates the specified disk with the data included in the -// request. The update is performed only on selected fields included as -// part of update-mask. Only the following fields can be modified: -// user_license. +// List: Retrieves the list of ExternalVpnGateway available to the +// specified project. // -// - disk: The disk name for this request. // - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *DisksService) Update(project string, zone string, disk string, disk2 *Disk) *DisksUpdateCall { - c := &DisksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ExternalVpnGatewaysService) List(project string) *ExternalVpnGatewaysListCall { + c := &ExternalVpnGatewaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.disk = disk - c.disk2 = disk2 return c } -// Paths sets the optional parameter "paths": -func (c *DisksUpdateCall) Paths(paths ...string) *DisksUpdateCall { - c.urlParams_.SetMulti("paths", append([]string{}, paths...)) +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources +// support two types of filter expressions: expressions that support +// regular expressions and expressions that follow API improvement +// proposal AIP-160. If you want to use AIP-160, your expression must +// specify the field name, an operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` +// or `:`. For example, if you are filtering Compute Engine instances, +// you can exclude instances named `example-instance` by specifying +// `name != example-instance`. The `:` operator can be used with string +// fields to match substrings. For non-string fields it is equivalent to +// the `=` operator. The `:*` comparison can be used to test whether a +// key has been defined. For example, to find all objects with `owner` +// label use: ``` labels.owner:* ``` You can also filter nested fields. +// For example, you could specify `scheduling.automaticRestart = false` +// to include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` If you want to use a +// regular expression, use the `eq` (equal) or `ne` (not equal) operator +// against a single un-parenthesized expression with or without quotes +// or against multiple parenthesized expressions. Examples: `fieldname +// eq unquoted literal` `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" `(fieldname1 eq literal) +// (fieldname2 ne "literal")` The literal value is interpreted as a +// regular expression using Google RE2 library syntax. The literal value +// must match the entire field. For example, to filter for instances +// that do not end with name "instance", you would use `name ne +// .*instance`. +func (c *ExternalVpnGatewaysListCall) Filter(filter string) *ExternalVpnGatewaysListCall { + c.urlParams_.Set("filter", filter) return c } -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *DisksUpdateCall) RequestId(requestId string) *DisksUpdateCall { - c.urlParams_.Set("requestId", requestId) +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *ExternalVpnGatewaysListCall) MaxResults(maxResults int64) *ExternalVpnGatewaysListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } -// UpdateMask sets the optional parameter "updateMask": update_mask -// indicates fields to be updated as part of this request. -func (c *DisksUpdateCall) UpdateMask(updateMask string) *DisksUpdateCall { - c.urlParams_.Set("updateMask", updateMask) +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *ExternalVpnGatewaysListCall) OrderBy(orderBy string) *ExternalVpnGatewaysListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *ExternalVpnGatewaysListCall) PageToken(pageToken string) *ExternalVpnGatewaysListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *ExternalVpnGatewaysListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ExternalVpnGatewaysListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) 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 *DisksUpdateCall) Fields(s ...googleapi.Field) *DisksUpdateCall { +func (c *ExternalVpnGatewaysListCall) Fields(s ...googleapi.Field) *ExternalVpnGatewaysListCall { 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 *ExternalVpnGatewaysListCall) IfNoneMatch(entityTag string) *ExternalVpnGatewaysListCall { + 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 *DisksUpdateCall) Context(ctx context.Context) *DisksUpdateCall { +func (c *ExternalVpnGatewaysListCall) Context(ctx context.Context) *ExternalVpnGatewaysListCall { 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 *DisksUpdateCall) Header() http.Header { +func (c *ExternalVpnGatewaysListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DisksUpdateCall) doRequest(alt string) (*http.Response, error) { +func (c *ExternalVpnGatewaysListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.disk2) - 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) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/{disk}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/externalVpnGateways") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, - "zone": c.zone, - "disk": c.disk, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.disks.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 *DisksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.externalVpnGateways.list" call. +// Exactly one of *ExternalVpnGatewayList or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ExternalVpnGatewayList.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 *ExternalVpnGatewaysListCall) Do(opts ...googleapi.CallOption) (*ExternalVpnGatewayList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -78948,7 +80724,7 @@ func (c *DisksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &ExternalVpnGatewayList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -78960,111 +80736,113 @@ func (c *DisksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { } return ret, nil // { - // "description": "Updates the specified disk with the data included in the request. The update is performed only on selected fields included as part of update-mask. Only the following fields can be modified: user_license.", - // "flatPath": "projects/{project}/zones/{zone}/disks/{disk}", - // "httpMethod": "PATCH", - // "id": "compute.disks.update", + // "description": "Retrieves the list of ExternalVpnGateway available to the specified project.", + // "flatPath": "projects/{project}/global/externalVpnGateways", + // "httpMethod": "GET", + // "id": "compute.externalVpnGateways.list", // "parameterOrder": [ - // "project", - // "zone", - // "disk" + // "project" // ], // "parameters": { - // "disk": { - // "description": "The disk name for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, - // "type": "string" - // }, - // "paths": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", // "location": "query", - // "repeated": true, // "type": "string" // }, - // "project": { - // "description": "Project ID for this request.", - // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - // "required": true, - // "type": "string" + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", // "location": "query", // "type": "string" // }, - // "updateMask": { - // "description": "update_mask indicates fields to be updated as part of this request.", - // "format": "google-fieldmask", + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", // "location": "query", // "type": "string" // }, - // "zone": { - // "description": "The name of the zone for this request.", + // "project": { + // "description": "Project ID for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "location": "query", + // "type": "boolean" // } // }, - // "path": "projects/{project}/zones/{zone}/disks/{disk}", - // "request": { - // "$ref": "Disk" - // }, + // "path": "projects/{project}/global/externalVpnGateways", // "response": { - // "$ref": "Operation" + // "$ref": "ExternalVpnGatewayList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.externalVpnGateways.delete": +// 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 *ExternalVpnGatewaysListCall) Pages(ctx context.Context, f func(*ExternalVpnGatewayList) 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 ExternalVpnGatewaysDeleteCall struct { - s *Service - project string - externalVpnGateway string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "compute.externalVpnGateways.setLabels": + +type ExternalVpnGatewaysSetLabelsCall struct { + s *Service + project string + resource string + globalsetlabelsrequest *GlobalSetLabelsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified externalVpnGateway. +// SetLabels: Sets the labels on an ExternalVpnGateway. To learn more +// about labels, read the Labeling Resources documentation. // -// - externalVpnGateway: Name of the externalVpnGateways to delete. // - project: Project ID for this request. -func (r *ExternalVpnGatewaysService) Delete(project string, externalVpnGateway string) *ExternalVpnGatewaysDeleteCall { - c := &ExternalVpnGatewaysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - resource: Name or id of the resource for this request. +func (r *ExternalVpnGatewaysService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *ExternalVpnGatewaysSetLabelsCall { + c := &ExternalVpnGatewaysSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.externalVpnGateway = externalVpnGateway - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *ExternalVpnGatewaysDeleteCall) RequestId(requestId string) *ExternalVpnGatewaysDeleteCall { - c.urlParams_.Set("requestId", requestId) + c.resource = resource + c.globalsetlabelsrequest = globalsetlabelsrequest 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 *ExternalVpnGatewaysDeleteCall) Fields(s ...googleapi.Field) *ExternalVpnGatewaysDeleteCall { +func (c *ExternalVpnGatewaysSetLabelsCall) Fields(s ...googleapi.Field) *ExternalVpnGatewaysSetLabelsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -79072,21 +80850,21 @@ func (c *ExternalVpnGatewaysDeleteCall) Fields(s ...googleapi.Field) *ExternalVp // 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 *ExternalVpnGatewaysDeleteCall) Context(ctx context.Context) *ExternalVpnGatewaysDeleteCall { +func (c *ExternalVpnGatewaysSetLabelsCall) Context(ctx context.Context) *ExternalVpnGatewaysSetLabelsCall { 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 *ExternalVpnGatewaysDeleteCall) Header() http.Header { +func (c *ExternalVpnGatewaysSetLabelsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ExternalVpnGatewaysDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ExternalVpnGatewaysSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -79094,30 +80872,35 @@ func (c *ExternalVpnGatewaysDeleteCall) doRequest(alt string) (*http.Response, e } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetlabelsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/externalVpnGateways/{externalVpnGateway}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/externalVpnGateways/{resource}/setLabels") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "externalVpnGateway": c.externalVpnGateway, + "project": c.project, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.externalVpnGateways.delete" call. +// Do executes the "compute.externalVpnGateways.setLabels" 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 *ExternalVpnGatewaysDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ExternalVpnGatewaysSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -79148,22 +80931,15 @@ func (c *ExternalVpnGatewaysDeleteCall) Do(opts ...googleapi.CallOption) (*Opera } return ret, nil // { - // "description": "Deletes the specified externalVpnGateway.", - // "flatPath": "projects/{project}/global/externalVpnGateways/{externalVpnGateway}", - // "httpMethod": "DELETE", - // "id": "compute.externalVpnGateways.delete", + // "description": "Sets the labels on an ExternalVpnGateway. To learn more about labels, read the Labeling Resources documentation.", + // "flatPath": "projects/{project}/global/externalVpnGateways/{resource}/setLabels", + // "httpMethod": "POST", + // "id": "compute.externalVpnGateways.setLabels", // "parameterOrder": [ // "project", - // "externalVpnGateway" + // "resource" // ], // "parameters": { - // "externalVpnGateway": { - // "description": "Name of the externalVpnGateways to delete.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -79171,13 +80947,18 @@ func (c *ExternalVpnGatewaysDeleteCall) Do(opts ...googleapi.CallOption) (*Opera // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/global/externalVpnGateways/{externalVpnGateway}", + // "path": "projects/{project}/global/externalVpnGateways/{resource}/setLabels", + // "request": { + // "$ref": "GlobalSetLabelsRequest" + // }, // "response": { // "$ref": "Operation" // }, @@ -79189,100 +80970,93 @@ func (c *ExternalVpnGatewaysDeleteCall) Do(opts ...googleapi.CallOption) (*Opera } -// method id "compute.externalVpnGateways.get": +// method id "compute.externalVpnGateways.testIamPermissions": -type ExternalVpnGatewaysGetCall struct { - s *Service - project string - externalVpnGateway string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ExternalVpnGatewaysTestIamPermissionsCall struct { + s *Service + project string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified externalVpnGateway. Get a list of -// available externalVpnGateways by making a list() request. +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. // -// - externalVpnGateway: Name of the externalVpnGateway to return. // - project: Project ID for this request. -func (r *ExternalVpnGatewaysService) Get(project string, externalVpnGateway string) *ExternalVpnGatewaysGetCall { - c := &ExternalVpnGatewaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - resource: Name or id of the resource for this request. +func (r *ExternalVpnGatewaysService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *ExternalVpnGatewaysTestIamPermissionsCall { + c := &ExternalVpnGatewaysTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.externalVpnGateway = externalVpnGateway + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest 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 *ExternalVpnGatewaysGetCall) Fields(s ...googleapi.Field) *ExternalVpnGatewaysGetCall { +func (c *ExternalVpnGatewaysTestIamPermissionsCall) Fields(s ...googleapi.Field) *ExternalVpnGatewaysTestIamPermissionsCall { 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 *ExternalVpnGatewaysGetCall) IfNoneMatch(entityTag string) *ExternalVpnGatewaysGetCall { - 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 *ExternalVpnGatewaysGetCall) Context(ctx context.Context) *ExternalVpnGatewaysGetCall { +func (c *ExternalVpnGatewaysTestIamPermissionsCall) Context(ctx context.Context) *ExternalVpnGatewaysTestIamPermissionsCall { 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 *ExternalVpnGatewaysGetCall) Header() http.Header { +func (c *ExternalVpnGatewaysTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ExternalVpnGatewaysGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ExternalVpnGatewaysTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/externalVpnGateways/{externalVpnGateway}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/externalVpnGateways/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "externalVpnGateway": c.externalVpnGateway, + "project": c.project, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.externalVpnGateways.get" call. -// Exactly one of *ExternalVpnGateway or error will be non-nil. Any +// Do executes the "compute.externalVpnGateways.testIamPermissions" call. +// Exactly one of *TestPermissionsResponse or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either -// *ExternalVpnGateway.ServerResponse.Header or (if a response was +// *TestPermissionsResponse.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 *ExternalVpnGatewaysGetCall) Do(opts ...googleapi.CallOption) (*ExternalVpnGateway, error) { +func (c *ExternalVpnGatewaysTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -79301,7 +81075,7 @@ func (c *ExternalVpnGatewaysGetCall) Do(opts ...googleapi.CallOption) (*External if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ExternalVpnGateway{ + ret := &TestPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -79313,33 +81087,36 @@ func (c *ExternalVpnGatewaysGetCall) Do(opts ...googleapi.CallOption) (*External } return ret, nil // { - // "description": "Returns the specified externalVpnGateway. Get a list of available externalVpnGateways by making a list() request.", - // "flatPath": "projects/{project}/global/externalVpnGateways/{externalVpnGateway}", - // "httpMethod": "GET", - // "id": "compute.externalVpnGateways.get", + // "description": "Returns permissions that a caller has on the specified resource.", + // "flatPath": "projects/{project}/global/externalVpnGateways/{resource}/testIamPermissions", + // "httpMethod": "POST", + // "id": "compute.externalVpnGateways.testIamPermissions", // "parameterOrder": [ // "project", - // "externalVpnGateway" + // "resource" // ], // "parameters": { - // "externalVpnGateway": { - // "description": "Name of the externalVpnGateway to return.", + // "project": { + // "description": "Project ID for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" // }, - // "project": { - // "description": "Project ID for this request.", + // "resource": { + // "description": "Name or id of the resource for this request.", // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/global/externalVpnGateways/{externalVpnGateway}", + // "path": "projects/{project}/global/externalVpnGateways/{resource}/testIamPermissions", + // "request": { + // "$ref": "TestPermissionsRequest" + // }, // "response": { - // "$ref": "ExternalVpnGateway" + // "$ref": "TestPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -79350,25 +81127,35 @@ func (c *ExternalVpnGatewaysGetCall) Do(opts ...googleapi.CallOption) (*External } -// method id "compute.externalVpnGateways.insert": +// method id "compute.firewallPolicies.addAssociation": -type ExternalVpnGatewaysInsertCall struct { - s *Service - project string - externalvpngateway *ExternalVpnGateway - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FirewallPoliciesAddAssociationCall struct { + s *Service + firewallPolicy string + firewallpolicyassociation *FirewallPolicyAssociation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Insert: Creates a ExternalVpnGateway in the specified project using -// the data included in the request. +// AddAssociation: Inserts an association for the specified firewall +// policy. // -// - project: Project ID for this request. -func (r *ExternalVpnGatewaysService) Insert(project string, externalvpngateway *ExternalVpnGateway) *ExternalVpnGatewaysInsertCall { - c := &ExternalVpnGatewaysInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.externalvpngateway = externalvpngateway +// - firewallPolicy: Name of the firewall policy to update. +func (r *FirewallPoliciesService) AddAssociation(firewallPolicy string, firewallpolicyassociation *FirewallPolicyAssociation) *FirewallPoliciesAddAssociationCall { + c := &FirewallPoliciesAddAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.firewallPolicy = firewallPolicy + c.firewallpolicyassociation = firewallpolicyassociation + return c +} + +// ReplaceExistingAssociation sets the optional parameter +// "replaceExistingAssociation": Indicates whether or not to replace it +// if an association of the attachment already exists. This is false by +// default, in which case an error will be returned if an association +// already exists. +func (c *FirewallPoliciesAddAssociationCall) ReplaceExistingAssociation(replaceExistingAssociation bool) *FirewallPoliciesAddAssociationCall { + c.urlParams_.Set("replaceExistingAssociation", fmt.Sprint(replaceExistingAssociation)) return c } @@ -79383,7 +81170,7 @@ func (r *ExternalVpnGatewaysService) Insert(project string, externalvpngateway * // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *ExternalVpnGatewaysInsertCall) RequestId(requestId string) *ExternalVpnGatewaysInsertCall { +func (c *FirewallPoliciesAddAssociationCall) RequestId(requestId string) *FirewallPoliciesAddAssociationCall { c.urlParams_.Set("requestId", requestId) return c } @@ -79391,7 +81178,7 @@ func (c *ExternalVpnGatewaysInsertCall) RequestId(requestId string) *ExternalVpn // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ExternalVpnGatewaysInsertCall) Fields(s ...googleapi.Field) *ExternalVpnGatewaysInsertCall { +func (c *FirewallPoliciesAddAssociationCall) Fields(s ...googleapi.Field) *FirewallPoliciesAddAssociationCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -79399,21 +81186,21 @@ func (c *ExternalVpnGatewaysInsertCall) Fields(s ...googleapi.Field) *ExternalVp // 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 *ExternalVpnGatewaysInsertCall) Context(ctx context.Context) *ExternalVpnGatewaysInsertCall { +func (c *FirewallPoliciesAddAssociationCall) Context(ctx context.Context) *FirewallPoliciesAddAssociationCall { 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 *ExternalVpnGatewaysInsertCall) Header() http.Header { +func (c *FirewallPoliciesAddAssociationCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ExternalVpnGatewaysInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallPoliciesAddAssociationCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -79421,14 +81208,14 @@ func (c *ExternalVpnGatewaysInsertCall) doRequest(alt string) (*http.Response, e } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.externalvpngateway) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallpolicyassociation) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/externalVpnGateways") + urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/addAssociation") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -79436,19 +81223,19 @@ func (c *ExternalVpnGatewaysInsertCall) doRequest(alt string) (*http.Response, e } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, + "firewallPolicy": c.firewallPolicy, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.externalVpnGateways.insert" call. +// Do executes the "compute.firewallPolicies.addAssociation" 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 *ExternalVpnGatewaysInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *FirewallPoliciesAddAssociationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -79479,30 +81266,35 @@ func (c *ExternalVpnGatewaysInsertCall) Do(opts ...googleapi.CallOption) (*Opera } return ret, nil // { - // "description": "Creates a ExternalVpnGateway in the specified project using the data included in the request.", - // "flatPath": "projects/{project}/global/externalVpnGateways", + // "description": "Inserts an association for the specified firewall policy.", + // "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/addAssociation", // "httpMethod": "POST", - // "id": "compute.externalVpnGateways.insert", + // "id": "compute.firewallPolicies.addAssociation", // "parameterOrder": [ - // "project" + // "firewallPolicy" // ], // "parameters": { - // "project": { - // "description": "Project ID for this request.", + // "firewallPolicy": { + // "description": "Name of the firewall policy to update.", // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "pattern": "(firewallPolicies/)?[0-9]{0,20}", // "required": true, // "type": "string" // }, + // "replaceExistingAssociation": { + // "description": "Indicates whether or not to replace it if an association of the attachment already exists. This is false by default, in which case an error will be returned if an association already exists.", + // "location": "query", + // "type": "boolean" + // }, // "requestId": { // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" // } // }, - // "path": "projects/{project}/global/externalVpnGateways", + // "path": "locations/global/firewallPolicies/{firewallPolicy}/addAssociation", // "request": { - // "$ref": "ExternalVpnGateway" + // "$ref": "FirewallPolicyAssociation" // }, // "response": { // "$ref": "Operation" @@ -79515,178 +81307,104 @@ func (c *ExternalVpnGatewaysInsertCall) Do(opts ...googleapi.CallOption) (*Opera } -// method id "compute.externalVpnGateways.list": +// method id "compute.firewallPolicies.addRule": -type ExternalVpnGatewaysListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type FirewallPoliciesAddRuleCall struct { + s *Service + firewallPolicy string + firewallpolicyrule *FirewallPolicyRule + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Retrieves the list of ExternalVpnGateway available to the -// specified project. +// AddRule: Inserts a rule into a firewall policy. // -// - project: Project ID for this request. -func (r *ExternalVpnGatewaysService) List(project string) *ExternalVpnGatewaysListCall { - c := &ExternalVpnGatewaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources -// support two types of filter expressions: expressions that support -// regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a -// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` -// or `:`. For example, if you are filtering Compute Engine instances, -// you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` -// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") -// ``` By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") -// AND (scheduling.automaticRestart = true) ``` If you want to use a -// regular expression, use the `eq` (equal) or `ne` (not equal) operator -// against a single un-parenthesized expression with or without quotes -// or against multiple parenthesized expressions. Examples: `fieldname -// eq unquoted literal` `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" `(fieldname1 eq literal) -// (fieldname2 ne "literal")` The literal value is interpreted as a -// regular expression using Google RE2 library syntax. The literal value -// must match the entire field. For example, to filter for instances -// that do not end with name "instance", you would use `name ne -// .*instance`. -func (c *ExternalVpnGatewaysListCall) Filter(filter string) *ExternalVpnGatewaysListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than `maxResults`, Compute Engine returns -// a `nextPageToken` that can be used to get the next page of results in -// subsequent list requests. Acceptable values are `0` to `500`, -// inclusive. (Default: `500`) -func (c *ExternalVpnGatewaysListCall) MaxResults(maxResults int64) *ExternalVpnGatewaysListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. You can also sort results in -// descending order based on the creation timestamp using -// `orderBy="creationTimestamp desc". This sorts results based on the -// `creationTimestamp` field in reverse chronological order (newest -// result first). Use this to sort resources like operations so that the -// newest operation is returned first. Currently, only sorting by `name` -// or `creationTimestamp desc` is supported. -func (c *ExternalVpnGatewaysListCall) OrderBy(orderBy string) *ExternalVpnGatewaysListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set `pageToken` to the `nextPageToken` returned by a -// previous list request to get the next page of results. -func (c *ExternalVpnGatewaysListCall) PageToken(pageToken string) *ExternalVpnGatewaysListCall { - c.urlParams_.Set("pageToken", pageToken) +// - firewallPolicy: Name of the firewall policy to update. +func (r *FirewallPoliciesService) AddRule(firewallPolicy string, firewallpolicyrule *FirewallPolicyRule) *FirewallPoliciesAddRuleCall { + c := &FirewallPoliciesAddRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.firewallPolicy = firewallPolicy + c.firewallpolicyrule = firewallpolicyrule return c } -// ReturnPartialSuccess sets the optional parameter -// "returnPartialSuccess": Opt-in for partial success behavior which -// provides partial results in case of failure. The default value is -// false. -func (c *ExternalVpnGatewaysListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ExternalVpnGatewaysListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *FirewallPoliciesAddRuleCall) RequestId(requestId string) *FirewallPoliciesAddRuleCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ExternalVpnGatewaysListCall) Fields(s ...googleapi.Field) *ExternalVpnGatewaysListCall { +func (c *FirewallPoliciesAddRuleCall) Fields(s ...googleapi.Field) *FirewallPoliciesAddRuleCall { 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 *ExternalVpnGatewaysListCall) IfNoneMatch(entityTag string) *ExternalVpnGatewaysListCall { - 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 *ExternalVpnGatewaysListCall) Context(ctx context.Context) *ExternalVpnGatewaysListCall { +func (c *FirewallPoliciesAddRuleCall) Context(ctx context.Context) *FirewallPoliciesAddRuleCall { 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 *ExternalVpnGatewaysListCall) Header() http.Header { +func (c *FirewallPoliciesAddRuleCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ExternalVpnGatewaysListCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallPoliciesAddRuleCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallpolicyrule) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/externalVpnGateways") + urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/addRule") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, + "firewallPolicy": c.firewallPolicy, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.externalVpnGateways.list" call. -// Exactly one of *ExternalVpnGatewayList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ExternalVpnGatewayList.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 *ExternalVpnGatewaysListCall) Do(opts ...googleapi.CallOption) (*ExternalVpnGatewayList, error) { +// Do executes the "compute.firewallPolicies.addRule" 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 *FirewallPoliciesAddRuleCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -79705,7 +81423,7 @@ func (c *ExternalVpnGatewaysListCall) Do(opts ...googleapi.CallOption) (*Externa if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ExternalVpnGatewayList{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -79717,113 +81435,88 @@ func (c *ExternalVpnGatewaysListCall) Do(opts ...googleapi.CallOption) (*Externa } return ret, nil // { - // "description": "Retrieves the list of ExternalVpnGateway available to the specified project.", - // "flatPath": "projects/{project}/global/externalVpnGateways", - // "httpMethod": "GET", - // "id": "compute.externalVpnGateways.list", + // "description": "Inserts a rule into a firewall policy.", + // "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/addRule", + // "httpMethod": "POST", + // "id": "compute.firewallPolicies.addRule", // "parameterOrder": [ - // "project" + // "firewallPolicy" // ], // "parameters": { - // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", - // "location": "query", - // "type": "string" - // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", - // "format": "uint32", - // "location": "query", - // "minimum": "0", - // "type": "integer" - // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "project": { - // "description": "Project ID for this request.", + // "firewallPolicy": { + // "description": "Name of the firewall policy to update.", // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "pattern": "(firewallPolicies/)?[0-9]{0,20}", // "required": true, // "type": "string" // }, - // "returnPartialSuccess": { - // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", - // "type": "boolean" + // "type": "string" // } // }, - // "path": "projects/{project}/global/externalVpnGateways", + // "path": "locations/global/firewallPolicies/{firewallPolicy}/addRule", + // "request": { + // "$ref": "FirewallPolicyRule" + // }, // "response": { - // "$ref": "ExternalVpnGatewayList" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// 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 *ExternalVpnGatewaysListCall) Pages(ctx context.Context, f func(*ExternalVpnGatewayList) 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 "compute.firewallPolicies.cloneRules": + +type FirewallPoliciesCloneRulesCall struct { + s *Service + firewallPolicy string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// method id "compute.externalVpnGateways.setLabels": +// CloneRules: Copies rules to the specified firewall policy. +// +// - firewallPolicy: Name of the firewall policy to update. +func (r *FirewallPoliciesService) CloneRules(firewallPolicy string) *FirewallPoliciesCloneRulesCall { + c := &FirewallPoliciesCloneRulesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.firewallPolicy = firewallPolicy + return c +} -type ExternalVpnGatewaysSetLabelsCall struct { - s *Service - project string - resource string - globalsetlabelsrequest *GlobalSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *FirewallPoliciesCloneRulesCall) RequestId(requestId string) *FirewallPoliciesCloneRulesCall { + c.urlParams_.Set("requestId", requestId) + return c } -// SetLabels: Sets the labels on an ExternalVpnGateway. To learn more -// about labels, read the Labeling Resources documentation. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *ExternalVpnGatewaysService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *ExternalVpnGatewaysSetLabelsCall { - c := &ExternalVpnGatewaysSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.globalsetlabelsrequest = globalsetlabelsrequest +// SourceFirewallPolicy sets the optional parameter +// "sourceFirewallPolicy": The firewall policy from which to copy rules. +func (c *FirewallPoliciesCloneRulesCall) SourceFirewallPolicy(sourceFirewallPolicy string) *FirewallPoliciesCloneRulesCall { + c.urlParams_.Set("sourceFirewallPolicy", sourceFirewallPolicy) 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 *ExternalVpnGatewaysSetLabelsCall) Fields(s ...googleapi.Field) *ExternalVpnGatewaysSetLabelsCall { +func (c *FirewallPoliciesCloneRulesCall) Fields(s ...googleapi.Field) *FirewallPoliciesCloneRulesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -79831,21 +81524,21 @@ func (c *ExternalVpnGatewaysSetLabelsCall) Fields(s ...googleapi.Field) *Externa // 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 *ExternalVpnGatewaysSetLabelsCall) Context(ctx context.Context) *ExternalVpnGatewaysSetLabelsCall { +func (c *FirewallPoliciesCloneRulesCall) Context(ctx context.Context) *FirewallPoliciesCloneRulesCall { 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 *ExternalVpnGatewaysSetLabelsCall) Header() http.Header { +func (c *FirewallPoliciesCloneRulesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ExternalVpnGatewaysSetLabelsCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallPoliciesCloneRulesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -79853,14 +81546,9 @@ func (c *ExternalVpnGatewaysSetLabelsCall) doRequest(alt string) (*http.Response } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetlabelsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/externalVpnGateways/{resource}/setLabels") + urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/cloneRules") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -79868,20 +81556,19 @@ func (c *ExternalVpnGatewaysSetLabelsCall) doRequest(alt string) (*http.Response } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, + "firewallPolicy": c.firewallPolicy, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.externalVpnGateways.setLabels" call. +// Do executes the "compute.firewallPolicies.cloneRules" 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 *ExternalVpnGatewaysSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *FirewallPoliciesCloneRulesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -79912,34 +81599,33 @@ func (c *ExternalVpnGatewaysSetLabelsCall) Do(opts ...googleapi.CallOption) (*Op } return ret, nil // { - // "description": "Sets the labels on an ExternalVpnGateway. To learn more about labels, read the Labeling Resources documentation.", - // "flatPath": "projects/{project}/global/externalVpnGateways/{resource}/setLabels", + // "description": "Copies rules to the specified firewall policy.", + // "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/cloneRules", // "httpMethod": "POST", - // "id": "compute.externalVpnGateways.setLabels", + // "id": "compute.firewallPolicies.cloneRules", // "parameterOrder": [ - // "project", - // "resource" + // "firewallPolicy" // ], // "parameters": { - // "project": { - // "description": "Project ID for this request.", + // "firewallPolicy": { + // "description": "Name of the firewall policy to update.", // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "pattern": "(firewallPolicies/)?[0-9]{0,20}", // "required": true, // "type": "string" // }, - // "resource": { - // "description": "Name or id of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "sourceFirewallPolicy": { + // "description": "The firewall policy from which to copy rules.", + // "location": "query", // "type": "string" // } // }, - // "path": "projects/{project}/global/externalVpnGateways/{resource}/setLabels", - // "request": { - // "$ref": "GlobalSetLabelsRequest" - // }, + // "path": "locations/global/firewallPolicies/{firewallPolicy}/cloneRules", // "response": { // "$ref": "Operation" // }, @@ -79951,35 +81637,45 @@ func (c *ExternalVpnGatewaysSetLabelsCall) Do(opts ...googleapi.CallOption) (*Op } -// method id "compute.externalVpnGateways.testIamPermissions": +// method id "compute.firewallPolicies.delete": -type ExternalVpnGatewaysTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FirewallPoliciesDeleteCall struct { + s *Service + firewallPolicy string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// Delete: Deletes the specified policy. // -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *ExternalVpnGatewaysService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *ExternalVpnGatewaysTestIamPermissionsCall { - c := &ExternalVpnGatewaysTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest +// - firewallPolicy: Name of the firewall policy to delete. +func (r *FirewallPoliciesService) Delete(firewallPolicy string) *FirewallPoliciesDeleteCall { + c := &FirewallPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.firewallPolicy = firewallPolicy + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *FirewallPoliciesDeleteCall) RequestId(requestId string) *FirewallPoliciesDeleteCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ExternalVpnGatewaysTestIamPermissionsCall) Fields(s ...googleapi.Field) *ExternalVpnGatewaysTestIamPermissionsCall { +func (c *FirewallPoliciesDeleteCall) Fields(s ...googleapi.Field) *FirewallPoliciesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -79987,21 +81683,21 @@ func (c *ExternalVpnGatewaysTestIamPermissionsCall) Fields(s ...googleapi.Field) // 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 *ExternalVpnGatewaysTestIamPermissionsCall) Context(ctx context.Context) *ExternalVpnGatewaysTestIamPermissionsCall { +func (c *FirewallPoliciesDeleteCall) Context(ctx context.Context) *FirewallPoliciesDeleteCall { 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 *ExternalVpnGatewaysTestIamPermissionsCall) Header() http.Header { +func (c *FirewallPoliciesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ExternalVpnGatewaysTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -80009,35 +81705,29 @@ func (c *ExternalVpnGatewaysTestIamPermissionsCall) doRequest(alt string) (*http } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/externalVpnGateways/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, + "firewallPolicy": c.firewallPolicy, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.externalVpnGateways.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *ExternalVpnGatewaysTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { +// Do executes the "compute.firewallPolicies.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *FirewallPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -80056,7 +81746,7 @@ func (c *ExternalVpnGatewaysTestIamPermissionsCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestPermissionsResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -80068,137 +81758,110 @@ func (c *ExternalVpnGatewaysTestIamPermissionsCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "flatPath": "projects/{project}/global/externalVpnGateways/{resource}/testIamPermissions", - // "httpMethod": "POST", - // "id": "compute.externalVpnGateways.testIamPermissions", + // "description": "Deletes the specified policy.", + // "flatPath": "locations/global/firewallPolicies/{firewallPolicy}", + // "httpMethod": "DELETE", + // "id": "compute.firewallPolicies.delete", // "parameterOrder": [ - // "project", - // "resource" + // "firewallPolicy" // ], // "parameters": { - // "project": { - // "description": "Project ID for this request.", + // "firewallPolicy": { + // "description": "Name of the firewall policy to delete.", // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "pattern": "(firewallPolicies/)?[0-9]{0,20}", // "required": true, // "type": "string" // }, - // "resource": { - // "description": "Name or id of the resource for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", // "type": "string" // } // }, - // "path": "projects/{project}/global/externalVpnGateways/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, + // "path": "locations/global/firewallPolicies/{firewallPolicy}", // "response": { - // "$ref": "TestPermissionsResponse" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.firewallPolicies.addAssociation": +// method id "compute.firewallPolicies.get": -type FirewallPoliciesAddAssociationCall struct { - s *Service - firewallPolicy string - firewallpolicyassociation *FirewallPolicyAssociation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FirewallPoliciesGetCall struct { + s *Service + firewallPolicy string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// AddAssociation: Inserts an association for the specified firewall -// policy. +// Get: Returns the specified firewall policy. // -// - firewallPolicy: Name of the firewall policy to update. -func (r *FirewallPoliciesService) AddAssociation(firewallPolicy string, firewallpolicyassociation *FirewallPolicyAssociation) *FirewallPoliciesAddAssociationCall { - c := &FirewallPoliciesAddAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - firewallPolicy: Name of the firewall policy to get. +func (r *FirewallPoliciesService) Get(firewallPolicy string) *FirewallPoliciesGetCall { + c := &FirewallPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.firewallPolicy = firewallPolicy - c.firewallpolicyassociation = firewallpolicyassociation - return c -} - -// ReplaceExistingAssociation sets the optional parameter -// "replaceExistingAssociation": Indicates whether or not to replace it -// if an association of the attachment already exists. This is false by -// default, in which case an error will be returned if an association -// already exists. -func (c *FirewallPoliciesAddAssociationCall) ReplaceExistingAssociation(replaceExistingAssociation bool) *FirewallPoliciesAddAssociationCall { - c.urlParams_.Set("replaceExistingAssociation", fmt.Sprint(replaceExistingAssociation)) - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *FirewallPoliciesAddAssociationCall) RequestId(requestId string) *FirewallPoliciesAddAssociationCall { - c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FirewallPoliciesAddAssociationCall) Fields(s ...googleapi.Field) *FirewallPoliciesAddAssociationCall { +func (c *FirewallPoliciesGetCall) Fields(s ...googleapi.Field) *FirewallPoliciesGetCall { 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 *FirewallPoliciesGetCall) IfNoneMatch(entityTag string) *FirewallPoliciesGetCall { + 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 *FirewallPoliciesAddAssociationCall) Context(ctx context.Context) *FirewallPoliciesAddAssociationCall { +func (c *FirewallPoliciesGetCall) Context(ctx context.Context) *FirewallPoliciesGetCall { 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 *FirewallPoliciesAddAssociationCall) Header() http.Header { +func (c *FirewallPoliciesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallPoliciesAddAssociationCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallPoliciesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallpolicyassociation) - 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) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/addAssociation") + urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -80209,14 +81872,14 @@ func (c *FirewallPoliciesAddAssociationCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewallPolicies.addAssociation" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx +// Do executes the "compute.firewallPolicies.get" call. +// Exactly one of *FirewallPolicy 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 *FirewallPoliciesAddAssociationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *FirewallPolicy.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 *FirewallPoliciesGetCall) Do(opts ...googleapi.CallOption) (*FirewallPolicy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -80235,7 +81898,7 @@ func (c *FirewallPoliciesAddAssociationCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &FirewallPolicy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -80247,127 +81910,114 @@ func (c *FirewallPoliciesAddAssociationCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Inserts an association for the specified firewall policy.", - // "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/addAssociation", - // "httpMethod": "POST", - // "id": "compute.firewallPolicies.addAssociation", + // "description": "Returns the specified firewall policy.", + // "flatPath": "locations/global/firewallPolicies/{firewallPolicy}", + // "httpMethod": "GET", + // "id": "compute.firewallPolicies.get", // "parameterOrder": [ // "firewallPolicy" // ], // "parameters": { // "firewallPolicy": { - // "description": "Name of the firewall policy to update.", + // "description": "Name of the firewall policy to get.", // "location": "path", // "pattern": "(firewallPolicies/)?[0-9]{0,20}", // "required": true, // "type": "string" - // }, - // "replaceExistingAssociation": { - // "description": "Indicates whether or not to replace it if an association of the attachment already exists. This is false by default, in which case an error will be returned if an association already exists.", - // "location": "query", - // "type": "boolean" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" // } // }, - // "path": "locations/global/firewallPolicies/{firewallPolicy}/addAssociation", - // "request": { - // "$ref": "FirewallPolicyAssociation" - // }, + // "path": "locations/global/firewallPolicies/{firewallPolicy}", // "response": { - // "$ref": "Operation" + // "$ref": "FirewallPolicy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.firewallPolicies.addRule": +// method id "compute.firewallPolicies.getAssociation": -type FirewallPoliciesAddRuleCall struct { - s *Service - firewallPolicy string - firewallpolicyrule *FirewallPolicyRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FirewallPoliciesGetAssociationCall struct { + s *Service + firewallPolicy string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// AddRule: Inserts a rule into a firewall policy. +// GetAssociation: Gets an association with the specified name. // -// - firewallPolicy: Name of the firewall policy to update. -func (r *FirewallPoliciesService) AddRule(firewallPolicy string, firewallpolicyrule *FirewallPolicyRule) *FirewallPoliciesAddRuleCall { - c := &FirewallPoliciesAddRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - firewallPolicy: Name of the firewall policy to which the queried +// rule belongs. +func (r *FirewallPoliciesService) GetAssociation(firewallPolicy string) *FirewallPoliciesGetAssociationCall { + c := &FirewallPoliciesGetAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.firewallPolicy = firewallPolicy - c.firewallpolicyrule = firewallpolicyrule return c } -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *FirewallPoliciesAddRuleCall) RequestId(requestId string) *FirewallPoliciesAddRuleCall { - c.urlParams_.Set("requestId", requestId) +// Name sets the optional parameter "name": The name of the association +// to get from the firewall policy. +func (c *FirewallPoliciesGetAssociationCall) Name(name string) *FirewallPoliciesGetAssociationCall { + c.urlParams_.Set("name", name) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FirewallPoliciesAddRuleCall) Fields(s ...googleapi.Field) *FirewallPoliciesAddRuleCall { +func (c *FirewallPoliciesGetAssociationCall) Fields(s ...googleapi.Field) *FirewallPoliciesGetAssociationCall { 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 *FirewallPoliciesGetAssociationCall) IfNoneMatch(entityTag string) *FirewallPoliciesGetAssociationCall { + 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 *FirewallPoliciesAddRuleCall) Context(ctx context.Context) *FirewallPoliciesAddRuleCall { +func (c *FirewallPoliciesGetAssociationCall) Context(ctx context.Context) *FirewallPoliciesGetAssociationCall { 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 *FirewallPoliciesAddRuleCall) Header() http.Header { +func (c *FirewallPoliciesGetAssociationCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallPoliciesAddRuleCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallPoliciesGetAssociationCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallpolicyrule) - 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) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/addRule") + urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/getAssociation") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -80378,14 +82028,14 @@ func (c *FirewallPoliciesAddRuleCall) doRequest(alt string) (*http.Response, err return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewallPolicies.addRule" 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 *FirewallPoliciesAddRuleCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.firewallPolicies.getAssociation" call. +// Exactly one of *FirewallPolicyAssociation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *FirewallPolicyAssociation.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 *FirewallPoliciesGetAssociationCall) Do(opts ...googleapi.CallOption) (*FirewallPolicyAssociation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -80404,7 +82054,7 @@ func (c *FirewallPoliciesAddRuleCall) Do(opts ...googleapi.CallOption) (*Operati if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &FirewallPolicyAssociation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -80416,140 +82066,137 @@ func (c *FirewallPoliciesAddRuleCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Inserts a rule into a firewall policy.", - // "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/addRule", - // "httpMethod": "POST", - // "id": "compute.firewallPolicies.addRule", + // "description": "Gets an association with the specified name.", + // "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/getAssociation", + // "httpMethod": "GET", + // "id": "compute.firewallPolicies.getAssociation", // "parameterOrder": [ // "firewallPolicy" // ], // "parameters": { // "firewallPolicy": { - // "description": "Name of the firewall policy to update.", + // "description": "Name of the firewall policy to which the queried rule belongs.", // "location": "path", // "pattern": "(firewallPolicies/)?[0-9]{0,20}", // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "name": { + // "description": "The name of the association to get from the firewall policy.", // "location": "query", // "type": "string" // } // }, - // "path": "locations/global/firewallPolicies/{firewallPolicy}/addRule", - // "request": { - // "$ref": "FirewallPolicyRule" - // }, + // "path": "locations/global/firewallPolicies/{firewallPolicy}/getAssociation", // "response": { - // "$ref": "Operation" + // "$ref": "FirewallPolicyAssociation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.firewallPolicies.cloneRules": +// method id "compute.firewallPolicies.getIamPolicy": -type FirewallPoliciesCloneRulesCall struct { - s *Service - firewallPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FirewallPoliciesGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// CloneRules: Copies rules to the specified firewall policy. +// GetIamPolicy: Gets the access control policy for a resource. May be +// empty if no such policy or resource exists. // -// - firewallPolicy: Name of the firewall policy to update. -func (r *FirewallPoliciesService) CloneRules(firewallPolicy string) *FirewallPoliciesCloneRulesCall { - c := &FirewallPoliciesCloneRulesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *FirewallPoliciesCloneRulesCall) RequestId(requestId string) *FirewallPoliciesCloneRulesCall { - c.urlParams_.Set("requestId", requestId) +// - resource: Name or id of the resource for this request. +func (r *FirewallPoliciesService) GetIamPolicy(resource string) *FirewallPoliciesGetIamPolicyCall { + c := &FirewallPoliciesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource return c } -// SourceFirewallPolicy sets the optional parameter -// "sourceFirewallPolicy": The firewall policy from which to copy rules. -func (c *FirewallPoliciesCloneRulesCall) SourceFirewallPolicy(sourceFirewallPolicy string) *FirewallPoliciesCloneRulesCall { - c.urlParams_.Set("sourceFirewallPolicy", sourceFirewallPolicy) +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *FirewallPoliciesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *FirewallPoliciesGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FirewallPoliciesCloneRulesCall) Fields(s ...googleapi.Field) *FirewallPoliciesCloneRulesCall { +func (c *FirewallPoliciesGetIamPolicyCall) Fields(s ...googleapi.Field) *FirewallPoliciesGetIamPolicyCall { 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 *FirewallPoliciesGetIamPolicyCall) IfNoneMatch(entityTag string) *FirewallPoliciesGetIamPolicyCall { + 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 *FirewallPoliciesCloneRulesCall) Context(ctx context.Context) *FirewallPoliciesCloneRulesCall { +func (c *FirewallPoliciesGetIamPolicyCall) Context(ctx context.Context) *FirewallPoliciesGetIamPolicyCall { 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 *FirewallPoliciesCloneRulesCall) Header() http.Header { +func (c *FirewallPoliciesGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallPoliciesCloneRulesCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallPoliciesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/cloneRules") + urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{resource}/getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "firewallPolicy": c.firewallPolicy, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewallPolicies.cloneRules" 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 *FirewallPoliciesCloneRulesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.firewallPolicies.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *FirewallPoliciesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -80568,7 +82215,7 @@ func (c *FirewallPoliciesCloneRulesCall) Do(opts ...googleapi.CallOption) (*Oper if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -80580,117 +82227,120 @@ func (c *FirewallPoliciesCloneRulesCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Copies rules to the specified firewall policy.", - // "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/cloneRules", - // "httpMethod": "POST", - // "id": "compute.firewallPolicies.cloneRules", + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "flatPath": "locations/global/firewallPolicies/{resource}/getIamPolicy", + // "httpMethod": "GET", + // "id": "compute.firewallPolicies.getIamPolicy", // "parameterOrder": [ - // "firewallPolicy" + // "resource" // ], // "parameters": { - // "firewallPolicy": { - // "description": "Name of the firewall policy to update.", + // "optionsRequestedPolicyVersion": { + // "description": "Requested IAM Policy version.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", // "location": "path", // "pattern": "(firewallPolicies/)?[0-9]{0,20}", // "required": true, // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "sourceFirewallPolicy": { - // "description": "The firewall policy from which to copy rules.", - // "location": "query", - // "type": "string" // } // }, - // "path": "locations/global/firewallPolicies/{firewallPolicy}/cloneRules", + // "path": "locations/global/firewallPolicies/{resource}/getIamPolicy", // "response": { - // "$ref": "Operation" + // "$ref": "Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.firewallPolicies.delete": +// method id "compute.firewallPolicies.getRule": -type FirewallPoliciesDeleteCall struct { +type FirewallPoliciesGetRuleCall struct { s *Service firewallPolicy string urlParams_ gensupport.URLParams + ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Delete: Deletes the specified policy. +// GetRule: Gets a rule of the specified priority. // -// - firewallPolicy: Name of the firewall policy to delete. -func (r *FirewallPoliciesService) Delete(firewallPolicy string) *FirewallPoliciesDeleteCall { - c := &FirewallPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - firewallPolicy: Name of the firewall policy to which the queried +// rule belongs. +func (r *FirewallPoliciesService) GetRule(firewallPolicy string) *FirewallPoliciesGetRuleCall { + c := &FirewallPoliciesGetRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.firewallPolicy = firewallPolicy return c } -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *FirewallPoliciesDeleteCall) RequestId(requestId string) *FirewallPoliciesDeleteCall { - c.urlParams_.Set("requestId", requestId) +// Priority sets the optional parameter "priority": The priority of the +// rule to get from the firewall policy. +func (c *FirewallPoliciesGetRuleCall) Priority(priority int64) *FirewallPoliciesGetRuleCall { + c.urlParams_.Set("priority", fmt.Sprint(priority)) 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 *FirewallPoliciesDeleteCall) Fields(s ...googleapi.Field) *FirewallPoliciesDeleteCall { +func (c *FirewallPoliciesGetRuleCall) Fields(s ...googleapi.Field) *FirewallPoliciesGetRuleCall { 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 *FirewallPoliciesGetRuleCall) IfNoneMatch(entityTag string) *FirewallPoliciesGetRuleCall { + 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 *FirewallPoliciesDeleteCall) Context(ctx context.Context) *FirewallPoliciesDeleteCall { +func (c *FirewallPoliciesGetRuleCall) Context(ctx context.Context) *FirewallPoliciesGetRuleCall { 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 *FirewallPoliciesDeleteCall) Header() http.Header { +func (c *FirewallPoliciesGetRuleCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallPoliciesGetRuleCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}") + urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/getRule") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -80701,14 +82351,14 @@ func (c *FirewallPoliciesDeleteCall) doRequest(alt string) (*http.Response, erro return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewallPolicies.delete" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *FirewallPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.firewallPolicies.getRule" call. +// Exactly one of *FirewallPolicyRule or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *FirewallPolicyRule.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 *FirewallPoliciesGetRuleCall) Do(opts ...googleapi.CallOption) (*FirewallPolicyRule, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -80727,7 +82377,7 @@ func (c *FirewallPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operatio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &FirewallPolicyRule{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -80739,128 +82389,142 @@ func (c *FirewallPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Deletes the specified policy.", - // "flatPath": "locations/global/firewallPolicies/{firewallPolicy}", - // "httpMethod": "DELETE", - // "id": "compute.firewallPolicies.delete", + // "description": "Gets a rule of the specified priority.", + // "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/getRule", + // "httpMethod": "GET", + // "id": "compute.firewallPolicies.getRule", // "parameterOrder": [ // "firewallPolicy" // ], // "parameters": { // "firewallPolicy": { - // "description": "Name of the firewall policy to delete.", + // "description": "Name of the firewall policy to which the queried rule belongs.", // "location": "path", // "pattern": "(firewallPolicies/)?[0-9]{0,20}", // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "priority": { + // "description": "The priority of the rule to get from the firewall policy.", + // "format": "int32", // "location": "query", - // "type": "string" + // "type": "integer" // } // }, - // "path": "locations/global/firewallPolicies/{firewallPolicy}", + // "path": "locations/global/firewallPolicies/{firewallPolicy}/getRule", // "response": { - // "$ref": "Operation" + // "$ref": "FirewallPolicyRule" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.firewallPolicies.get": +// method id "compute.firewallPolicies.insert": -type FirewallPoliciesGetCall struct { +type FirewallPoliciesInsertCall struct { s *Service - firewallPolicy string + firewallpolicy *FirewallPolicy urlParams_ gensupport.URLParams - ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Returns the specified firewall policy. -// -// - firewallPolicy: Name of the firewall policy to get. -func (r *FirewallPoliciesService) Get(firewallPolicy string) *FirewallPoliciesGetCall { - c := &FirewallPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy +// Insert: Creates a new policy in the specified project using the data +// included in the request. +func (r *FirewallPoliciesService) Insert(firewallpolicy *FirewallPolicy) *FirewallPoliciesInsertCall { + c := &FirewallPoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.firewallpolicy = firewallpolicy + return c +} + +// ParentId sets the optional parameter "parentId": Parent ID for this +// request. The ID can be either be "folders/[FOLDER_ID]" if the parent +// is a folder or "organizations/[ORGANIZATION_ID]" if the parent is an +// organization. +func (c *FirewallPoliciesInsertCall) ParentId(parentId string) *FirewallPoliciesInsertCall { + c.urlParams_.Set("parentId", parentId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *FirewallPoliciesInsertCall) RequestId(requestId string) *FirewallPoliciesInsertCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FirewallPoliciesGetCall) Fields(s ...googleapi.Field) *FirewallPoliciesGetCall { +func (c *FirewallPoliciesInsertCall) Fields(s ...googleapi.Field) *FirewallPoliciesInsertCall { 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 *FirewallPoliciesGetCall) IfNoneMatch(entityTag string) *FirewallPoliciesGetCall { - 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 *FirewallPoliciesGetCall) Context(ctx context.Context) *FirewallPoliciesGetCall { +func (c *FirewallPoliciesInsertCall) Context(ctx context.Context) *FirewallPoliciesInsertCall { 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 *FirewallPoliciesGetCall) Header() http.Header { +func (c *FirewallPoliciesInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallPoliciesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallPoliciesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallpolicy) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}") + urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "firewallPolicy": c.firewallPolicy, - }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewallPolicies.get" call. -// Exactly one of *FirewallPolicy or error will be non-nil. Any non-2xx +// Do executes the "compute.firewallPolicies.insert" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either -// *FirewallPolicy.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 *FirewallPoliciesGetCall) Do(opts ...googleapi.CallOption) (*FirewallPolicy, error) { +// *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 *FirewallPoliciesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -80879,7 +82543,7 @@ func (c *FirewallPoliciesGetCall) Do(opts ...googleapi.CallOption) (*FirewallPol if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &FirewallPolicy{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -80891,67 +82555,149 @@ func (c *FirewallPoliciesGetCall) Do(opts ...googleapi.CallOption) (*FirewallPol } return ret, nil // { - // "description": "Returns the specified firewall policy.", - // "flatPath": "locations/global/firewallPolicies/{firewallPolicy}", - // "httpMethod": "GET", - // "id": "compute.firewallPolicies.get", - // "parameterOrder": [ - // "firewallPolicy" - // ], + // "description": "Creates a new policy in the specified project using the data included in the request.", + // "flatPath": "locations/global/firewallPolicies", + // "httpMethod": "POST", + // "id": "compute.firewallPolicies.insert", // "parameters": { - // "firewallPolicy": { - // "description": "Name of the firewall policy to get.", - // "location": "path", - // "pattern": "(firewallPolicies/)?[0-9]{0,20}", - // "required": true, + // "parentId": { + // "description": "Parent ID for this request. The ID can be either be \"folders/[FOLDER_ID]\" if the parent is a folder or \"organizations/[ORGANIZATION_ID]\" if the parent is an organization.", + // "location": "query", + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", // "type": "string" // } // }, - // "path": "locations/global/firewallPolicies/{firewallPolicy}", - // "response": { + // "path": "locations/global/firewallPolicies", + // "request": { // "$ref": "FirewallPolicy" // }, + // "response": { + // "$ref": "Operation" + // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.firewallPolicies.getAssociation": +// method id "compute.firewallPolicies.list": -type FirewallPoliciesGetAssociationCall struct { - s *Service - firewallPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type FirewallPoliciesListCall struct { + s *Service + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// GetAssociation: Gets an association with the specified name. -// -// - firewallPolicy: Name of the firewall policy to which the queried -// rule belongs. -func (r *FirewallPoliciesService) GetAssociation(firewallPolicy string) *FirewallPoliciesGetAssociationCall { - c := &FirewallPoliciesGetAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy +// List: Lists all the policies that have been configured for the +// specified folder or organization. +func (r *FirewallPoliciesService) List() *FirewallPoliciesListCall { + c := &FirewallPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} return c } -// Name sets the optional parameter "name": The name of the association -// to get from the firewall policy. -func (c *FirewallPoliciesGetAssociationCall) Name(name string) *FirewallPoliciesGetAssociationCall { - c.urlParams_.Set("name", name) +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources +// support two types of filter expressions: expressions that support +// regular expressions and expressions that follow API improvement +// proposal AIP-160. If you want to use AIP-160, your expression must +// specify the field name, an operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` +// or `:`. For example, if you are filtering Compute Engine instances, +// you can exclude instances named `example-instance` by specifying +// `name != example-instance`. The `:` operator can be used with string +// fields to match substrings. For non-string fields it is equivalent to +// the `=` operator. The `:*` comparison can be used to test whether a +// key has been defined. For example, to find all objects with `owner` +// label use: ``` labels.owner:* ``` You can also filter nested fields. +// For example, you could specify `scheduling.automaticRestart = false` +// to include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` If you want to use a +// regular expression, use the `eq` (equal) or `ne` (not equal) operator +// against a single un-parenthesized expression with or without quotes +// or against multiple parenthesized expressions. Examples: `fieldname +// eq unquoted literal` `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" `(fieldname1 eq literal) +// (fieldname2 ne "literal")` The literal value is interpreted as a +// regular expression using Google RE2 library syntax. The literal value +// must match the entire field. For example, to filter for instances +// that do not end with name "instance", you would use `name ne +// .*instance`. +func (c *FirewallPoliciesListCall) Filter(filter string) *FirewallPoliciesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *FirewallPoliciesListCall) MaxResults(maxResults int64) *FirewallPoliciesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *FirewallPoliciesListCall) OrderBy(orderBy string) *FirewallPoliciesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *FirewallPoliciesListCall) PageToken(pageToken string) *FirewallPoliciesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ParentId sets the optional parameter "parentId": Parent ID for this +// request. The ID can be either be "folders/[FOLDER_ID]" if the parent +// is a folder or "organizations/[ORGANIZATION_ID]" if the parent is an +// organization. +func (c *FirewallPoliciesListCall) ParentId(parentId string) *FirewallPoliciesListCall { + c.urlParams_.Set("parentId", parentId) + return c +} + +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *FirewallPoliciesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *FirewallPoliciesListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) 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 *FirewallPoliciesGetAssociationCall) Fields(s ...googleapi.Field) *FirewallPoliciesGetAssociationCall { +func (c *FirewallPoliciesListCall) Fields(s ...googleapi.Field) *FirewallPoliciesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -80961,7 +82707,7 @@ func (c *FirewallPoliciesGetAssociationCall) Fields(s ...googleapi.Field) *Firew // 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 *FirewallPoliciesGetAssociationCall) IfNoneMatch(entityTag string) *FirewallPoliciesGetAssociationCall { +func (c *FirewallPoliciesListCall) IfNoneMatch(entityTag string) *FirewallPoliciesListCall { c.ifNoneMatch_ = entityTag return c } @@ -80969,21 +82715,21 @@ func (c *FirewallPoliciesGetAssociationCall) IfNoneMatch(entityTag string) *Fire // 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 *FirewallPoliciesGetAssociationCall) Context(ctx context.Context) *FirewallPoliciesGetAssociationCall { +func (c *FirewallPoliciesListCall) Context(ctx context.Context) *FirewallPoliciesListCall { 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 *FirewallPoliciesGetAssociationCall) Header() http.Header { +func (c *FirewallPoliciesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallPoliciesGetAssociationCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallPoliciesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -80996,27 +82742,24 @@ func (c *FirewallPoliciesGetAssociationCall) doRequest(alt string) (*http.Respon var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/getAssociation") + urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "firewallPolicy": c.firewallPolicy, - }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewallPolicies.getAssociation" call. -// Exactly one of *FirewallPolicyAssociation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *FirewallPolicyAssociation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "compute.firewallPolicies.list" call. +// Exactly one of *FirewallPolicyList or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *FirewallPolicyList.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 *FirewallPoliciesGetAssociationCall) Do(opts ...googleapi.CallOption) (*FirewallPolicyAssociation, error) { +func (c *FirewallPoliciesListCall) Do(opts ...googleapi.CallOption) (*FirewallPolicyList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -81035,7 +82778,7 @@ func (c *FirewallPoliciesGetAssociationCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &FirewallPolicyAssociation{ + ret := &FirewallPolicyList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -81047,30 +82790,48 @@ func (c *FirewallPoliciesGetAssociationCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Gets an association with the specified name.", - // "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/getAssociation", + // "description": "Lists all the policies that have been configured for the specified folder or organization.", + // "flatPath": "locations/global/firewallPolicies", // "httpMethod": "GET", - // "id": "compute.firewallPolicies.getAssociation", - // "parameterOrder": [ - // "firewallPolicy" - // ], + // "id": "compute.firewallPolicies.list", // "parameters": { - // "firewallPolicy": { - // "description": "Name of the firewall policy to which the queried rule belongs.", - // "location": "path", - // "pattern": "(firewallPolicies/)?[0-9]{0,20}", - // "required": true, + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "location": "query", // "type": "string" // }, - // "name": { - // "description": "The name of the association to get from the firewall policy.", + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "parentId": { + // "description": "Parent ID for this request. The ID can be either be \"folders/[FOLDER_ID]\" if the parent is a folder or \"organizations/[ORGANIZATION_ID]\" if the parent is an organization.", // "location": "query", // "type": "string" + // }, + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "location": "query", + // "type": "boolean" // } // }, - // "path": "locations/global/firewallPolicies/{firewallPolicy}/getAssociation", + // "path": "locations/global/firewallPolicies", // "response": { - // "$ref": "FirewallPolicyAssociation" + // "$ref": "FirewallPolicyList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -81081,38 +82842,56 @@ func (c *FirewallPoliciesGetAssociationCall) Do(opts ...googleapi.CallOption) (* } -// method id "compute.firewallPolicies.getIamPolicy": +// 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 *FirewallPoliciesListCall) Pages(ctx context.Context, f func(*FirewallPolicyList) 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 FirewallPoliciesGetIamPolicyCall struct { +// method id "compute.firewallPolicies.listAssociations": + +type FirewallPoliciesListAssociationsCall struct { s *Service - resource string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. -// -// - resource: Name or id of the resource for this request. -func (r *FirewallPoliciesService) GetIamPolicy(resource string) *FirewallPoliciesGetIamPolicyCall { - c := &FirewallPoliciesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource +// ListAssociations: Lists associations of a specified target, i.e., +// organization or folder. +func (r *FirewallPoliciesService) ListAssociations() *FirewallPoliciesListAssociationsCall { + c := &FirewallPoliciesListAssociationsCall{s: r.s, urlParams_: make(gensupport.URLParams)} return c } -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *FirewallPoliciesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *FirewallPoliciesGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// TargetResource sets the optional parameter "targetResource": The +// target resource to list associations. It is an organization, or a +// folder. +func (c *FirewallPoliciesListAssociationsCall) TargetResource(targetResource string) *FirewallPoliciesListAssociationsCall { + c.urlParams_.Set("targetResource", targetResource) 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 *FirewallPoliciesGetIamPolicyCall) Fields(s ...googleapi.Field) *FirewallPoliciesGetIamPolicyCall { +func (c *FirewallPoliciesListAssociationsCall) Fields(s ...googleapi.Field) *FirewallPoliciesListAssociationsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -81122,7 +82901,7 @@ func (c *FirewallPoliciesGetIamPolicyCall) Fields(s ...googleapi.Field) *Firewal // 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 *FirewallPoliciesGetIamPolicyCall) IfNoneMatch(entityTag string) *FirewallPoliciesGetIamPolicyCall { +func (c *FirewallPoliciesListAssociationsCall) IfNoneMatch(entityTag string) *FirewallPoliciesListAssociationsCall { c.ifNoneMatch_ = entityTag return c } @@ -81130,21 +82909,21 @@ func (c *FirewallPoliciesGetIamPolicyCall) IfNoneMatch(entityTag string) *Firewa // 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 *FirewallPoliciesGetIamPolicyCall) Context(ctx context.Context) *FirewallPoliciesGetIamPolicyCall { +func (c *FirewallPoliciesListAssociationsCall) Context(ctx context.Context) *FirewallPoliciesListAssociationsCall { 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 *FirewallPoliciesGetIamPolicyCall) Header() http.Header { +func (c *FirewallPoliciesListAssociationsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallPoliciesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallPoliciesListAssociationsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -81157,27 +82936,26 @@ func (c *FirewallPoliciesGetIamPolicyCall) doRequest(alt string) (*http.Response var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{resource}/getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/listAssociations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, - }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewallPolicies.getIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *FirewallPoliciesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// Do executes the "compute.firewallPolicies.listAssociations" call. +// Exactly one of *FirewallPoliciesListAssociationsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *FirewallPoliciesListAssociationsResponse.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 *FirewallPoliciesListAssociationsCall) Do(opts ...googleapi.CallOption) (*FirewallPoliciesListAssociationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -81196,7 +82974,7 @@ func (c *FirewallPoliciesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Po if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &FirewallPoliciesListAssociationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -81208,31 +82986,20 @@ func (c *FirewallPoliciesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Po } return ret, nil // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", - // "flatPath": "locations/global/firewallPolicies/{resource}/getIamPolicy", + // "description": "Lists associations of a specified target, i.e., organization or folder.", + // "flatPath": "locations/global/firewallPolicies/listAssociations", // "httpMethod": "GET", - // "id": "compute.firewallPolicies.getIamPolicy", - // "parameterOrder": [ - // "resource" - // ], + // "id": "compute.firewallPolicies.listAssociations", // "parameters": { - // "optionsRequestedPolicyVersion": { - // "description": "Requested IAM Policy version.", - // "format": "int32", + // "targetResource": { + // "description": "The target resource to list associations. It is an organization, or a folder.", // "location": "query", - // "type": "integer" - // }, - // "resource": { - // "description": "Name or id of the resource for this request.", - // "location": "path", - // "pattern": "(firewallPolicies/)?[0-9]{0,20}", - // "required": true, // "type": "string" // } // }, - // "path": "locations/global/firewallPolicies/{resource}/getIamPolicy", + // "path": "locations/global/firewallPolicies/listAssociations", // "response": { - // "$ref": "Policy" + // "$ref": "FirewallPoliciesListAssociationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -81243,85 +83010,88 @@ func (c *FirewallPoliciesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Po } -// method id "compute.firewallPolicies.getRule": +// method id "compute.firewallPolicies.move": -type FirewallPoliciesGetRuleCall struct { +type FirewallPoliciesMoveCall struct { s *Service firewallPolicy string urlParams_ gensupport.URLParams - ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// GetRule: Gets a rule of the specified priority. +// Move: Moves the specified firewall policy. // -// - firewallPolicy: Name of the firewall policy to which the queried -// rule belongs. -func (r *FirewallPoliciesService) GetRule(firewallPolicy string) *FirewallPoliciesGetRuleCall { - c := &FirewallPoliciesGetRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - firewallPolicy: Name of the firewall policy to update. +func (r *FirewallPoliciesService) Move(firewallPolicy string) *FirewallPoliciesMoveCall { + c := &FirewallPoliciesMoveCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.firewallPolicy = firewallPolicy return c } -// Priority sets the optional parameter "priority": The priority of the -// rule to get from the firewall policy. -func (c *FirewallPoliciesGetRuleCall) Priority(priority int64) *FirewallPoliciesGetRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) +// ParentId sets the optional parameter "parentId": The new parent of +// the firewall policy. The ID can be either be "folders/[FOLDER_ID]" if +// the parent is a folder or "organizations/[ORGANIZATION_ID]" if the +// parent is an organization. +func (c *FirewallPoliciesMoveCall) ParentId(parentId string) *FirewallPoliciesMoveCall { + c.urlParams_.Set("parentId", parentId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *FirewallPoliciesMoveCall) RequestId(requestId string) *FirewallPoliciesMoveCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FirewallPoliciesGetRuleCall) Fields(s ...googleapi.Field) *FirewallPoliciesGetRuleCall { +func (c *FirewallPoliciesMoveCall) Fields(s ...googleapi.Field) *FirewallPoliciesMoveCall { 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 *FirewallPoliciesGetRuleCall) IfNoneMatch(entityTag string) *FirewallPoliciesGetRuleCall { - 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 *FirewallPoliciesGetRuleCall) Context(ctx context.Context) *FirewallPoliciesGetRuleCall { +func (c *FirewallPoliciesMoveCall) Context(ctx context.Context) *FirewallPoliciesMoveCall { 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 *FirewallPoliciesGetRuleCall) Header() http.Header { +func (c *FirewallPoliciesMoveCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallPoliciesGetRuleCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallPoliciesMoveCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/getRule") + urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/move") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -81332,14 +83102,14 @@ func (c *FirewallPoliciesGetRuleCall) doRequest(alt string) (*http.Response, err return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewallPolicies.getRule" call. -// Exactly one of *FirewallPolicyRule or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *FirewallPolicyRule.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 *FirewallPoliciesGetRuleCall) Do(opts ...googleapi.CallOption) (*FirewallPolicyRule, error) { +// Do executes the "compute.firewallPolicies.move" 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 *FirewallPoliciesMoveCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -81358,7 +83128,7 @@ func (c *FirewallPoliciesGetRuleCall) Do(opts ...googleapi.CallOption) (*Firewal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &FirewallPolicyRule{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -81370,68 +83140,66 @@ func (c *FirewallPoliciesGetRuleCall) Do(opts ...googleapi.CallOption) (*Firewal } return ret, nil // { - // "description": "Gets a rule of the specified priority.", - // "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/getRule", - // "httpMethod": "GET", - // "id": "compute.firewallPolicies.getRule", + // "description": "Moves the specified firewall policy.", + // "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/move", + // "httpMethod": "POST", + // "id": "compute.firewallPolicies.move", // "parameterOrder": [ // "firewallPolicy" // ], // "parameters": { // "firewallPolicy": { - // "description": "Name of the firewall policy to which the queried rule belongs.", + // "description": "Name of the firewall policy to update.", // "location": "path", // "pattern": "(firewallPolicies/)?[0-9]{0,20}", // "required": true, // "type": "string" // }, - // "priority": { - // "description": "The priority of the rule to get from the firewall policy.", - // "format": "int32", + // "parentId": { + // "description": "The new parent of the firewall policy. The ID can be either be \"folders/[FOLDER_ID]\" if the parent is a folder or \"organizations/[ORGANIZATION_ID]\" if the parent is an organization.", // "location": "query", - // "type": "integer" + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" // } // }, - // "path": "locations/global/firewallPolicies/{firewallPolicy}/getRule", + // "path": "locations/global/firewallPolicies/{firewallPolicy}/move", // "response": { - // "$ref": "FirewallPolicyRule" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.firewallPolicies.insert": +// method id "compute.firewallPolicies.patch": -type FirewallPoliciesInsertCall struct { +type FirewallPoliciesPatchCall struct { s *Service + firewallPolicy string firewallpolicy *FirewallPolicy urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Insert: Creates a new policy in the specified project using the data -// included in the request. -func (r *FirewallPoliciesService) Insert(firewallpolicy *FirewallPolicy) *FirewallPoliciesInsertCall { - c := &FirewallPoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// Patch: Patches the specified policy with the data included in the +// request. +// +// - firewallPolicy: Name of the firewall policy to update. +func (r *FirewallPoliciesService) Patch(firewallPolicy string, firewallpolicy *FirewallPolicy) *FirewallPoliciesPatchCall { + c := &FirewallPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.firewallPolicy = firewallPolicy c.firewallpolicy = firewallpolicy return c } -// ParentId sets the optional parameter "parentId": Parent ID for this -// request. The ID can be either be "folders/[FOLDER_ID]" if the parent -// is a folder or "organizations/[ORGANIZATION_ID]" if the parent is an -// organization. -func (c *FirewallPoliciesInsertCall) ParentId(parentId string) *FirewallPoliciesInsertCall { - c.urlParams_.Set("parentId", parentId) - return c -} - // RequestId sets the optional parameter "requestId": An optional // request ID to identify requests. Specify a unique request ID so that // if you must retry your request, the server will know to ignore the @@ -81443,7 +83211,7 @@ func (c *FirewallPoliciesInsertCall) ParentId(parentId string) *FirewallPolicies // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *FirewallPoliciesInsertCall) RequestId(requestId string) *FirewallPoliciesInsertCall { +func (c *FirewallPoliciesPatchCall) RequestId(requestId string) *FirewallPoliciesPatchCall { c.urlParams_.Set("requestId", requestId) return c } @@ -81451,7 +83219,7 @@ func (c *FirewallPoliciesInsertCall) RequestId(requestId string) *FirewallPolici // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FirewallPoliciesInsertCall) Fields(s ...googleapi.Field) *FirewallPoliciesInsertCall { +func (c *FirewallPoliciesPatchCall) Fields(s ...googleapi.Field) *FirewallPoliciesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -81459,21 +83227,21 @@ func (c *FirewallPoliciesInsertCall) Fields(s ...googleapi.Field) *FirewallPolic // 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 *FirewallPoliciesInsertCall) Context(ctx context.Context) *FirewallPoliciesInsertCall { +func (c *FirewallPoliciesPatchCall) Context(ctx context.Context) *FirewallPoliciesPatchCall { 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 *FirewallPoliciesInsertCall) Header() http.Header { +func (c *FirewallPoliciesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallPoliciesInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -81488,24 +83256,27 @@ func (c *FirewallPoliciesInsertCall) doRequest(alt string) (*http.Response, erro reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies") + urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "firewallPolicy": c.firewallPolicy, + }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewallPolicies.insert" call. +// Do executes the "compute.firewallPolicies.patch" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *FirewallPoliciesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *FirewallPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -81536,14 +83307,19 @@ func (c *FirewallPoliciesInsertCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Creates a new policy in the specified project using the data included in the request.", - // "flatPath": "locations/global/firewallPolicies", - // "httpMethod": "POST", - // "id": "compute.firewallPolicies.insert", + // "description": "Patches the specified policy with the data included in the request.", + // "flatPath": "locations/global/firewallPolicies/{firewallPolicy}", + // "httpMethod": "PATCH", + // "id": "compute.firewallPolicies.patch", + // "parameterOrder": [ + // "firewallPolicy" + // ], // "parameters": { - // "parentId": { - // "description": "Parent ID for this request. The ID can be either be \"folders/[FOLDER_ID]\" if the parent is a folder or \"organizations/[ORGANIZATION_ID]\" if the parent is an organization.", - // "location": "query", + // "firewallPolicy": { + // "description": "Name of the firewall policy to update.", + // "location": "path", + // "pattern": "(firewallPolicies/)?[0-9]{0,20}", + // "required": true, // "type": "string" // }, // "requestId": { @@ -81552,7 +83328,7 @@ func (c *FirewallPoliciesInsertCall) Do(opts ...googleapi.CallOption) (*Operatio // "type": "string" // } // }, - // "path": "locations/global/firewallPolicies", + // "path": "locations/global/firewallPolicies/{firewallPolicy}", // "request": { // "$ref": "FirewallPolicy" // }, @@ -81567,180 +83343,111 @@ func (c *FirewallPoliciesInsertCall) Do(opts ...googleapi.CallOption) (*Operatio } -// method id "compute.firewallPolicies.list": - -type FirewallPoliciesListCall struct { - s *Service - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all the policies that have been configured for the -// specified folder or organization. -func (r *FirewallPoliciesService) List() *FirewallPoliciesListCall { - c := &FirewallPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources -// support two types of filter expressions: expressions that support -// regular expressions and expressions that follow API improvement -// proposal AIP-160. If you want to use AIP-160, your expression must -// specify the field name, an operator, and the value that you want to -// use for filtering. The value must be a string, a number, or a -// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` -// or `:`. For example, if you are filtering Compute Engine instances, -// you can exclude instances named `example-instance` by specifying -// `name != example-instance`. The `:` operator can be used with string -// fields to match substrings. For non-string fields it is equivalent to -// the `=` operator. The `:*` comparison can be used to test whether a -// key has been defined. For example, to find all objects with `owner` -// label use: ``` labels.owner:* ``` You can also filter nested fields. -// For example, you could specify `scheduling.automaticRestart = false` -// to include instances only if they are not scheduled for automatic -// restarts. You can use filtering on nested fields to filter based on -// resource labels. To filter on multiple expressions, provide each -// separate expression within parentheses. For example: ``` -// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") -// ``` By default, each expression is an `AND` expression. However, you -// can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") -// AND (scheduling.automaticRestart = true) ``` If you want to use a -// regular expression, use the `eq` (equal) or `ne` (not equal) operator -// against a single un-parenthesized expression with or without quotes -// or against multiple parenthesized expressions. Examples: `fieldname -// eq unquoted literal` `fieldname eq 'single quoted literal'` -// `fieldname eq "double quoted literal" `(fieldname1 eq literal) -// (fieldname2 ne "literal")` The literal value is interpreted as a -// regular expression using Google RE2 library syntax. The literal value -// must match the entire field. For example, to filter for instances -// that do not end with name "instance", you would use `name ne -// .*instance`. -func (c *FirewallPoliciesListCall) Filter(filter string) *FirewallPoliciesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that should be returned. If the number of -// available results is larger than `maxResults`, Compute Engine returns -// a `nextPageToken` that can be used to get the next page of results in -// subsequent list requests. Acceptable values are `0` to `500`, -// inclusive. (Default: `500`) -func (c *FirewallPoliciesListCall) MaxResults(maxResults int64) *FirewallPoliciesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} +// method id "compute.firewallPolicies.patchRule": -// OrderBy sets the optional parameter "orderBy": Sorts list results by -// a certain order. By default, results are returned in alphanumerical -// order based on the resource name. You can also sort results in -// descending order based on the creation timestamp using -// `orderBy="creationTimestamp desc". This sorts results based on the -// `creationTimestamp` field in reverse chronological order (newest -// result first). Use this to sort resources like operations so that the -// newest operation is returned first. Currently, only sorting by `name` -// or `creationTimestamp desc` is supported. -func (c *FirewallPoliciesListCall) OrderBy(orderBy string) *FirewallPoliciesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c +type FirewallPoliciesPatchRuleCall struct { + s *Service + firewallPolicy string + firewallpolicyrule *FirewallPolicyRule + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageToken sets the optional parameter "pageToken": Specifies a page -// token to use. Set `pageToken` to the `nextPageToken` returned by a -// previous list request to get the next page of results. -func (c *FirewallPoliciesListCall) PageToken(pageToken string) *FirewallPoliciesListCall { - c.urlParams_.Set("pageToken", pageToken) +// PatchRule: Patches a rule of the specified priority. +// +// - firewallPolicy: Name of the firewall policy to update. +func (r *FirewallPoliciesService) PatchRule(firewallPolicy string, firewallpolicyrule *FirewallPolicyRule) *FirewallPoliciesPatchRuleCall { + c := &FirewallPoliciesPatchRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.firewallPolicy = firewallPolicy + c.firewallpolicyrule = firewallpolicyrule return c } -// ParentId sets the optional parameter "parentId": Parent ID for this -// request. The ID can be either be "folders/[FOLDER_ID]" if the parent -// is a folder or "organizations/[ORGANIZATION_ID]" if the parent is an -// organization. -func (c *FirewallPoliciesListCall) ParentId(parentId string) *FirewallPoliciesListCall { - c.urlParams_.Set("parentId", parentId) +// Priority sets the optional parameter "priority": The priority of the +// rule to patch. +func (c *FirewallPoliciesPatchRuleCall) Priority(priority int64) *FirewallPoliciesPatchRuleCall { + c.urlParams_.Set("priority", fmt.Sprint(priority)) return c } -// ReturnPartialSuccess sets the optional parameter -// "returnPartialSuccess": Opt-in for partial success behavior which -// provides partial results in case of failure. The default value is -// false. -func (c *FirewallPoliciesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *FirewallPoliciesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *FirewallPoliciesPatchRuleCall) RequestId(requestId string) *FirewallPoliciesPatchRuleCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FirewallPoliciesListCall) Fields(s ...googleapi.Field) *FirewallPoliciesListCall { +func (c *FirewallPoliciesPatchRuleCall) Fields(s ...googleapi.Field) *FirewallPoliciesPatchRuleCall { 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 *FirewallPoliciesListCall) IfNoneMatch(entityTag string) *FirewallPoliciesListCall { - 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 *FirewallPoliciesListCall) Context(ctx context.Context) *FirewallPoliciesListCall { +func (c *FirewallPoliciesPatchRuleCall) Context(ctx context.Context) *FirewallPoliciesPatchRuleCall { 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 *FirewallPoliciesListCall) Header() http.Header { +func (c *FirewallPoliciesPatchRuleCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallPoliciesListCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallPoliciesPatchRuleCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallpolicyrule) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies") + urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/patchRule") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "firewallPolicy": c.firewallPolicy, + }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewallPolicies.list" call. -// Exactly one of *FirewallPolicyList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *FirewallPolicyList.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 *FirewallPoliciesListCall) Do(opts ...googleapi.CallOption) (*FirewallPolicyList, error) { +// Do executes the "compute.firewallPolicies.patchRule" 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 *FirewallPoliciesPatchRuleCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -81759,7 +83466,7 @@ func (c *FirewallPoliciesListCall) Do(opts ...googleapi.CallOption) (*FirewallPo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &FirewallPolicyList{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -81771,172 +83478,147 @@ func (c *FirewallPoliciesListCall) Do(opts ...googleapi.CallOption) (*FirewallPo } return ret, nil // { - // "description": "Lists all the policies that have been configured for the specified folder or organization.", - // "flatPath": "locations/global/firewallPolicies", - // "httpMethod": "GET", - // "id": "compute.firewallPolicies.list", + // "description": "Patches a rule of the specified priority.", + // "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/patchRule", + // "httpMethod": "POST", + // "id": "compute.firewallPolicies.patchRule", + // "parameterOrder": [ + // "firewallPolicy" + // ], // "parameters": { - // "filter": { - // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", - // "location": "query", + // "firewallPolicy": { + // "description": "Name of the firewall policy to update.", + // "location": "path", + // "pattern": "(firewallPolicies/)?[0-9]{0,20}", + // "required": true, // "type": "string" // }, - // "maxResults": { - // "default": "500", - // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", - // "format": "uint32", + // "priority": { + // "description": "The priority of the rule to patch.", + // "format": "int32", // "location": "query", - // "minimum": "0", // "type": "integer" // }, - // "orderBy": { - // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", - // "location": "query", - // "type": "string" - // }, - // "pageToken": { - // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", - // "location": "query", - // "type": "string" - // }, - // "parentId": { - // "description": "Parent ID for this request. The ID can be either be \"folders/[FOLDER_ID]\" if the parent is a folder or \"organizations/[ORGANIZATION_ID]\" if the parent is an organization.", + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" - // }, - // "returnPartialSuccess": { - // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", - // "location": "query", - // "type": "boolean" // } // }, - // "path": "locations/global/firewallPolicies", + // "path": "locations/global/firewallPolicies/{firewallPolicy}/patchRule", + // "request": { + // "$ref": "FirewallPolicyRule" + // }, // "response": { - // "$ref": "FirewallPolicyList" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// 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 *FirewallPoliciesListCall) Pages(ctx context.Context, f func(*FirewallPolicyList) 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 "compute.firewallPolicies.removeAssociation": -// method id "compute.firewallPolicies.listAssociations": +type FirewallPoliciesRemoveAssociationCall struct { + s *Service + firewallPolicy string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} -type FirewallPoliciesListAssociationsCall struct { - s *Service - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// RemoveAssociation: Removes an association for the specified firewall +// policy. +// +// - firewallPolicy: Name of the firewall policy to update. +func (r *FirewallPoliciesService) RemoveAssociation(firewallPolicy string) *FirewallPoliciesRemoveAssociationCall { + c := &FirewallPoliciesRemoveAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.firewallPolicy = firewallPolicy + return c } -// ListAssociations: Lists associations of a specified target, i.e., -// organization or folder. -func (r *FirewallPoliciesService) ListAssociations() *FirewallPoliciesListAssociationsCall { - c := &FirewallPoliciesListAssociationsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// Name sets the optional parameter "name": Name for the attachment that +// will be removed. +func (c *FirewallPoliciesRemoveAssociationCall) Name(name string) *FirewallPoliciesRemoveAssociationCall { + c.urlParams_.Set("name", name) return c } -// TargetResource sets the optional parameter "targetResource": The -// target resource to list associations. It is an organization, or a -// folder. -func (c *FirewallPoliciesListAssociationsCall) TargetResource(targetResource string) *FirewallPoliciesListAssociationsCall { - c.urlParams_.Set("targetResource", targetResource) +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *FirewallPoliciesRemoveAssociationCall) RequestId(requestId string) *FirewallPoliciesRemoveAssociationCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FirewallPoliciesListAssociationsCall) Fields(s ...googleapi.Field) *FirewallPoliciesListAssociationsCall { +func (c *FirewallPoliciesRemoveAssociationCall) Fields(s ...googleapi.Field) *FirewallPoliciesRemoveAssociationCall { 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 *FirewallPoliciesListAssociationsCall) IfNoneMatch(entityTag string) *FirewallPoliciesListAssociationsCall { - 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 *FirewallPoliciesListAssociationsCall) Context(ctx context.Context) *FirewallPoliciesListAssociationsCall { +func (c *FirewallPoliciesRemoveAssociationCall) Context(ctx context.Context) *FirewallPoliciesRemoveAssociationCall { 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 *FirewallPoliciesListAssociationsCall) Header() http.Header { +func (c *FirewallPoliciesRemoveAssociationCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallPoliciesListAssociationsCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallPoliciesRemoveAssociationCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/listAssociations") + urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/removeAssociation") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "firewallPolicy": c.firewallPolicy, + }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewallPolicies.listAssociations" call. -// Exactly one of *FirewallPoliciesListAssociationsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *FirewallPoliciesListAssociationsResponse.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 *FirewallPoliciesListAssociationsCall) Do(opts ...googleapi.CallOption) (*FirewallPoliciesListAssociationsResponse, error) { +// Do executes the "compute.firewallPolicies.removeAssociation" 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 *FirewallPoliciesRemoveAssociationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -81955,7 +83637,7 @@ func (c *FirewallPoliciesListAssociationsCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &FirewallPoliciesListAssociationsResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -81967,33 +83649,47 @@ func (c *FirewallPoliciesListAssociationsCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Lists associations of a specified target, i.e., organization or folder.", - // "flatPath": "locations/global/firewallPolicies/listAssociations", - // "httpMethod": "GET", - // "id": "compute.firewallPolicies.listAssociations", + // "description": "Removes an association for the specified firewall policy.", + // "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/removeAssociation", + // "httpMethod": "POST", + // "id": "compute.firewallPolicies.removeAssociation", + // "parameterOrder": [ + // "firewallPolicy" + // ], // "parameters": { - // "targetResource": { - // "description": "The target resource to list associations. It is an organization, or a folder.", + // "firewallPolicy": { + // "description": "Name of the firewall policy to update.", + // "location": "path", + // "pattern": "(firewallPolicies/)?[0-9]{0,20}", + // "required": true, + // "type": "string" + // }, + // "name": { + // "description": "Name for the attachment that will be removed.", + // "location": "query", + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" // } // }, - // "path": "locations/global/firewallPolicies/listAssociations", + // "path": "locations/global/firewallPolicies/{firewallPolicy}/removeAssociation", // "response": { - // "$ref": "FirewallPoliciesListAssociationsResponse" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.firewallPolicies.move": +// method id "compute.firewallPolicies.removeRule": -type FirewallPoliciesMoveCall struct { +type FirewallPoliciesRemoveRuleCall struct { s *Service firewallPolicy string urlParams_ gensupport.URLParams @@ -82001,21 +83697,19 @@ type FirewallPoliciesMoveCall struct { header_ http.Header } -// Move: Moves the specified firewall policy. +// RemoveRule: Deletes a rule of the specified priority. // // - firewallPolicy: Name of the firewall policy to update. -func (r *FirewallPoliciesService) Move(firewallPolicy string) *FirewallPoliciesMoveCall { - c := &FirewallPoliciesMoveCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *FirewallPoliciesService) RemoveRule(firewallPolicy string) *FirewallPoliciesRemoveRuleCall { + c := &FirewallPoliciesRemoveRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.firewallPolicy = firewallPolicy return c } -// ParentId sets the optional parameter "parentId": The new parent of -// the firewall policy. The ID can be either be "folders/[FOLDER_ID]" if -// the parent is a folder or "organizations/[ORGANIZATION_ID]" if the -// parent is an organization. -func (c *FirewallPoliciesMoveCall) ParentId(parentId string) *FirewallPoliciesMoveCall { - c.urlParams_.Set("parentId", parentId) +// Priority sets the optional parameter "priority": The priority of the +// rule to remove from the firewall policy. +func (c *FirewallPoliciesRemoveRuleCall) Priority(priority int64) *FirewallPoliciesRemoveRuleCall { + c.urlParams_.Set("priority", fmt.Sprint(priority)) return c } @@ -82030,7 +83724,7 @@ func (c *FirewallPoliciesMoveCall) ParentId(parentId string) *FirewallPoliciesMo // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *FirewallPoliciesMoveCall) RequestId(requestId string) *FirewallPoliciesMoveCall { +func (c *FirewallPoliciesRemoveRuleCall) RequestId(requestId string) *FirewallPoliciesRemoveRuleCall { c.urlParams_.Set("requestId", requestId) return c } @@ -82038,7 +83732,7 @@ func (c *FirewallPoliciesMoveCall) RequestId(requestId string) *FirewallPolicies // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FirewallPoliciesMoveCall) Fields(s ...googleapi.Field) *FirewallPoliciesMoveCall { +func (c *FirewallPoliciesRemoveRuleCall) Fields(s ...googleapi.Field) *FirewallPoliciesRemoveRuleCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -82046,21 +83740,21 @@ func (c *FirewallPoliciesMoveCall) Fields(s ...googleapi.Field) *FirewallPolicie // 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 *FirewallPoliciesMoveCall) Context(ctx context.Context) *FirewallPoliciesMoveCall { +func (c *FirewallPoliciesRemoveRuleCall) Context(ctx context.Context) *FirewallPoliciesRemoveRuleCall { 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 *FirewallPoliciesMoveCall) Header() http.Header { +func (c *FirewallPoliciesRemoveRuleCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallPoliciesMoveCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallPoliciesRemoveRuleCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -82070,7 +83764,7 @@ func (c *FirewallPoliciesMoveCall) doRequest(alt string) (*http.Response, error) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/move") + urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/removeRule") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -82083,14 +83777,14 @@ func (c *FirewallPoliciesMoveCall) doRequest(alt string) (*http.Response, error) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewallPolicies.move" call. +// Do executes the "compute.firewallPolicies.removeRule" 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 *FirewallPoliciesMoveCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *FirewallPoliciesRemoveRuleCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -82121,10 +83815,10 @@ func (c *FirewallPoliciesMoveCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Moves the specified firewall policy.", - // "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/move", + // "description": "Deletes a rule of the specified priority.", + // "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/removeRule", // "httpMethod": "POST", - // "id": "compute.firewallPolicies.move", + // "id": "compute.firewallPolicies.removeRule", // "parameterOrder": [ // "firewallPolicy" // ], @@ -82136,10 +83830,11 @@ func (c *FirewallPoliciesMoveCall) Do(opts ...googleapi.CallOption) (*Operation, // "required": true, // "type": "string" // }, - // "parentId": { - // "description": "The new parent of the firewall policy. The ID can be either be \"folders/[FOLDER_ID]\" if the parent is a folder or \"organizations/[ORGANIZATION_ID]\" if the parent is an organization.", + // "priority": { + // "description": "The priority of the rule to remove from the firewall policy.", + // "format": "int32", // "location": "query", - // "type": "string" + // "type": "integer" // }, // "requestId": { // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", @@ -82147,7 +83842,7 @@ func (c *FirewallPoliciesMoveCall) Do(opts ...googleapi.CallOption) (*Operation, // "type": "string" // } // }, - // "path": "locations/global/firewallPolicies/{firewallPolicy}/move", + // "path": "locations/global/firewallPolicies/{firewallPolicy}/removeRule", // "response": { // "$ref": "Operation" // }, @@ -82159,48 +83854,32 @@ func (c *FirewallPoliciesMoveCall) Do(opts ...googleapi.CallOption) (*Operation, } -// method id "compute.firewallPolicies.patch": +// method id "compute.firewallPolicies.setIamPolicy": -type FirewallPoliciesPatchCall struct { - s *Service - firewallPolicy string - firewallpolicy *FirewallPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FirewallPoliciesSetIamPolicyCall struct { + s *Service + resource string + globalorganizationsetpolicyrequest *GlobalOrganizationSetPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Patches the specified policy with the data included in the -// request. +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. // -// - firewallPolicy: Name of the firewall policy to update. -func (r *FirewallPoliciesService) Patch(firewallPolicy string, firewallpolicy *FirewallPolicy) *FirewallPoliciesPatchCall { - c := &FirewallPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy - c.firewallpolicy = firewallpolicy - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *FirewallPoliciesPatchCall) RequestId(requestId string) *FirewallPoliciesPatchCall { - c.urlParams_.Set("requestId", requestId) +// - resource: Name or id of the resource for this request. +func (r *FirewallPoliciesService) SetIamPolicy(resource string, globalorganizationsetpolicyrequest *GlobalOrganizationSetPolicyRequest) *FirewallPoliciesSetIamPolicyCall { + c := &FirewallPoliciesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.globalorganizationsetpolicyrequest = globalorganizationsetpolicyrequest 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 *FirewallPoliciesPatchCall) Fields(s ...googleapi.Field) *FirewallPoliciesPatchCall { +func (c *FirewallPoliciesSetIamPolicyCall) Fields(s ...googleapi.Field) *FirewallPoliciesSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -82208,21 +83887,21 @@ func (c *FirewallPoliciesPatchCall) Fields(s ...googleapi.Field) *FirewallPolici // 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 *FirewallPoliciesPatchCall) Context(ctx context.Context) *FirewallPoliciesPatchCall { +func (c *FirewallPoliciesSetIamPolicyCall) Context(ctx context.Context) *FirewallPoliciesSetIamPolicyCall { 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 *FirewallPoliciesPatchCall) Header() http.Header { +func (c *FirewallPoliciesSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallPoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -82230,34 +83909,34 @@ func (c *FirewallPoliciesPatchCall) doRequest(alt string) (*http.Response, error } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallpolicy) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalorganizationsetpolicyrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}") + urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{resource}/setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "firewallPolicy": c.firewallPolicy, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewallPolicies.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *FirewallPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.firewallPolicies.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *FirewallPoliciesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -82276,7 +83955,7 @@ func (c *FirewallPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -82288,33 +83967,28 @@ func (c *FirewallPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Patches the specified policy with the data included in the request.", - // "flatPath": "locations/global/firewallPolicies/{firewallPolicy}", - // "httpMethod": "PATCH", - // "id": "compute.firewallPolicies.patch", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "flatPath": "locations/global/firewallPolicies/{resource}/setIamPolicy", + // "httpMethod": "POST", + // "id": "compute.firewallPolicies.setIamPolicy", // "parameterOrder": [ - // "firewallPolicy" + // "resource" // ], // "parameters": { - // "firewallPolicy": { - // "description": "Name of the firewall policy to update.", + // "resource": { + // "description": "Name or id of the resource for this request.", // "location": "path", // "pattern": "(firewallPolicies/)?[0-9]{0,20}", // "required": true, // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" // } // }, - // "path": "locations/global/firewallPolicies/{firewallPolicy}", + // "path": "locations/global/firewallPolicies/{resource}/setIamPolicy", // "request": { - // "$ref": "FirewallPolicy" + // "$ref": "GlobalOrganizationSetPolicyRequest" // }, // "response": { - // "$ref": "Operation" + // "$ref": "Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -82324,54 +83998,32 @@ func (c *FirewallPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation } -// method id "compute.firewallPolicies.patchRule": +// method id "compute.firewallPolicies.testIamPermissions": -type FirewallPoliciesPatchRuleCall struct { - s *Service - firewallPolicy string - firewallpolicyrule *FirewallPolicyRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FirewallPoliciesTestIamPermissionsCall struct { + s *Service + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PatchRule: Patches a rule of the specified priority. +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. // -// - firewallPolicy: Name of the firewall policy to update. -func (r *FirewallPoliciesService) PatchRule(firewallPolicy string, firewallpolicyrule *FirewallPolicyRule) *FirewallPoliciesPatchRuleCall { - c := &FirewallPoliciesPatchRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy - c.firewallpolicyrule = firewallpolicyrule - return c -} - -// Priority sets the optional parameter "priority": The priority of the -// rule to patch. -func (c *FirewallPoliciesPatchRuleCall) Priority(priority int64) *FirewallPoliciesPatchRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *FirewallPoliciesPatchRuleCall) RequestId(requestId string) *FirewallPoliciesPatchRuleCall { - c.urlParams_.Set("requestId", requestId) +// - resource: Name or id of the resource for this request. +func (r *FirewallPoliciesService) TestIamPermissions(resource string, testpermissionsrequest *TestPermissionsRequest) *FirewallPoliciesTestIamPermissionsCall { + c := &FirewallPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest 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 *FirewallPoliciesPatchRuleCall) Fields(s ...googleapi.Field) *FirewallPoliciesPatchRuleCall { +func (c *FirewallPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *FirewallPoliciesTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -82379,21 +84031,21 @@ func (c *FirewallPoliciesPatchRuleCall) Fields(s ...googleapi.Field) *FirewallPo // 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 *FirewallPoliciesPatchRuleCall) Context(ctx context.Context) *FirewallPoliciesPatchRuleCall { +func (c *FirewallPoliciesTestIamPermissionsCall) Context(ctx context.Context) *FirewallPoliciesTestIamPermissionsCall { 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 *FirewallPoliciesPatchRuleCall) Header() http.Header { +func (c *FirewallPoliciesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallPoliciesPatchRuleCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -82401,14 +84053,14 @@ func (c *FirewallPoliciesPatchRuleCall) doRequest(alt string) (*http.Response, e } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallpolicyrule) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/patchRule") + urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -82416,19 +84068,19 @@ func (c *FirewallPoliciesPatchRuleCall) doRequest(alt string) (*http.Response, e } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "firewallPolicy": c.firewallPolicy, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewallPolicies.patchRule" 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 *FirewallPoliciesPatchRuleCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.firewallPolicies.testIamPermissions" call. +// Exactly one of *TestPermissionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.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 *FirewallPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -82447,7 +84099,7 @@ func (c *FirewallPoliciesPatchRuleCall) Do(opts ...googleapi.CallOption) (*Opera if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &TestPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -82459,72 +84111,57 @@ func (c *FirewallPoliciesPatchRuleCall) Do(opts ...googleapi.CallOption) (*Opera } return ret, nil // { - // "description": "Patches a rule of the specified priority.", - // "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/patchRule", + // "description": "Returns permissions that a caller has on the specified resource.", + // "flatPath": "locations/global/firewallPolicies/{resource}/testIamPermissions", // "httpMethod": "POST", - // "id": "compute.firewallPolicies.patchRule", + // "id": "compute.firewallPolicies.testIamPermissions", // "parameterOrder": [ - // "firewallPolicy" + // "resource" // ], // "parameters": { - // "firewallPolicy": { - // "description": "Name of the firewall policy to update.", + // "resource": { + // "description": "Name or id of the resource for this request.", // "location": "path", // "pattern": "(firewallPolicies/)?[0-9]{0,20}", // "required": true, // "type": "string" - // }, - // "priority": { - // "description": "The priority of the rule to patch.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" // } // }, - // "path": "locations/global/firewallPolicies/{firewallPolicy}/patchRule", + // "path": "locations/global/firewallPolicies/{resource}/testIamPermissions", // "request": { - // "$ref": "FirewallPolicyRule" + // "$ref": "TestPermissionsRequest" // }, // "response": { - // "$ref": "Operation" + // "$ref": "TestPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.firewallPolicies.removeAssociation": +// method id "compute.firewalls.delete": -type FirewallPoliciesRemoveAssociationCall struct { - s *Service - firewallPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FirewallsDeleteCall struct { + s *Service + project string + firewall string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// RemoveAssociation: Removes an association for the specified firewall -// policy. +// Delete: Deletes the specified firewall. // -// - firewallPolicy: Name of the firewall policy to update. -func (r *FirewallPoliciesService) RemoveAssociation(firewallPolicy string) *FirewallPoliciesRemoveAssociationCall { - c := &FirewallPoliciesRemoveAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy - return c -} - -// Name sets the optional parameter "name": Name for the attachment that -// will be removed. -func (c *FirewallPoliciesRemoveAssociationCall) Name(name string) *FirewallPoliciesRemoveAssociationCall { - c.urlParams_.Set("name", name) +// - firewall: Name of the firewall rule to delete. +// - project: Project ID for this request. +func (r *FirewallsService) Delete(project string, firewall string) *FirewallsDeleteCall { + c := &FirewallsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.firewall = firewall return c } @@ -82539,7 +84176,7 @@ func (c *FirewallPoliciesRemoveAssociationCall) Name(name string) *FirewallPolic // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *FirewallPoliciesRemoveAssociationCall) RequestId(requestId string) *FirewallPoliciesRemoveAssociationCall { +func (c *FirewallsDeleteCall) RequestId(requestId string) *FirewallsDeleteCall { c.urlParams_.Set("requestId", requestId) return c } @@ -82547,7 +84184,7 @@ func (c *FirewallPoliciesRemoveAssociationCall) RequestId(requestId string) *Fir // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FirewallPoliciesRemoveAssociationCall) Fields(s ...googleapi.Field) *FirewallPoliciesRemoveAssociationCall { +func (c *FirewallsDeleteCall) Fields(s ...googleapi.Field) *FirewallsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -82555,21 +84192,21 @@ func (c *FirewallPoliciesRemoveAssociationCall) Fields(s ...googleapi.Field) *Fi // 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 *FirewallPoliciesRemoveAssociationCall) Context(ctx context.Context) *FirewallPoliciesRemoveAssociationCall { +func (c *FirewallsDeleteCall) Context(ctx context.Context) *FirewallsDeleteCall { 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 *FirewallPoliciesRemoveAssociationCall) Header() http.Header { +func (c *FirewallsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallPoliciesRemoveAssociationCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -82579,27 +84216,28 @@ func (c *FirewallPoliciesRemoveAssociationCall) doRequest(alt string) (*http.Res var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/removeAssociation") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewalls/{firewall}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "firewallPolicy": c.firewallPolicy, + "project": c.project, + "firewall": c.firewall, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewallPolicies.removeAssociation" call. +// Do executes the "compute.firewalls.delete" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *FirewallPoliciesRemoveAssociationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *FirewallsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -82630,24 +84268,27 @@ func (c *FirewallPoliciesRemoveAssociationCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Removes an association for the specified firewall policy.", - // "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/removeAssociation", - // "httpMethod": "POST", - // "id": "compute.firewallPolicies.removeAssociation", + // "description": "Deletes the specified firewall.", + // "flatPath": "projects/{project}/global/firewalls/{firewall}", + // "httpMethod": "DELETE", + // "id": "compute.firewalls.delete", // "parameterOrder": [ - // "firewallPolicy" + // "project", + // "firewall" // ], // "parameters": { - // "firewallPolicy": { - // "description": "Name of the firewall policy to update.", + // "firewall": { + // "description": "Name of the firewall rule to delete.", // "location": "path", - // "pattern": "(firewallPolicies/)?[0-9]{0,20}", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, - // "name": { - // "description": "Name for the attachment that will be removed.", - // "location": "query", + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, // "type": "string" // }, // "requestId": { @@ -82656,7 +84297,7 @@ func (c *FirewallPoliciesRemoveAssociationCall) Do(opts ...googleapi.CallOption) // "type": "string" // } // }, - // "path": "locations/global/firewallPolicies/{firewallPolicy}/removeAssociation", + // "path": "projects/{project}/global/firewalls/{firewall}", // "response": { // "$ref": "Operation" // }, @@ -82668,104 +84309,99 @@ func (c *FirewallPoliciesRemoveAssociationCall) Do(opts ...googleapi.CallOption) } -// method id "compute.firewallPolicies.removeRule": +// method id "compute.firewalls.get": -type FirewallPoliciesRemoveRuleCall struct { - s *Service - firewallPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FirewallsGetCall struct { + s *Service + project string + firewall string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// RemoveRule: Deletes a rule of the specified priority. +// Get: Returns the specified firewall. // -// - firewallPolicy: Name of the firewall policy to update. -func (r *FirewallPoliciesService) RemoveRule(firewallPolicy string) *FirewallPoliciesRemoveRuleCall { - c := &FirewallPoliciesRemoveRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.firewallPolicy = firewallPolicy - return c -} - -// Priority sets the optional parameter "priority": The priority of the -// rule to remove from the firewall policy. -func (c *FirewallPoliciesRemoveRuleCall) Priority(priority int64) *FirewallPoliciesRemoveRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *FirewallPoliciesRemoveRuleCall) RequestId(requestId string) *FirewallPoliciesRemoveRuleCall { - c.urlParams_.Set("requestId", requestId) +// - firewall: Name of the firewall rule to return. +// - project: Project ID for this request. +func (r *FirewallsService) Get(project string, firewall string) *FirewallsGetCall { + c := &FirewallsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.firewall = firewall 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 *FirewallPoliciesRemoveRuleCall) Fields(s ...googleapi.Field) *FirewallPoliciesRemoveRuleCall { +func (c *FirewallsGetCall) Fields(s ...googleapi.Field) *FirewallsGetCall { 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 *FirewallsGetCall) IfNoneMatch(entityTag string) *FirewallsGetCall { + 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 *FirewallPoliciesRemoveRuleCall) Context(ctx context.Context) *FirewallPoliciesRemoveRuleCall { +func (c *FirewallsGetCall) Context(ctx context.Context) *FirewallsGetCall { 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 *FirewallPoliciesRemoveRuleCall) Header() http.Header { +func (c *FirewallsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallPoliciesRemoveRuleCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{firewallPolicy}/removeRule") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewalls/{firewall}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "firewallPolicy": c.firewallPolicy, + "project": c.project, + "firewall": c.firewall, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewallPolicies.removeRule" 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 +// Do executes the "compute.firewalls.get" call. +// Exactly one of *Firewall or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Firewall.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 *FirewallPoliciesRemoveRuleCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *FirewallsGetCall) Do(opts ...googleapi.CallOption) (*Firewall, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -82784,7 +84420,7 @@ func (c *FirewallPoliciesRemoveRuleCall) Do(opts ...googleapi.CallOption) (*Oper if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Firewall{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -82796,71 +84432,85 @@ func (c *FirewallPoliciesRemoveRuleCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Deletes a rule of the specified priority.", - // "flatPath": "locations/global/firewallPolicies/{firewallPolicy}/removeRule", - // "httpMethod": "POST", - // "id": "compute.firewallPolicies.removeRule", + // "description": "Returns the specified firewall.", + // "flatPath": "projects/{project}/global/firewalls/{firewall}", + // "httpMethod": "GET", + // "id": "compute.firewalls.get", // "parameterOrder": [ - // "firewallPolicy" + // "project", + // "firewall" // ], // "parameters": { - // "firewallPolicy": { - // "description": "Name of the firewall policy to update.", + // "firewall": { + // "description": "Name of the firewall rule to return.", // "location": "path", - // "pattern": "(firewallPolicies/)?[0-9]{0,20}", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, - // "priority": { - // "description": "The priority of the rule to remove from the firewall policy.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, // "type": "string" // } // }, - // "path": "locations/global/firewallPolicies/{firewallPolicy}/removeRule", + // "path": "projects/{project}/global/firewalls/{firewall}", // "response": { - // "$ref": "Operation" + // "$ref": "Firewall" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.firewallPolicies.setIamPolicy": +// method id "compute.firewalls.insert": -type FirewallPoliciesSetIamPolicyCall struct { - s *Service - resource string - globalorganizationsetpolicyrequest *GlobalOrganizationSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FirewallsInsertCall struct { + s *Service + project string + firewall *Firewall + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. +// Insert: Creates a firewall rule in the specified project using the +// data included in the request. // -// - resource: Name or id of the resource for this request. -func (r *FirewallPoliciesService) SetIamPolicy(resource string, globalorganizationsetpolicyrequest *GlobalOrganizationSetPolicyRequest) *FirewallPoliciesSetIamPolicyCall { - c := &FirewallPoliciesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.globalorganizationsetpolicyrequest = globalorganizationsetpolicyrequest +// - project: Project ID for this request. +func (r *FirewallsService) Insert(project string, firewall *Firewall) *FirewallsInsertCall { + c := &FirewallsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.firewall = firewall + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *FirewallsInsertCall) RequestId(requestId string) *FirewallsInsertCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FirewallPoliciesSetIamPolicyCall) Fields(s ...googleapi.Field) *FirewallPoliciesSetIamPolicyCall { +func (c *FirewallsInsertCall) Fields(s ...googleapi.Field) *FirewallsInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -82868,21 +84518,21 @@ func (c *FirewallPoliciesSetIamPolicyCall) Fields(s ...googleapi.Field) *Firewal // 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 *FirewallPoliciesSetIamPolicyCall) Context(ctx context.Context) *FirewallPoliciesSetIamPolicyCall { +func (c *FirewallsInsertCall) Context(ctx context.Context) *FirewallsInsertCall { 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 *FirewallPoliciesSetIamPolicyCall) Header() http.Header { +func (c *FirewallsInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallPoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -82890,14 +84540,14 @@ func (c *FirewallPoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalorganizationsetpolicyrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewall) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{resource}/setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewalls") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -82905,19 +84555,19 @@ func (c *FirewallPoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "project": c.project, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewallPolicies.setIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *FirewallPoliciesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// Do executes the "compute.firewalls.insert" 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 *FirewallsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -82936,7 +84586,7 @@ func (c *FirewallPoliciesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Po if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -82948,28 +84598,33 @@ func (c *FirewallPoliciesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Po } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", - // "flatPath": "locations/global/firewallPolicies/{resource}/setIamPolicy", + // "description": "Creates a firewall rule in the specified project using the data included in the request.", + // "flatPath": "projects/{project}/global/firewalls", // "httpMethod": "POST", - // "id": "compute.firewallPolicies.setIamPolicy", + // "id": "compute.firewalls.insert", // "parameterOrder": [ - // "resource" + // "project" // ], // "parameters": { - // "resource": { - // "description": "Name or id of the resource for this request.", + // "project": { + // "description": "Project ID for this request.", // "location": "path", - // "pattern": "(firewallPolicies/)?[0-9]{0,20}", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" // } // }, - // "path": "locations/global/firewallPolicies/{resource}/setIamPolicy", + // "path": "projects/{project}/global/firewalls", // "request": { - // "$ref": "GlobalOrganizationSetPolicyRequest" + // "$ref": "Firewall" // }, // "response": { - // "$ref": "Policy" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -82979,89 +84634,178 @@ func (c *FirewallPoliciesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Po } -// method id "compute.firewallPolicies.testIamPermissions": +// method id "compute.firewalls.list": -type FirewallPoliciesTestIamPermissionsCall struct { - s *Service - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FirewallsListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// List: Retrieves the list of firewall rules available to the specified +// project. // -// - resource: Name or id of the resource for this request. -func (r *FirewallPoliciesService) TestIamPermissions(resource string, testpermissionsrequest *TestPermissionsRequest) *FirewallPoliciesTestIamPermissionsCall { - c := &FirewallPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest +// - project: Project ID for this request. +func (r *FirewallsService) List(project string) *FirewallsListCall { + c := &FirewallsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources +// support two types of filter expressions: expressions that support +// regular expressions and expressions that follow API improvement +// proposal AIP-160. If you want to use AIP-160, your expression must +// specify the field name, an operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` +// or `:`. For example, if you are filtering Compute Engine instances, +// you can exclude instances named `example-instance` by specifying +// `name != example-instance`. The `:` operator can be used with string +// fields to match substrings. For non-string fields it is equivalent to +// the `=` operator. The `:*` comparison can be used to test whether a +// key has been defined. For example, to find all objects with `owner` +// label use: ``` labels.owner:* ``` You can also filter nested fields. +// For example, you could specify `scheduling.automaticRestart = false` +// to include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` If you want to use a +// regular expression, use the `eq` (equal) or `ne` (not equal) operator +// against a single un-parenthesized expression with or without quotes +// or against multiple parenthesized expressions. Examples: `fieldname +// eq unquoted literal` `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" `(fieldname1 eq literal) +// (fieldname2 ne "literal")` The literal value is interpreted as a +// regular expression using Google RE2 library syntax. The literal value +// must match the entire field. For example, to filter for instances +// that do not end with name "instance", you would use `name ne +// .*instance`. +func (c *FirewallsListCall) Filter(filter string) *FirewallsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *FirewallsListCall) MaxResults(maxResults int64) *FirewallsListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *FirewallsListCall) OrderBy(orderBy string) *FirewallsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *FirewallsListCall) PageToken(pageToken string) *FirewallsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *FirewallsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *FirewallsListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) 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 *FirewallPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *FirewallPoliciesTestIamPermissionsCall { +func (c *FirewallsListCall) Fields(s ...googleapi.Field) *FirewallsListCall { 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 *FirewallsListCall) IfNoneMatch(entityTag string) *FirewallsListCall { + 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 *FirewallPoliciesTestIamPermissionsCall) Context(ctx context.Context) *FirewallPoliciesTestIamPermissionsCall { +func (c *FirewallsListCall) Context(ctx context.Context) *FirewallsListCall { 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 *FirewallPoliciesTestIamPermissionsCall) Header() http.Header { +func (c *FirewallsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - 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) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "locations/global/firewallPolicies/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewalls") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "project": c.project, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewallPolicies.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *FirewallPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { +// Do executes the "compute.firewalls.list" call. +// Exactly one of *FirewallList or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *FirewallList.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 *FirewallsListCall) Do(opts ...googleapi.CallOption) (*FirewallList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -83080,7 +84824,7 @@ func (c *FirewallPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestPermissionsResponse{ + ret := &FirewallList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -83092,28 +84836,53 @@ func (c *FirewallPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "flatPath": "locations/global/firewallPolicies/{resource}/testIamPermissions", - // "httpMethod": "POST", - // "id": "compute.firewallPolicies.testIamPermissions", + // "description": "Retrieves the list of firewall rules available to the specified project.", + // "flatPath": "projects/{project}/global/firewalls", + // "httpMethod": "GET", + // "id": "compute.firewalls.list", // "parameterOrder": [ - // "resource" + // "project" // ], // "parameters": { - // "resource": { - // "description": "Name or id of the resource for this request.", + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", // "location": "path", - // "pattern": "(firewallPolicies/)?[0-9]{0,20}", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" + // }, + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "location": "query", + // "type": "boolean" // } // }, - // "path": "locations/global/firewallPolicies/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, + // "path": "projects/{project}/global/firewalls", // "response": { - // "$ref": "TestPermissionsResponse" + // "$ref": "FirewallList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -83124,25 +84893,50 @@ func (c *FirewallPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption } -// method id "compute.firewalls.delete": +// 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 *FirewallsListCall) Pages(ctx context.Context, f func(*FirewallList) 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 FirewallsDeleteCall struct { +// method id "compute.firewalls.patch": + +type FirewallsPatchCall struct { s *Service project string firewall string + firewall2 *Firewall urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Delete: Deletes the specified firewall. +// Patch: Updates the specified firewall rule with the data included in +// the request. This method supports PATCH semantics and uses the JSON +// merge patch format and processing rules. // -// - firewall: Name of the firewall rule to delete. +// - firewall: Name of the firewall rule to patch. // - project: Project ID for this request. -func (r *FirewallsService) Delete(project string, firewall string) *FirewallsDeleteCall { - c := &FirewallsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *FirewallsService) Patch(project string, firewall string, firewall2 *Firewall) *FirewallsPatchCall { + c := &FirewallsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.firewall = firewall + c.firewall2 = firewall2 return c } @@ -83157,7 +84951,7 @@ func (r *FirewallsService) Delete(project string, firewall string) *FirewallsDel // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *FirewallsDeleteCall) RequestId(requestId string) *FirewallsDeleteCall { +func (c *FirewallsPatchCall) RequestId(requestId string) *FirewallsPatchCall { c.urlParams_.Set("requestId", requestId) return c } @@ -83165,7 +84959,7 @@ func (c *FirewallsDeleteCall) RequestId(requestId string) *FirewallsDeleteCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FirewallsDeleteCall) Fields(s ...googleapi.Field) *FirewallsDeleteCall { +func (c *FirewallsPatchCall) Fields(s ...googleapi.Field) *FirewallsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -83173,21 +84967,21 @@ func (c *FirewallsDeleteCall) Fields(s ...googleapi.Field) *FirewallsDeleteCall // 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 *FirewallsDeleteCall) Context(ctx context.Context) *FirewallsDeleteCall { +func (c *FirewallsPatchCall) Context(ctx context.Context) *FirewallsPatchCall { 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 *FirewallsDeleteCall) Header() http.Header { +func (c *FirewallsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -83195,11 +84989,16 @@ func (c *FirewallsDeleteCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewall2) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewalls/{firewall}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -83211,14 +85010,14 @@ func (c *FirewallsDeleteCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewalls.delete" call. +// Do executes the "compute.firewalls.patch" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *FirewallsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *FirewallsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -83249,17 +85048,17 @@ func (c *FirewallsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Deletes the specified firewall.", + // "description": "Updates the specified firewall rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", // "flatPath": "projects/{project}/global/firewalls/{firewall}", - // "httpMethod": "DELETE", - // "id": "compute.firewalls.delete", + // "httpMethod": "PATCH", + // "id": "compute.firewalls.patch", // "parameterOrder": [ // "project", // "firewall" // ], // "parameters": { // "firewall": { - // "description": "Name of the firewall rule to delete.", + // "description": "Name of the firewall rule to patch.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -83279,6 +85078,9 @@ func (c *FirewallsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, erro // } // }, // "path": "projects/{project}/global/firewalls/{firewall}", + // "request": { + // "$ref": "Firewall" + // }, // "response": { // "$ref": "Operation" // }, @@ -83290,99 +85092,93 @@ func (c *FirewallsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, erro } -// method id "compute.firewalls.get": +// method id "compute.firewalls.testIamPermissions": -type FirewallsGetCall struct { - s *Service - project string - firewall string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type FirewallsTestIamPermissionsCall struct { + s *Service + project string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified firewall. +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. // -// - firewall: Name of the firewall rule to return. // - project: Project ID for this request. -func (r *FirewallsService) Get(project string, firewall string) *FirewallsGetCall { - c := &FirewallsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - resource: Name or id of the resource for this request. +func (r *FirewallsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *FirewallsTestIamPermissionsCall { + c := &FirewallsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.firewall = firewall + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest 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 *FirewallsGetCall) Fields(s ...googleapi.Field) *FirewallsGetCall { +func (c *FirewallsTestIamPermissionsCall) Fields(s ...googleapi.Field) *FirewallsTestIamPermissionsCall { 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 *FirewallsGetCall) IfNoneMatch(entityTag string) *FirewallsGetCall { - 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 *FirewallsGetCall) Context(ctx context.Context) *FirewallsGetCall { +func (c *FirewallsTestIamPermissionsCall) Context(ctx context.Context) *FirewallsTestIamPermissionsCall { 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 *FirewallsGetCall) Header() http.Header { +func (c *FirewallsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewalls/{firewall}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewalls/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, - "firewall": c.firewall, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewalls.get" call. -// Exactly one of *Firewall or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Firewall.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 *FirewallsGetCall) Do(opts ...googleapi.CallOption) (*Firewall, error) { +// Do executes the "compute.firewalls.testIamPermissions" call. +// Exactly one of *TestPermissionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.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 *FirewallsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -83401,7 +85197,7 @@ func (c *FirewallsGetCall) Do(opts ...googleapi.CallOption) (*Firewall, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Firewall{ + ret := &TestPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -83413,33 +85209,36 @@ func (c *FirewallsGetCall) Do(opts ...googleapi.CallOption) (*Firewall, error) { } return ret, nil // { - // "description": "Returns the specified firewall.", - // "flatPath": "projects/{project}/global/firewalls/{firewall}", - // "httpMethod": "GET", - // "id": "compute.firewalls.get", + // "description": "Returns permissions that a caller has on the specified resource.", + // "flatPath": "projects/{project}/global/firewalls/{resource}/testIamPermissions", + // "httpMethod": "POST", + // "id": "compute.firewalls.testIamPermissions", // "parameterOrder": [ // "project", - // "firewall" + // "resource" // ], // "parameters": { - // "firewall": { - // "description": "Name of the firewall rule to return.", + // "project": { + // "description": "Project ID for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" // }, - // "project": { - // "description": "Project ID for this request.", + // "resource": { + // "description": "Name or id of the resource for this request.", // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/global/firewalls/{firewall}", + // "path": "projects/{project}/global/firewalls/{resource}/testIamPermissions", + // "request": { + // "$ref": "TestPermissionsRequest" + // }, // "response": { - // "$ref": "Firewall" + // "$ref": "TestPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -83450,25 +85249,30 @@ func (c *FirewallsGetCall) Do(opts ...googleapi.CallOption) (*Firewall, error) { } -// method id "compute.firewalls.insert": +// method id "compute.firewalls.update": -type FirewallsInsertCall struct { +type FirewallsUpdateCall struct { s *Service project string - firewall *Firewall + firewall string + firewall2 *Firewall urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Insert: Creates a firewall rule in the specified project using the -// data included in the request. +// Update: Updates the specified firewall rule with the data included in +// the request. Note that all fields will be updated if using PUT, even +// fields that are not specified. To update individual fields, please +// use PATCH instead. // +// - firewall: Name of the firewall rule to update. // - project: Project ID for this request. -func (r *FirewallsService) Insert(project string, firewall *Firewall) *FirewallsInsertCall { - c := &FirewallsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *FirewallsService) Update(project string, firewall string, firewall2 *Firewall) *FirewallsUpdateCall { + c := &FirewallsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.firewall = firewall + c.firewall2 = firewall2 return c } @@ -83483,7 +85287,7 @@ func (r *FirewallsService) Insert(project string, firewall *Firewall) *Firewalls // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *FirewallsInsertCall) RequestId(requestId string) *FirewallsInsertCall { +func (c *FirewallsUpdateCall) RequestId(requestId string) *FirewallsUpdateCall { c.urlParams_.Set("requestId", requestId) return c } @@ -83491,7 +85295,7 @@ func (c *FirewallsInsertCall) RequestId(requestId string) *FirewallsInsertCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FirewallsInsertCall) Fields(s ...googleapi.Field) *FirewallsInsertCall { +func (c *FirewallsUpdateCall) Fields(s ...googleapi.Field) *FirewallsUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -83499,21 +85303,21 @@ func (c *FirewallsInsertCall) Fields(s ...googleapi.Field) *FirewallsInsertCall // 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 *FirewallsInsertCall) Context(ctx context.Context) *FirewallsInsertCall { +func (c *FirewallsUpdateCall) Context(ctx context.Context) *FirewallsUpdateCall { 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 *FirewallsInsertCall) Header() http.Header { +func (c *FirewallsUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallsInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *FirewallsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -83521,34 +85325,35 @@ func (c *FirewallsInsertCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewall) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewall2) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewalls") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewalls/{firewall}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PUT", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, + "project": c.project, + "firewall": c.firewall, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewalls.insert" call. +// Do executes the "compute.firewalls.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 *FirewallsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *FirewallsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -83579,14 +85384,22 @@ func (c *FirewallsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Creates a firewall rule in the specified project using the data included in the request.", - // "flatPath": "projects/{project}/global/firewalls", - // "httpMethod": "POST", - // "id": "compute.firewalls.insert", + // "description": "Updates the specified firewall rule with the data included in the request. Note that all fields will be updated if using PUT, even fields that are not specified. To update individual fields, please use PATCH instead.", + // "flatPath": "projects/{project}/global/firewalls/{firewall}", + // "httpMethod": "PUT", + // "id": "compute.firewalls.update", // "parameterOrder": [ - // "project" + // "project", + // "firewall" // ], // "parameters": { + // "firewall": { + // "description": "Name of the firewall rule to update.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -83600,7 +85413,7 @@ func (c *FirewallsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, erro // "type": "string" // } // }, - // "path": "projects/{project}/global/firewalls", + // "path": "projects/{project}/global/firewalls/{firewall}", // "request": { // "$ref": "Firewall" // }, @@ -83615,9 +85428,9 @@ func (c *FirewallsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, erro } -// method id "compute.firewalls.list": +// method id "compute.forwardingRules.aggregatedList": -type FirewallsListCall struct { +type ForwardingRulesAggregatedListCall struct { s *Service project string urlParams_ gensupport.URLParams @@ -83626,12 +85439,11 @@ type FirewallsListCall struct { header_ http.Header } -// List: Retrieves the list of firewall rules available to the specified -// project. +// AggregatedList: Retrieves an aggregated list of forwarding rules. // // - project: Project ID for this request. -func (r *FirewallsService) List(project string) *FirewallsListCall { - c := &FirewallsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ForwardingRulesService) AggregatedList(project string) *ForwardingRulesAggregatedListCall { + c := &ForwardingRulesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project return c } @@ -83671,18 +85483,31 @@ func (r *FirewallsService) List(project string) *FirewallsListCall { // must match the entire field. For example, to filter for instances // that do not end with name "instance", you would use `name ne // .*instance`. -func (c *FirewallsListCall) Filter(filter string) *FirewallsListCall { +func (c *ForwardingRulesAggregatedListCall) Filter(filter string) *ForwardingRulesAggregatedListCall { c.urlParams_.Set("filter", filter) return c } +// IncludeAllScopes sets the optional parameter "includeAllScopes": +// Indicates whether every visible scope for each scope type (zone, +// region, global) should be included in the response. For new resource +// types added after this field, the flag has no effect as new resource +// types will always include every visible scope for each scope type in +// response. For resource types which predate this field, if this flag +// is omitted or false, only scopes of the scope types where the +// resource type is expected to be found will be included. +func (c *ForwardingRulesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *ForwardingRulesAggregatedListCall { + c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) + return c +} + // MaxResults sets the optional parameter "maxResults": The maximum // number of results per page that should be returned. If the number of // available results is larger than `maxResults`, Compute Engine returns // a `nextPageToken` that can be used to get the next page of results in // subsequent list requests. Acceptable values are `0` to `500`, // inclusive. (Default: `500`) -func (c *FirewallsListCall) MaxResults(maxResults int64) *FirewallsListCall { +func (c *ForwardingRulesAggregatedListCall) MaxResults(maxResults int64) *ForwardingRulesAggregatedListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -83696,7 +85521,7 @@ func (c *FirewallsListCall) MaxResults(maxResults int64) *FirewallsListCall { // result first). Use this to sort resources like operations so that the // newest operation is returned first. Currently, only sorting by `name` // or `creationTimestamp desc` is supported. -func (c *FirewallsListCall) OrderBy(orderBy string) *FirewallsListCall { +func (c *ForwardingRulesAggregatedListCall) OrderBy(orderBy string) *ForwardingRulesAggregatedListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -83704,7 +85529,7 @@ func (c *FirewallsListCall) OrderBy(orderBy string) *FirewallsListCall { // PageToken sets the optional parameter "pageToken": Specifies a page // token to use. Set `pageToken` to the `nextPageToken` returned by a // previous list request to get the next page of results. -func (c *FirewallsListCall) PageToken(pageToken string) *FirewallsListCall { +func (c *ForwardingRulesAggregatedListCall) PageToken(pageToken string) *ForwardingRulesAggregatedListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -83713,7 +85538,7 @@ func (c *FirewallsListCall) PageToken(pageToken string) *FirewallsListCall { // "returnPartialSuccess": Opt-in for partial success behavior which // provides partial results in case of failure. The default value is // false. -func (c *FirewallsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *FirewallsListCall { +func (c *ForwardingRulesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ForwardingRulesAggregatedListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -83721,7 +85546,7 @@ func (c *FirewallsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *Fir // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FirewallsListCall) Fields(s ...googleapi.Field) *FirewallsListCall { +func (c *ForwardingRulesAggregatedListCall) Fields(s ...googleapi.Field) *ForwardingRulesAggregatedListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -83731,7 +85556,7 @@ func (c *FirewallsListCall) Fields(s ...googleapi.Field) *FirewallsListCall { // 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 *FirewallsListCall) IfNoneMatch(entityTag string) *FirewallsListCall { +func (c *ForwardingRulesAggregatedListCall) IfNoneMatch(entityTag string) *ForwardingRulesAggregatedListCall { c.ifNoneMatch_ = entityTag return c } @@ -83739,21 +85564,21 @@ func (c *FirewallsListCall) IfNoneMatch(entityTag string) *FirewallsListCall { // 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 *FirewallsListCall) Context(ctx context.Context) *FirewallsListCall { +func (c *ForwardingRulesAggregatedListCall) Context(ctx context.Context) *ForwardingRulesAggregatedListCall { 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 *FirewallsListCall) Header() http.Header { +func (c *ForwardingRulesAggregatedListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ForwardingRulesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -83766,7 +85591,7 @@ func (c *FirewallsListCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewalls") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/forwardingRules") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -83779,14 +85604,14 @@ func (c *FirewallsListCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewalls.list" call. -// Exactly one of *FirewallList or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *FirewallList.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 *FirewallsListCall) Do(opts ...googleapi.CallOption) (*FirewallList, error) { +// Do executes the "compute.forwardingRules.aggregatedList" call. +// Exactly one of *ForwardingRuleAggregatedList or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ForwardingRuleAggregatedList.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 *ForwardingRulesAggregatedListCall) Do(opts ...googleapi.CallOption) (*ForwardingRuleAggregatedList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -83805,7 +85630,7 @@ func (c *FirewallsListCall) Do(opts ...googleapi.CallOption) (*FirewallList, err if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &FirewallList{ + ret := &ForwardingRuleAggregatedList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -83817,10 +85642,10 @@ func (c *FirewallsListCall) Do(opts ...googleapi.CallOption) (*FirewallList, err } return ret, nil // { - // "description": "Retrieves the list of firewall rules available to the specified project.", - // "flatPath": "projects/{project}/global/firewalls", + // "description": "Retrieves an aggregated list of forwarding rules.", + // "flatPath": "projects/{project}/aggregated/forwardingRules", // "httpMethod": "GET", - // "id": "compute.firewalls.list", + // "id": "compute.forwardingRules.aggregatedList", // "parameterOrder": [ // "project" // ], @@ -83830,6 +85655,11 @@ func (c *FirewallsListCall) Do(opts ...googleapi.CallOption) (*FirewallList, err // "location": "query", // "type": "string" // }, + // "includeAllScopes": { + // "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", + // "location": "query", + // "type": "boolean" + // }, // "maxResults": { // "default": "500", // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", @@ -83861,9 +85691,9 @@ func (c *FirewallsListCall) Do(opts ...googleapi.CallOption) (*FirewallList, err // "type": "boolean" // } // }, - // "path": "projects/{project}/global/firewalls", + // "path": "projects/{project}/aggregated/forwardingRules", // "response": { - // "$ref": "FirewallList" + // "$ref": "ForwardingRuleAggregatedList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -83877,7 +85707,7 @@ func (c *FirewallsListCall) Do(opts ...googleapi.CallOption) (*FirewallList, err // 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 *FirewallsListCall) Pages(ctx context.Context, f func(*FirewallList) error) error { +func (c *ForwardingRulesAggregatedListCall) Pages(ctx context.Context, f func(*ForwardingRuleAggregatedList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -83895,29 +85725,28 @@ func (c *FirewallsListCall) Pages(ctx context.Context, f func(*FirewallList) err } } -// method id "compute.firewalls.patch": +// method id "compute.forwardingRules.delete": -type FirewallsPatchCall struct { - s *Service - project string - firewall string - firewall2 *Firewall - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ForwardingRulesDeleteCall struct { + s *Service + project string + region string + forwardingRule string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates the specified firewall rule with the data included in -// the request. This method supports PATCH semantics and uses the JSON -// merge patch format and processing rules. +// Delete: Deletes the specified ForwardingRule resource. // -// - firewall: Name of the firewall rule to patch. +// - forwardingRule: Name of the ForwardingRule resource to delete. // - project: Project ID for this request. -func (r *FirewallsService) Patch(project string, firewall string, firewall2 *Firewall) *FirewallsPatchCall { - c := &FirewallsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region scoping this request. +func (r *ForwardingRulesService) Delete(project string, region string, forwardingRule string) *ForwardingRulesDeleteCall { + c := &ForwardingRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.firewall = firewall - c.firewall2 = firewall2 + c.region = region + c.forwardingRule = forwardingRule return c } @@ -83932,7 +85761,7 @@ func (r *FirewallsService) Patch(project string, firewall string, firewall2 *Fir // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *FirewallsPatchCall) RequestId(requestId string) *FirewallsPatchCall { +func (c *ForwardingRulesDeleteCall) RequestId(requestId string) *ForwardingRulesDeleteCall { c.urlParams_.Set("requestId", requestId) return c } @@ -83940,7 +85769,7 @@ func (c *FirewallsPatchCall) RequestId(requestId string) *FirewallsPatchCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FirewallsPatchCall) Fields(s ...googleapi.Field) *FirewallsPatchCall { +func (c *ForwardingRulesDeleteCall) Fields(s ...googleapi.Field) *ForwardingRulesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -83948,21 +85777,21 @@ func (c *FirewallsPatchCall) Fields(s ...googleapi.Field) *FirewallsPatchCall { // 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 *FirewallsPatchCall) Context(ctx context.Context) *FirewallsPatchCall { +func (c *ForwardingRulesDeleteCall) Context(ctx context.Context) *ForwardingRulesDeleteCall { 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 *FirewallsPatchCall) Header() http.Header { +func (c *ForwardingRulesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ForwardingRulesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -83970,35 +85799,31 @@ func (c *FirewallsPatchCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewall2) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewalls/{firewall}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "firewall": c.firewall, + "project": c.project, + "region": c.region, + "forwardingRule": c.forwardingRule, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewalls.patch" call. +// Do executes the "compute.forwardingRules.delete" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *FirewallsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ForwardingRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -84029,17 +85854,18 @@ func (c *FirewallsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error } return ret, nil // { - // "description": "Updates the specified firewall rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "flatPath": "projects/{project}/global/firewalls/{firewall}", - // "httpMethod": "PATCH", - // "id": "compute.firewalls.patch", + // "description": "Deletes the specified ForwardingRule resource.", + // "flatPath": "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}", + // "httpMethod": "DELETE", + // "id": "compute.forwardingRules.delete", // "parameterOrder": [ // "project", - // "firewall" + // "region", + // "forwardingRule" // ], // "parameters": { - // "firewall": { - // "description": "Name of the firewall rule to patch.", + // "forwardingRule": { + // "description": "Name of the ForwardingRule resource to delete.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -84052,16 +85878,20 @@ func (c *FirewallsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error // "required": true, // "type": "string" // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, // "requestId": { // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" // } // }, - // "path": "projects/{project}/global/firewalls/{firewall}", - // "request": { - // "$ref": "Firewall" - // }, + // "path": "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}", // "response": { // "$ref": "Operation" // }, @@ -84073,93 +85903,103 @@ func (c *FirewallsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error } -// method id "compute.firewalls.testIamPermissions": +// method id "compute.forwardingRules.get": -type FirewallsTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ForwardingRulesGetCall struct { + s *Service + project string + region string + forwardingRule string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// Get: Returns the specified ForwardingRule resource. // +// - forwardingRule: Name of the ForwardingRule resource to return. // - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *FirewallsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *FirewallsTestIamPermissionsCall { - c := &FirewallsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region scoping this request. +func (r *ForwardingRulesService) Get(project string, region string, forwardingRule string) *ForwardingRulesGetCall { + c := &ForwardingRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest + c.region = region + c.forwardingRule = forwardingRule 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 *FirewallsTestIamPermissionsCall) Fields(s ...googleapi.Field) *FirewallsTestIamPermissionsCall { +func (c *ForwardingRulesGetCall) Fields(s ...googleapi.Field) *ForwardingRulesGetCall { 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 *ForwardingRulesGetCall) IfNoneMatch(entityTag string) *ForwardingRulesGetCall { + 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 *FirewallsTestIamPermissionsCall) Context(ctx context.Context) *FirewallsTestIamPermissionsCall { +func (c *ForwardingRulesGetCall) Context(ctx context.Context) *ForwardingRulesGetCall { 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 *FirewallsTestIamPermissionsCall) Header() http.Header { +func (c *ForwardingRulesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ForwardingRulesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - 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) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewalls/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, + "project": c.project, + "region": c.region, + "forwardingRule": c.forwardingRule, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewalls.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "compute.forwardingRules.get" call. +// Exactly one of *ForwardingRule or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *ForwardingRule.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 *FirewallsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { +func (c *ForwardingRulesGetCall) Do(opts ...googleapi.CallOption) (*ForwardingRule, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -84178,7 +86018,7 @@ func (c *FirewallsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Tes if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestPermissionsResponse{ + ret := &ForwardingRule{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -84190,15 +86030,23 @@ func (c *FirewallsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Tes } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "flatPath": "projects/{project}/global/firewalls/{resource}/testIamPermissions", - // "httpMethod": "POST", - // "id": "compute.firewalls.testIamPermissions", + // "description": "Returns the specified ForwardingRule resource.", + // "flatPath": "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}", + // "httpMethod": "GET", + // "id": "compute.forwardingRules.get", // "parameterOrder": [ // "project", - // "resource" + // "region", + // "forwardingRule" // ], // "parameters": { + // "forwardingRule": { + // "description": "Name of the ForwardingRule resource to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -84206,20 +86054,17 @@ func (c *FirewallsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Tes // "required": true, // "type": "string" // }, - // "resource": { - // "description": "Name or id of the resource for this request.", + // "region": { + // "description": "Name of the region scoping this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/global/firewalls/{resource}/testIamPermissions", - // "request": { - // "$ref": "TestPermissionsRequest" - // }, + // "path": "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}", // "response": { - // "$ref": "TestPermissionsResponse" + // "$ref": "ForwardingRule" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -84230,30 +86075,28 @@ func (c *FirewallsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Tes } -// method id "compute.firewalls.update": +// method id "compute.forwardingRules.insert": -type FirewallsUpdateCall struct { - s *Service - project string - firewall string - firewall2 *Firewall - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ForwardingRulesInsertCall struct { + s *Service + project string + region string + forwardingrule *ForwardingRule + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Update: Updates the specified firewall rule with the data included in -// the request. Note that all fields will be updated if using PUT, even -// fields that are not specified. To update individual fields, please -// use PATCH instead. +// Insert: Creates a ForwardingRule resource in the specified project +// and region using the data included in the request. // -// - firewall: Name of the firewall rule to update. // - project: Project ID for this request. -func (r *FirewallsService) Update(project string, firewall string, firewall2 *Firewall) *FirewallsUpdateCall { - c := &FirewallsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region scoping this request. +func (r *ForwardingRulesService) Insert(project string, region string, forwardingrule *ForwardingRule) *ForwardingRulesInsertCall { + c := &ForwardingRulesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.firewall = firewall - c.firewall2 = firewall2 + c.region = region + c.forwardingrule = forwardingrule return c } @@ -84268,7 +86111,7 @@ func (r *FirewallsService) Update(project string, firewall string, firewall2 *Fi // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *FirewallsUpdateCall) RequestId(requestId string) *FirewallsUpdateCall { +func (c *ForwardingRulesInsertCall) RequestId(requestId string) *ForwardingRulesInsertCall { c.urlParams_.Set("requestId", requestId) return c } @@ -84276,7 +86119,7 @@ func (c *FirewallsUpdateCall) RequestId(requestId string) *FirewallsUpdateCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FirewallsUpdateCall) Fields(s ...googleapi.Field) *FirewallsUpdateCall { +func (c *ForwardingRulesInsertCall) Fields(s ...googleapi.Field) *ForwardingRulesInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -84284,21 +86127,21 @@ func (c *FirewallsUpdateCall) Fields(s ...googleapi.Field) *FirewallsUpdateCall // 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 *FirewallsUpdateCall) Context(ctx context.Context) *FirewallsUpdateCall { +func (c *ForwardingRulesInsertCall) Context(ctx context.Context) *ForwardingRulesInsertCall { 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 *FirewallsUpdateCall) Header() http.Header { +func (c *ForwardingRulesInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FirewallsUpdateCall) doRequest(alt string) (*http.Response, error) { +func (c *ForwardingRulesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -84306,35 +86149,35 @@ func (c *FirewallsUpdateCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewall2) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.forwardingrule) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewalls/{firewall}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/forwardingRules") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "firewall": c.firewall, + "project": c.project, + "region": c.region, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.firewalls.update" call. +// Do executes the "compute.forwardingRules.insert" 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 *FirewallsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ForwardingRulesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -84365,26 +86208,26 @@ func (c *FirewallsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Updates the specified firewall rule with the data included in the request. Note that all fields will be updated if using PUT, even fields that are not specified. To update individual fields, please use PATCH instead.", - // "flatPath": "projects/{project}/global/firewalls/{firewall}", - // "httpMethod": "PUT", - // "id": "compute.firewalls.update", + // "description": "Creates a ForwardingRule resource in the specified project and region using the data included in the request.", + // "flatPath": "projects/{project}/regions/{region}/forwardingRules", + // "httpMethod": "POST", + // "id": "compute.forwardingRules.insert", // "parameterOrder": [ // "project", - // "firewall" + // "region" // ], // "parameters": { - // "firewall": { - // "description": "Name of the firewall rule to update.", + // "project": { + // "description": "Project ID for this request.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" // }, - // "project": { - // "description": "Project ID for this request.", + // "region": { + // "description": "Name of the region scoping this request.", // "location": "path", - // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // }, @@ -84394,9 +86237,9 @@ func (c *FirewallsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, erro // "type": "string" // } // }, - // "path": "projects/{project}/global/firewalls/{firewall}", + // "path": "projects/{project}/regions/{region}/forwardingRules", // "request": { - // "$ref": "Firewall" + // "$ref": "ForwardingRule" // }, // "response": { // "$ref": "Operation" @@ -84409,23 +86252,27 @@ func (c *FirewallsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, erro } -// method id "compute.forwardingRules.aggregatedList": +// method id "compute.forwardingRules.list": -type ForwardingRulesAggregatedListCall struct { +type ForwardingRulesListCall struct { s *Service project string + region string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// AggregatedList: Retrieves an aggregated list of forwarding rules. +// List: Retrieves a list of ForwardingRule resources available to the +// specified project and region. // // - project: Project ID for this request. -func (r *ForwardingRulesService) AggregatedList(project string) *ForwardingRulesAggregatedListCall { - c := &ForwardingRulesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region scoping this request. +func (r *ForwardingRulesService) List(project string, region string) *ForwardingRulesListCall { + c := &ForwardingRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project + c.region = region return c } @@ -84464,31 +86311,18 @@ func (r *ForwardingRulesService) AggregatedList(project string) *ForwardingRules // must match the entire field. For example, to filter for instances // that do not end with name "instance", you would use `name ne // .*instance`. -func (c *ForwardingRulesAggregatedListCall) Filter(filter string) *ForwardingRulesAggregatedListCall { +func (c *ForwardingRulesListCall) Filter(filter string) *ForwardingRulesListCall { c.urlParams_.Set("filter", filter) return c } -// IncludeAllScopes sets the optional parameter "includeAllScopes": -// Indicates whether every visible scope for each scope type (zone, -// region, global) should be included in the response. For new resource -// types added after this field, the flag has no effect as new resource -// types will always include every visible scope for each scope type in -// response. For resource types which predate this field, if this flag -// is omitted or false, only scopes of the scope types where the -// resource type is expected to be found will be included. -func (c *ForwardingRulesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *ForwardingRulesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - // MaxResults sets the optional parameter "maxResults": The maximum // number of results per page that should be returned. If the number of // available results is larger than `maxResults`, Compute Engine returns // a `nextPageToken` that can be used to get the next page of results in // subsequent list requests. Acceptable values are `0` to `500`, // inclusive. (Default: `500`) -func (c *ForwardingRulesAggregatedListCall) MaxResults(maxResults int64) *ForwardingRulesAggregatedListCall { +func (c *ForwardingRulesListCall) MaxResults(maxResults int64) *ForwardingRulesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -84502,7 +86336,7 @@ func (c *ForwardingRulesAggregatedListCall) MaxResults(maxResults int64) *Forwar // result first). Use this to sort resources like operations so that the // newest operation is returned first. Currently, only sorting by `name` // or `creationTimestamp desc` is supported. -func (c *ForwardingRulesAggregatedListCall) OrderBy(orderBy string) *ForwardingRulesAggregatedListCall { +func (c *ForwardingRulesListCall) OrderBy(orderBy string) *ForwardingRulesListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -84510,7 +86344,7 @@ func (c *ForwardingRulesAggregatedListCall) OrderBy(orderBy string) *ForwardingR // PageToken sets the optional parameter "pageToken": Specifies a page // token to use. Set `pageToken` to the `nextPageToken` returned by a // previous list request to get the next page of results. -func (c *ForwardingRulesAggregatedListCall) PageToken(pageToken string) *ForwardingRulesAggregatedListCall { +func (c *ForwardingRulesListCall) PageToken(pageToken string) *ForwardingRulesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -84519,7 +86353,7 @@ func (c *ForwardingRulesAggregatedListCall) PageToken(pageToken string) *Forward // "returnPartialSuccess": Opt-in for partial success behavior which // provides partial results in case of failure. The default value is // false. -func (c *ForwardingRulesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ForwardingRulesAggregatedListCall { +func (c *ForwardingRulesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ForwardingRulesListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -84527,7 +86361,7 @@ func (c *ForwardingRulesAggregatedListCall) ReturnPartialSuccess(returnPartialSu // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ForwardingRulesAggregatedListCall) Fields(s ...googleapi.Field) *ForwardingRulesAggregatedListCall { +func (c *ForwardingRulesListCall) Fields(s ...googleapi.Field) *ForwardingRulesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -84537,7 +86371,7 @@ func (c *ForwardingRulesAggregatedListCall) Fields(s ...googleapi.Field) *Forwar // 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 *ForwardingRulesAggregatedListCall) IfNoneMatch(entityTag string) *ForwardingRulesAggregatedListCall { +func (c *ForwardingRulesListCall) IfNoneMatch(entityTag string) *ForwardingRulesListCall { c.ifNoneMatch_ = entityTag return c } @@ -84545,21 +86379,21 @@ func (c *ForwardingRulesAggregatedListCall) IfNoneMatch(entityTag string) *Forwa // 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 *ForwardingRulesAggregatedListCall) Context(ctx context.Context) *ForwardingRulesAggregatedListCall { +func (c *ForwardingRulesListCall) Context(ctx context.Context) *ForwardingRulesListCall { 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 *ForwardingRulesAggregatedListCall) Header() http.Header { +func (c *ForwardingRulesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ForwardingRulesAggregatedListCall) doRequest(alt string) (*http.Response, error) { +func (c *ForwardingRulesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -84572,7 +86406,7 @@ func (c *ForwardingRulesAggregatedListCall) doRequest(alt string) (*http.Respons var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/forwardingRules") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/forwardingRules") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -84581,18 +86415,19 @@ func (c *ForwardingRulesAggregatedListCall) doRequest(alt string) (*http.Respons req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, + "region": c.region, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.forwardingRules.aggregatedList" call. -// Exactly one of *ForwardingRuleAggregatedList or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *ForwardingRuleAggregatedList.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "compute.forwardingRules.list" call. +// Exactly one of *ForwardingRuleList or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ForwardingRuleList.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 *ForwardingRulesAggregatedListCall) Do(opts ...googleapi.CallOption) (*ForwardingRuleAggregatedList, error) { +func (c *ForwardingRulesListCall) Do(opts ...googleapi.CallOption) (*ForwardingRuleList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -84611,7 +86446,7 @@ func (c *ForwardingRulesAggregatedListCall) Do(opts ...googleapi.CallOption) (*F if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ForwardingRuleAggregatedList{ + ret := &ForwardingRuleList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -84623,12 +86458,13 @@ func (c *ForwardingRulesAggregatedListCall) Do(opts ...googleapi.CallOption) (*F } return ret, nil // { - // "description": "Retrieves an aggregated list of forwarding rules.", - // "flatPath": "projects/{project}/aggregated/forwardingRules", + // "description": "Retrieves a list of ForwardingRule resources available to the specified project and region.", + // "flatPath": "projects/{project}/regions/{region}/forwardingRules", // "httpMethod": "GET", - // "id": "compute.forwardingRules.aggregatedList", + // "id": "compute.forwardingRules.list", // "parameterOrder": [ - // "project" + // "project", + // "region" // ], // "parameters": { // "filter": { @@ -84636,11 +86472,6 @@ func (c *ForwardingRulesAggregatedListCall) Do(opts ...googleapi.CallOption) (*F // "location": "query", // "type": "string" // }, - // "includeAllScopes": { - // "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", - // "location": "query", - // "type": "boolean" - // }, // "maxResults": { // "default": "500", // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", @@ -84666,15 +86497,22 @@ func (c *ForwardingRulesAggregatedListCall) Do(opts ...googleapi.CallOption) (*F // "required": true, // "type": "string" // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, // "returnPartialSuccess": { // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", // "location": "query", // "type": "boolean" // } // }, - // "path": "projects/{project}/aggregated/forwardingRules", + // "path": "projects/{project}/regions/{region}/forwardingRules", // "response": { - // "$ref": "ForwardingRuleAggregatedList" + // "$ref": "ForwardingRuleList" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -84688,7 +86526,7 @@ func (c *ForwardingRulesAggregatedListCall) Do(opts ...googleapi.CallOption) (*F // 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 *ForwardingRulesAggregatedListCall) Pages(ctx context.Context, f func(*ForwardingRuleAggregatedList) error) error { +func (c *ForwardingRulesListCall) Pages(ctx context.Context, f func(*ForwardingRuleList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -84706,28 +86544,33 @@ func (c *ForwardingRulesAggregatedListCall) Pages(ctx context.Context, f func(*F } } -// method id "compute.forwardingRules.delete": +// method id "compute.forwardingRules.patch": -type ForwardingRulesDeleteCall struct { +type ForwardingRulesPatchCall struct { s *Service project string region string forwardingRule string + forwardingrule *ForwardingRule urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Delete: Deletes the specified ForwardingRule resource. +// Patch: Updates the specified forwarding rule with the data included +// in the request. This method supports PATCH semantics and uses the +// JSON merge patch format and processing rules. Currently, you can only +// patch the network_tier field. // -// - forwardingRule: Name of the ForwardingRule resource to delete. +// - forwardingRule: Name of the ForwardingRule resource to patch. // - project: Project ID for this request. // - region: Name of the region scoping this request. -func (r *ForwardingRulesService) Delete(project string, region string, forwardingRule string) *ForwardingRulesDeleteCall { - c := &ForwardingRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ForwardingRulesService) Patch(project string, region string, forwardingRule string, forwardingrule *ForwardingRule) *ForwardingRulesPatchCall { + c := &ForwardingRulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region c.forwardingRule = forwardingRule + c.forwardingrule = forwardingrule return c } @@ -84742,7 +86585,7 @@ func (r *ForwardingRulesService) Delete(project string, region string, forwardin // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *ForwardingRulesDeleteCall) RequestId(requestId string) *ForwardingRulesDeleteCall { +func (c *ForwardingRulesPatchCall) RequestId(requestId string) *ForwardingRulesPatchCall { c.urlParams_.Set("requestId", requestId) return c } @@ -84750,7 +86593,7 @@ func (c *ForwardingRulesDeleteCall) RequestId(requestId string) *ForwardingRules // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ForwardingRulesDeleteCall) Fields(s ...googleapi.Field) *ForwardingRulesDeleteCall { +func (c *ForwardingRulesPatchCall) Fields(s ...googleapi.Field) *ForwardingRulesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -84758,21 +86601,21 @@ func (c *ForwardingRulesDeleteCall) Fields(s ...googleapi.Field) *ForwardingRule // 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 *ForwardingRulesDeleteCall) Context(ctx context.Context) *ForwardingRulesDeleteCall { +func (c *ForwardingRulesPatchCall) Context(ctx context.Context) *ForwardingRulesPatchCall { 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 *ForwardingRulesDeleteCall) Header() http.Header { +func (c *ForwardingRulesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ForwardingRulesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ForwardingRulesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -84780,11 +86623,16 @@ func (c *ForwardingRulesDeleteCall) doRequest(alt string) (*http.Response, error } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.forwardingrule) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -84797,14 +86645,14 @@ func (c *ForwardingRulesDeleteCall) doRequest(alt string) (*http.Response, error return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.forwardingRules.delete" call. +// Do executes the "compute.forwardingRules.patch" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ForwardingRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ForwardingRulesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -84835,10 +86683,10 @@ func (c *ForwardingRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Deletes the specified ForwardingRule resource.", + // "description": "Updates the specified forwarding rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can only patch the network_tier field.", // "flatPath": "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}", - // "httpMethod": "DELETE", - // "id": "compute.forwardingRules.delete", + // "httpMethod": "PATCH", + // "id": "compute.forwardingRules.patch", // "parameterOrder": [ // "project", // "region", @@ -84846,7 +86694,7 @@ func (c *ForwardingRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation // ], // "parameters": { // "forwardingRule": { - // "description": "Name of the ForwardingRule resource to delete.", + // "description": "Name of the ForwardingRule resource to patch.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -84873,6 +86721,9 @@ func (c *ForwardingRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation // } // }, // "path": "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}", + // "request": { + // "$ref": "ForwardingRule" + // }, // "response": { // "$ref": "Operation" // }, @@ -84884,83 +86735,283 @@ func (c *ForwardingRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation } -// method id "compute.forwardingRules.get": +// method id "compute.forwardingRules.setLabels": -type ForwardingRulesGetCall struct { - s *Service - project string - region string - forwardingRule string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ForwardingRulesSetLabelsCall struct { + s *Service + project string + region string + resource string + regionsetlabelsrequest *RegionSetLabelsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified ForwardingRule resource. +// SetLabels: Sets the labels on the specified resource. To learn more +// about labels, read the Labeling Resources documentation. // -// - forwardingRule: Name of the ForwardingRule resource to return. // - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *ForwardingRulesService) Get(project string, region string, forwardingRule string) *ForwardingRulesGetCall { - c := &ForwardingRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: The region for this request. +// - resource: Name or id of the resource for this request. +func (r *ForwardingRulesService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *ForwardingRulesSetLabelsCall { + c := &ForwardingRulesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.forwardingRule = forwardingRule + c.resource = resource + c.regionsetlabelsrequest = regionsetlabelsrequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *ForwardingRulesSetLabelsCall) RequestId(requestId string) *ForwardingRulesSetLabelsCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ForwardingRulesGetCall) Fields(s ...googleapi.Field) *ForwardingRulesGetCall { +func (c *ForwardingRulesSetLabelsCall) Fields(s ...googleapi.Field) *ForwardingRulesSetLabelsCall { 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 *ForwardingRulesGetCall) IfNoneMatch(entityTag string) *ForwardingRulesGetCall { - c.ifNoneMatch_ = entityTag +// 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 *ForwardingRulesSetLabelsCall) Context(ctx context.Context) *ForwardingRulesSetLabelsCall { + 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 *ForwardingRulesSetLabelsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ForwardingRulesSetLabelsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionsetlabelsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/forwardingRules/{resource}/setLabels") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.forwardingRules.setLabels" 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 *ForwardingRulesSetLabelsCall) 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the labels on the specified resource. To learn more about labels, read the Labeling Resources documentation.", + // "flatPath": "projects/{project}/regions/{region}/forwardingRules/{resource}/setLabels", + // "httpMethod": "POST", + // "id": "compute.forwardingRules.setLabels", + // "parameterOrder": [ + // "project", + // "region", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "The region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/regions/{region}/forwardingRules/{resource}/setLabels", + // "request": { + // "$ref": "RegionSetLabelsRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.forwardingRules.setTarget": + +type ForwardingRulesSetTargetCall struct { + s *Service + project string + region string + forwardingRule string + targetreference *TargetReference + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetTarget: Changes target URL for forwarding rule. The new target +// should be of the same type as the old target. +// +// - forwardingRule: Name of the ForwardingRule resource in which target +// is to be set. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *ForwardingRulesService) SetTarget(project string, region string, forwardingRule string, targetreference *TargetReference) *ForwardingRulesSetTargetCall { + c := &ForwardingRulesSetTargetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.forwardingRule = forwardingRule + c.targetreference = targetreference + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *ForwardingRulesSetTargetCall) RequestId(requestId string) *ForwardingRulesSetTargetCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ForwardingRulesSetTargetCall) Fields(s ...googleapi.Field) *ForwardingRulesSetTargetCall { + 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 *ForwardingRulesGetCall) Context(ctx context.Context) *ForwardingRulesGetCall { +func (c *ForwardingRulesSetTargetCall) Context(ctx context.Context) *ForwardingRulesSetTargetCall { 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 *ForwardingRulesGetCall) Header() http.Header { +func (c *ForwardingRulesSetTargetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ForwardingRulesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ForwardingRulesSetTargetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetreference) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}/setTarget") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -84973,14 +87024,14 @@ func (c *ForwardingRulesGetCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.forwardingRules.get" call. -// Exactly one of *ForwardingRule or error will be non-nil. Any non-2xx +// Do executes the "compute.forwardingRules.setTarget" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either -// *ForwardingRule.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 *ForwardingRulesGetCall) Do(opts ...googleapi.CallOption) (*ForwardingRule, error) { +// *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 *ForwardingRulesSetTargetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -84999,7 +87050,7 @@ func (c *ForwardingRulesGetCall) Do(opts ...googleapi.CallOption) (*ForwardingRu if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ForwardingRule{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -85011,10 +87062,10 @@ func (c *ForwardingRulesGetCall) Do(opts ...googleapi.CallOption) (*ForwardingRu } return ret, nil // { - // "description": "Returns the specified ForwardingRule resource.", - // "flatPath": "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}", - // "httpMethod": "GET", - // "id": "compute.forwardingRules.get", + // "description": "Changes target URL for forwarding rule. The new target should be of the same type as the old target.", + // "flatPath": "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}/setTarget", + // "httpMethod": "POST", + // "id": "compute.forwardingRules.setTarget", // "parameterOrder": [ // "project", // "region", @@ -85022,7 +87073,7 @@ func (c *ForwardingRulesGetCall) Do(opts ...googleapi.CallOption) (*ForwardingRu // ], // "parameters": { // "forwardingRule": { - // "description": "Name of the ForwardingRule resource to return.", + // "description": "Name of the ForwardingRule resource in which target is to be set.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -85041,66 +87092,60 @@ func (c *ForwardingRulesGetCall) Do(opts ...googleapi.CallOption) (*ForwardingRu // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" // } // }, - // "path": "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}", + // "path": "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}/setTarget", + // "request": { + // "$ref": "TargetReference" + // }, // "response": { - // "$ref": "ForwardingRule" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } } -// method id "compute.forwardingRules.insert": +// method id "compute.forwardingRules.testIamPermissions": -type ForwardingRulesInsertCall struct { - s *Service - project string - region string - forwardingrule *ForwardingRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ForwardingRulesTestIamPermissionsCall struct { + s *Service + project string + region string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Insert: Creates a ForwardingRule resource in the specified project -// and region using the data included in the request. +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. // // - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *ForwardingRulesService) Insert(project string, region string, forwardingrule *ForwardingRule) *ForwardingRulesInsertCall { - c := &ForwardingRulesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: The name of the region for this request. +// - resource: Name or id of the resource for this request. +func (r *ForwardingRulesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *ForwardingRulesTestIamPermissionsCall { + c := &ForwardingRulesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.forwardingrule = forwardingrule - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *ForwardingRulesInsertCall) RequestId(requestId string) *ForwardingRulesInsertCall { - c.urlParams_.Set("requestId", requestId) + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest 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 *ForwardingRulesInsertCall) Fields(s ...googleapi.Field) *ForwardingRulesInsertCall { +func (c *ForwardingRulesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ForwardingRulesTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -85108,21 +87153,21 @@ func (c *ForwardingRulesInsertCall) Fields(s ...googleapi.Field) *ForwardingRule // 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 *ForwardingRulesInsertCall) Context(ctx context.Context) *ForwardingRulesInsertCall { +func (c *ForwardingRulesTestIamPermissionsCall) Context(ctx context.Context) *ForwardingRulesTestIamPermissionsCall { 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 *ForwardingRulesInsertCall) Header() http.Header { +func (c *ForwardingRulesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ForwardingRulesInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *ForwardingRulesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -85130,14 +87175,14 @@ func (c *ForwardingRulesInsertCall) doRequest(alt string) (*http.Response, error } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.forwardingrule) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/forwardingRules") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/forwardingRules/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -85145,20 +87190,21 @@ func (c *ForwardingRulesInsertCall) doRequest(alt string) (*http.Response, error } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, + "project": c.project, + "region": c.region, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.forwardingRules.insert" 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 *ForwardingRulesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.forwardingRules.testIamPermissions" call. +// Exactly one of *TestPermissionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.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 *ForwardingRulesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -85177,7 +87223,7 @@ func (c *ForwardingRulesInsertCall) Do(opts ...googleapi.CallOption) (*Operation if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &TestPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -85189,13 +87235,14 @@ func (c *ForwardingRulesInsertCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Creates a ForwardingRule resource in the specified project and region using the data included in the request.", - // "flatPath": "projects/{project}/regions/{region}/forwardingRules", + // "description": "Returns permissions that a caller has on the specified resource.", + // "flatPath": "projects/{project}/regions/{region}/forwardingRules/{resource}/testIamPermissions", // "httpMethod": "POST", - // "id": "compute.forwardingRules.insert", + // "id": "compute.forwardingRules.testIamPermissions", // "parameterOrder": [ // "project", - // "region" + // "region", + // "resource" // ], // "parameters": { // "project": { @@ -85206,54 +87253,53 @@ func (c *ForwardingRulesInsertCall) Do(opts ...googleapi.CallOption) (*Operation // "type": "string" // }, // "region": { - // "description": "Name of the region scoping this request.", + // "description": "The name of the region for this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/regions/{region}/forwardingRules", + // "path": "projects/{project}/regions/{region}/forwardingRules/{resource}/testIamPermissions", // "request": { - // "$ref": "ForwardingRule" + // "$ref": "TestPermissionsRequest" // }, // "response": { - // "$ref": "Operation" + // "$ref": "TestPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.forwardingRules.list": +// method id "compute.futureReservations.aggregatedList": -type ForwardingRulesListCall struct { +type FutureReservationsAggregatedListCall struct { s *Service project string - region string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Retrieves a list of ForwardingRule resources available to the -// specified project and region. +// AggregatedList: Retrieves an aggregated list of future reservations. // // - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *ForwardingRulesService) List(project string, region string) *ForwardingRulesListCall { - c := &ForwardingRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *FutureReservationsService) AggregatedList(project string) *FutureReservationsAggregatedListCall { + c := &FutureReservationsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region return c } @@ -85292,18 +87338,31 @@ func (r *ForwardingRulesService) List(project string, region string) *Forwarding // must match the entire field. For example, to filter for instances // that do not end with name "instance", you would use `name ne // .*instance`. -func (c *ForwardingRulesListCall) Filter(filter string) *ForwardingRulesListCall { +func (c *FutureReservationsAggregatedListCall) Filter(filter string) *FutureReservationsAggregatedListCall { c.urlParams_.Set("filter", filter) return c } +// IncludeAllScopes sets the optional parameter "includeAllScopes": +// Indicates whether every visible scope for each scope type (zone, +// region, global) should be included in the response. For new resource +// types added after this field, the flag has no effect as new resource +// types will always include every visible scope for each scope type in +// response. For resource types which predate this field, if this flag +// is omitted or false, only scopes of the scope types where the +// resource type is expected to be found will be included. +func (c *FutureReservationsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *FutureReservationsAggregatedListCall { + c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) + return c +} + // MaxResults sets the optional parameter "maxResults": The maximum // number of results per page that should be returned. If the number of // available results is larger than `maxResults`, Compute Engine returns // a `nextPageToken` that can be used to get the next page of results in // subsequent list requests. Acceptable values are `0` to `500`, // inclusive. (Default: `500`) -func (c *ForwardingRulesListCall) MaxResults(maxResults int64) *ForwardingRulesListCall { +func (c *FutureReservationsAggregatedListCall) MaxResults(maxResults int64) *FutureReservationsAggregatedListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -85317,7 +87376,7 @@ func (c *ForwardingRulesListCall) MaxResults(maxResults int64) *ForwardingRulesL // result first). Use this to sort resources like operations so that the // newest operation is returned first. Currently, only sorting by `name` // or `creationTimestamp desc` is supported. -func (c *ForwardingRulesListCall) OrderBy(orderBy string) *ForwardingRulesListCall { +func (c *FutureReservationsAggregatedListCall) OrderBy(orderBy string) *FutureReservationsAggregatedListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -85325,7 +87384,7 @@ func (c *ForwardingRulesListCall) OrderBy(orderBy string) *ForwardingRulesListCa // PageToken sets the optional parameter "pageToken": Specifies a page // token to use. Set `pageToken` to the `nextPageToken` returned by a // previous list request to get the next page of results. -func (c *ForwardingRulesListCall) PageToken(pageToken string) *ForwardingRulesListCall { +func (c *FutureReservationsAggregatedListCall) PageToken(pageToken string) *FutureReservationsAggregatedListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -85334,7 +87393,7 @@ func (c *ForwardingRulesListCall) PageToken(pageToken string) *ForwardingRulesLi // "returnPartialSuccess": Opt-in for partial success behavior which // provides partial results in case of failure. The default value is // false. -func (c *ForwardingRulesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ForwardingRulesListCall { +func (c *FutureReservationsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *FutureReservationsAggregatedListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -85342,7 +87401,7 @@ func (c *ForwardingRulesListCall) ReturnPartialSuccess(returnPartialSuccess bool // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ForwardingRulesListCall) Fields(s ...googleapi.Field) *ForwardingRulesListCall { +func (c *FutureReservationsAggregatedListCall) Fields(s ...googleapi.Field) *FutureReservationsAggregatedListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -85352,7 +87411,7 @@ func (c *ForwardingRulesListCall) Fields(s ...googleapi.Field) *ForwardingRulesL // 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 *ForwardingRulesListCall) IfNoneMatch(entityTag string) *ForwardingRulesListCall { +func (c *FutureReservationsAggregatedListCall) IfNoneMatch(entityTag string) *FutureReservationsAggregatedListCall { c.ifNoneMatch_ = entityTag return c } @@ -85360,21 +87419,21 @@ func (c *ForwardingRulesListCall) IfNoneMatch(entityTag string) *ForwardingRules // 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 *ForwardingRulesListCall) Context(ctx context.Context) *ForwardingRulesListCall { +func (c *FutureReservationsAggregatedListCall) Context(ctx context.Context) *FutureReservationsAggregatedListCall { 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 *ForwardingRulesListCall) Header() http.Header { +func (c *FutureReservationsAggregatedListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ForwardingRulesListCall) doRequest(alt string) (*http.Response, error) { +func (c *FutureReservationsAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -85387,7 +87446,7 @@ func (c *ForwardingRulesListCall) doRequest(alt string) (*http.Response, error) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/forwardingRules") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/futureReservations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -85396,19 +87455,20 @@ func (c *ForwardingRulesListCall) doRequest(alt string) (*http.Response, error) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, - "region": c.region, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.forwardingRules.list" call. -// Exactly one of *ForwardingRuleList or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ForwardingRuleList.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 *ForwardingRulesListCall) Do(opts ...googleapi.CallOption) (*ForwardingRuleList, error) { +// Do executes the "compute.futureReservations.aggregatedList" call. +// Exactly one of *FutureReservationsAggregatedListResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *FutureReservationsAggregatedListResponse.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 *FutureReservationsAggregatedListCall) Do(opts ...googleapi.CallOption) (*FutureReservationsAggregatedListResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -85427,7 +87487,7 @@ func (c *ForwardingRulesListCall) Do(opts ...googleapi.CallOption) (*ForwardingR if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ForwardingRuleList{ + ret := &FutureReservationsAggregatedListResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -85439,13 +87499,12 @@ func (c *ForwardingRulesListCall) Do(opts ...googleapi.CallOption) (*ForwardingR } return ret, nil // { - // "description": "Retrieves a list of ForwardingRule resources available to the specified project and region.", - // "flatPath": "projects/{project}/regions/{region}/forwardingRules", + // "description": "Retrieves an aggregated list of future reservations.", + // "flatPath": "projects/{project}/aggregated/futureReservations", // "httpMethod": "GET", - // "id": "compute.forwardingRules.list", + // "id": "compute.futureReservations.aggregatedList", // "parameterOrder": [ - // "project", - // "region" + // "project" // ], // "parameters": { // "filter": { @@ -85453,6 +87512,11 @@ func (c *ForwardingRulesListCall) Do(opts ...googleapi.CallOption) (*ForwardingR // "location": "query", // "type": "string" // }, + // "includeAllScopes": { + // "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", + // "location": "query", + // "type": "boolean" + // }, // "maxResults": { // "default": "500", // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", @@ -85478,22 +87542,15 @@ func (c *ForwardingRulesListCall) Do(opts ...googleapi.CallOption) (*ForwardingR // "required": true, // "type": "string" // }, - // "region": { - // "description": "Name of the region scoping this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, // "returnPartialSuccess": { // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", // "location": "query", // "type": "boolean" // } // }, - // "path": "projects/{project}/regions/{region}/forwardingRules", + // "path": "projects/{project}/aggregated/futureReservations", // "response": { - // "$ref": "ForwardingRuleList" + // "$ref": "FutureReservationsAggregatedListResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", @@ -85507,7 +87564,7 @@ func (c *ForwardingRulesListCall) Do(opts ...googleapi.CallOption) (*ForwardingR // 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 *ForwardingRulesListCall) Pages(ctx context.Context, f func(*ForwardingRuleList) error) error { +func (c *FutureReservationsAggregatedListCall) Pages(ctx context.Context, f func(*FutureReservationsAggregatedListResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -85525,115 +87582,461 @@ func (c *ForwardingRulesListCall) Pages(ctx context.Context, f func(*ForwardingR } } -// method id "compute.forwardingRules.patch": +// method id "compute.futureReservations.cancel": -type ForwardingRulesPatchCall struct { - s *Service - project string - region string - forwardingRule string - forwardingrule *ForwardingRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FutureReservationsCancelCall struct { + s *Service + project string + zone string + futureReservation string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Cancel the specified future reservation. +// +// - futureReservation: Name of the future reservation to retrieve. Name +// should conform to RFC1035. +// - project: Project ID for this request. +// - zone: Name of the zone for this request. Name should conform to +// RFC1035. +func (r *FutureReservationsService) Cancel(project string, zone string, futureReservation string) *FutureReservationsCancelCall { + c := &FutureReservationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.futureReservation = futureReservation + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *FutureReservationsCancelCall) RequestId(requestId string) *FutureReservationsCancelCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *FutureReservationsCancelCall) Fields(s ...googleapi.Field) *FutureReservationsCancelCall { + 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 *FutureReservationsCancelCall) Context(ctx context.Context) *FutureReservationsCancelCall { + 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 *FutureReservationsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FutureReservationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/futureReservations/{futureReservation}/cancel") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "futureReservation": c.futureReservation, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.futureReservations.cancel" 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 *FutureReservationsCancelCall) 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, gensupport.WrapError(&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, gensupport.WrapError(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": "Cancel the specified future reservation.", + // "flatPath": "projects/{project}/zones/{zone}/futureReservations/{futureReservation}/cancel", + // "httpMethod": "POST", + // "id": "compute.futureReservations.cancel", + // "parameterOrder": [ + // "project", + // "zone", + // "futureReservation" + // ], + // "parameters": { + // "futureReservation": { + // "description": "Name of the future reservation to retrieve. Name should conform to RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone for this request. Name should conform to RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/zones/{zone}/futureReservations/{futureReservation}/cancel", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.futureReservations.delete": + +type FutureReservationsDeleteCall struct { + s *Service + project string + zone string + futureReservation string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified future reservation. +// +// - futureReservation: Name of the future reservation to retrieve. Name +// should conform to RFC1035. +// - project: Project ID for this request. +// - zone: Name of the zone for this request. Name should conform to +// RFC1035. +func (r *FutureReservationsService) Delete(project string, zone string, futureReservation string) *FutureReservationsDeleteCall { + c := &FutureReservationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.futureReservation = futureReservation + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *FutureReservationsDeleteCall) RequestId(requestId string) *FutureReservationsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *FutureReservationsDeleteCall) Fields(s ...googleapi.Field) *FutureReservationsDeleteCall { + 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 *FutureReservationsDeleteCall) Context(ctx context.Context) *FutureReservationsDeleteCall { + 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 *FutureReservationsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FutureReservationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/futureReservations/{futureReservation}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "futureReservation": c.futureReservation, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.futureReservations.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *FutureReservationsDeleteCall) 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, gensupport.WrapError(&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, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified future reservation.", + // "flatPath": "projects/{project}/zones/{zone}/futureReservations/{futureReservation}", + // "httpMethod": "DELETE", + // "id": "compute.futureReservations.delete", + // "parameterOrder": [ + // "project", + // "zone", + // "futureReservation" + // ], + // "parameters": { + // "futureReservation": { + // "description": "Name of the future reservation to retrieve. Name should conform to RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone for this request. Name should conform to RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/zones/{zone}/futureReservations/{futureReservation}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.futureReservations.get": + +type FutureReservationsGetCall struct { + s *Service + project string + zone string + futureReservation string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates the specified forwarding rule with the data included -// in the request. This method supports PATCH semantics and uses the -// JSON merge patch format and processing rules. Currently, you can only -// patch the network_tier field. +// Get: Retrieves information about the specified future reservation. // -// - forwardingRule: Name of the ForwardingRule resource to patch. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *ForwardingRulesService) Patch(project string, region string, forwardingRule string, forwardingrule *ForwardingRule) *ForwardingRulesPatchCall { - c := &ForwardingRulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - futureReservation: Name of the future reservation to retrieve. Name +// should conform to RFC1035. +// - project: Project ID for this request. +// - zone: Name of the zone for this request. Name should conform to +// RFC1035. +func (r *FutureReservationsService) Get(project string, zone string, futureReservation string) *FutureReservationsGetCall { + c := &FutureReservationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region - c.forwardingRule = forwardingRule - c.forwardingrule = forwardingrule - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *ForwardingRulesPatchCall) RequestId(requestId string) *ForwardingRulesPatchCall { - c.urlParams_.Set("requestId", requestId) + c.zone = zone + c.futureReservation = futureReservation 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 *ForwardingRulesPatchCall) Fields(s ...googleapi.Field) *ForwardingRulesPatchCall { +func (c *FutureReservationsGetCall) Fields(s ...googleapi.Field) *FutureReservationsGetCall { 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 *FutureReservationsGetCall) IfNoneMatch(entityTag string) *FutureReservationsGetCall { + 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 *ForwardingRulesPatchCall) Context(ctx context.Context) *ForwardingRulesPatchCall { +func (c *FutureReservationsGetCall) Context(ctx context.Context) *FutureReservationsGetCall { 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 *ForwardingRulesPatchCall) Header() http.Header { +func (c *FutureReservationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ForwardingRulesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *FutureReservationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.forwardingrule) - 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) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/futureReservations/{futureReservation}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "forwardingRule": c.forwardingRule, + "project": c.project, + "zone": c.zone, + "futureReservation": c.futureReservation, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.forwardingRules.patch" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ForwardingRulesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.futureReservations.get" call. +// Exactly one of *FutureReservation or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *FutureReservation.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 *FutureReservationsGetCall) Do(opts ...googleapi.CallOption) (*FutureReservation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -85652,7 +88055,7 @@ func (c *ForwardingRulesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &FutureReservation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -85664,20 +88067,19 @@ func (c *ForwardingRulesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Updates the specified forwarding rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can only patch the network_tier field.", - // "flatPath": "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}", - // "httpMethod": "PATCH", - // "id": "compute.forwardingRules.patch", + // "description": "Retrieves information about the specified future reservation.", + // "flatPath": "projects/{project}/zones/{zone}/futureReservations/{futureReservation}", + // "httpMethod": "GET", + // "id": "compute.futureReservations.get", // "parameterOrder": [ // "project", - // "region", - // "forwardingRule" + // "zone", + // "futureReservation" // ], // "parameters": { - // "forwardingRule": { - // "description": "Name of the ForwardingRule resource to patch.", + // "futureReservation": { + // "description": "Name of the future reservation to retrieve. Name should conform to RFC1035.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -85688,59 +88090,48 @@ func (c *ForwardingRulesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, // "required": true, // "type": "string" // }, - // "region": { - // "description": "Name of the region scoping this request.", + // "zone": { + // "description": "Name of the zone for this request. Name should conform to RFC1035.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" // } // }, - // "path": "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}", - // "request": { - // "$ref": "ForwardingRule" - // }, + // "path": "projects/{project}/zones/{zone}/futureReservations/{futureReservation}", // "response": { - // "$ref": "Operation" + // "$ref": "FutureReservation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.forwardingRules.setLabels": +// method id "compute.futureReservations.insert": -type ForwardingRulesSetLabelsCall struct { - s *Service - project string - region string - resource string - regionsetlabelsrequest *RegionSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FutureReservationsInsertCall struct { + s *Service + project string + zone string + futurereservation *FutureReservation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetLabels: Sets the labels on the specified resource. To learn more -// about labels, read the Labeling Resources documentation. +// Insert: Creates a new Future Reservation. // -// - project: Project ID for this request. -// - region: The region for this request. -// - resource: Name or id of the resource for this request. -func (r *ForwardingRulesService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *ForwardingRulesSetLabelsCall { - c := &ForwardingRulesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - zone: Name of the zone for this request. Name should conform to +// RFC1035. +func (r *FutureReservationsService) Insert(project string, zone string, futurereservation *FutureReservation) *FutureReservationsInsertCall { + c := &FutureReservationsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region - c.resource = resource - c.regionsetlabelsrequest = regionsetlabelsrequest + c.zone = zone + c.futurereservation = futurereservation return c } @@ -85755,7 +88146,7 @@ func (r *ForwardingRulesService) SetLabels(project string, region string, resour // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *ForwardingRulesSetLabelsCall) RequestId(requestId string) *ForwardingRulesSetLabelsCall { +func (c *FutureReservationsInsertCall) RequestId(requestId string) *FutureReservationsInsertCall { c.urlParams_.Set("requestId", requestId) return c } @@ -85763,7 +88154,7 @@ func (c *ForwardingRulesSetLabelsCall) RequestId(requestId string) *ForwardingRu // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ForwardingRulesSetLabelsCall) Fields(s ...googleapi.Field) *ForwardingRulesSetLabelsCall { +func (c *FutureReservationsInsertCall) Fields(s ...googleapi.Field) *FutureReservationsInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -85771,21 +88162,21 @@ func (c *ForwardingRulesSetLabelsCall) Fields(s ...googleapi.Field) *ForwardingR // 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 *ForwardingRulesSetLabelsCall) Context(ctx context.Context) *ForwardingRulesSetLabelsCall { +func (c *FutureReservationsInsertCall) Context(ctx context.Context) *FutureReservationsInsertCall { 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 *ForwardingRulesSetLabelsCall) Header() http.Header { +func (c *FutureReservationsInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ForwardingRulesSetLabelsCall) doRequest(alt string) (*http.Response, error) { +func (c *FutureReservationsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -85793,14 +88184,14 @@ func (c *ForwardingRulesSetLabelsCall) doRequest(alt string) (*http.Response, er } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionsetlabelsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.futurereservation) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/forwardingRules/{resource}/setLabels") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/futureReservations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -85808,21 +88199,20 @@ func (c *ForwardingRulesSetLabelsCall) doRequest(alt string) (*http.Response, er } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, + "project": c.project, + "zone": c.zone, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.forwardingRules.setLabels" call. +// Do executes the "compute.futureReservations.insert" 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 *ForwardingRulesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *FutureReservationsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -85853,14 +88243,13 @@ func (c *ForwardingRulesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operat } return ret, nil // { - // "description": "Sets the labels on the specified resource. To learn more about labels, read the Labeling Resources documentation.", - // "flatPath": "projects/{project}/regions/{region}/forwardingRules/{resource}/setLabels", + // "description": "Creates a new Future Reservation.", + // "flatPath": "projects/{project}/zones/{zone}/futureReservations", // "httpMethod": "POST", - // "id": "compute.forwardingRules.setLabels", + // "id": "compute.futureReservations.insert", // "parameterOrder": [ // "project", - // "region", - // "resource" + // "zone" // ], // "parameters": { // "project": { @@ -85870,29 +88259,21 @@ func (c *ForwardingRulesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operat // "required": true, // "type": "string" // }, - // "region": { - // "description": "The region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, - // "type": "string" - // }, // "requestId": { // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", // "location": "query", // "type": "string" // }, - // "resource": { - // "description": "Name or id of the resource for this request.", + // "zone": { + // "description": "Name of the zone for this request. Name should conform to RFC1035.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/regions/{region}/forwardingRules/{resource}/setLabels", + // "path": "projects/{project}/zones/{zone}/futureReservations", // "request": { - // "$ref": "RegionSetLabelsRequest" + // "$ref": "FutureReservation" // }, // "response": { // "$ref": "Operation" @@ -85905,114 +88286,183 @@ func (c *ForwardingRulesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operat } -// method id "compute.forwardingRules.setTarget": +// method id "compute.futureReservations.list": -type ForwardingRulesSetTargetCall struct { - s *Service - project string - region string - forwardingRule string - targetreference *TargetReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FutureReservationsListCall struct { + s *Service + project string + zone string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// SetTarget: Changes target URL for forwarding rule. The new target -// should be of the same type as the old target. +// List: A list of all the future reservations that have been configured +// for the specified project in specified zone. // -// - forwardingRule: Name of the ForwardingRule resource in which target -// is to be set. // - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *ForwardingRulesService) SetTarget(project string, region string, forwardingRule string, targetreference *TargetReference) *ForwardingRulesSetTargetCall { - c := &ForwardingRulesSetTargetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - zone: Name of the zone for this request. Name should conform to +// RFC1035. +func (r *FutureReservationsService) List(project string, zone string) *FutureReservationsListCall { + c := &FutureReservationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region - c.forwardingRule = forwardingRule - c.targetreference = targetreference + c.zone = zone return c } -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. For example, consider a -// situation where you make an initial request and the request times -// out. If you make the request again with the same request ID, the -// server can check if original operation with the same request ID was -// received, and if so, will ignore the second request. This prevents -// clients from accidentally creating duplicate commitments. The request -// ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *ForwardingRulesSetTargetCall) RequestId(requestId string) *ForwardingRulesSetTargetCall { - c.urlParams_.Set("requestId", requestId) +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources +// support two types of filter expressions: expressions that support +// regular expressions and expressions that follow API improvement +// proposal AIP-160. If you want to use AIP-160, your expression must +// specify the field name, an operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` +// or `:`. For example, if you are filtering Compute Engine instances, +// you can exclude instances named `example-instance` by specifying +// `name != example-instance`. The `:` operator can be used with string +// fields to match substrings. For non-string fields it is equivalent to +// the `=` operator. The `:*` comparison can be used to test whether a +// key has been defined. For example, to find all objects with `owner` +// label use: ``` labels.owner:* ``` You can also filter nested fields. +// For example, you could specify `scheduling.automaticRestart = false` +// to include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` If you want to use a +// regular expression, use the `eq` (equal) or `ne` (not equal) operator +// against a single un-parenthesized expression with or without quotes +// or against multiple parenthesized expressions. Examples: `fieldname +// eq unquoted literal` `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" `(fieldname1 eq literal) +// (fieldname2 ne "literal")` The literal value is interpreted as a +// regular expression using Google RE2 library syntax. The literal value +// must match the entire field. For example, to filter for instances +// that do not end with name "instance", you would use `name ne +// .*instance`. +func (c *FutureReservationsListCall) Filter(filter string) *FutureReservationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *FutureReservationsListCall) MaxResults(maxResults int64) *FutureReservationsListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *FutureReservationsListCall) OrderBy(orderBy string) *FutureReservationsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *FutureReservationsListCall) PageToken(pageToken string) *FutureReservationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *FutureReservationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *FutureReservationsListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) 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 *ForwardingRulesSetTargetCall) Fields(s ...googleapi.Field) *ForwardingRulesSetTargetCall { +func (c *FutureReservationsListCall) Fields(s ...googleapi.Field) *FutureReservationsListCall { 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 *FutureReservationsListCall) IfNoneMatch(entityTag string) *FutureReservationsListCall { + 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 *ForwardingRulesSetTargetCall) Context(ctx context.Context) *ForwardingRulesSetTargetCall { +func (c *FutureReservationsListCall) Context(ctx context.Context) *FutureReservationsListCall { 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 *ForwardingRulesSetTargetCall) Header() http.Header { +func (c *FutureReservationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ForwardingRulesSetTargetCall) doRequest(alt string) (*http.Response, error) { +func (c *FutureReservationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetreference) - 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) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}/setTarget") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/futureReservations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "forwardingRule": c.forwardingRule, + "project": c.project, + "zone": c.zone, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.forwardingRules.setTarget" 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 *ForwardingRulesSetTargetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.futureReservations.list" call. +// Exactly one of *FutureReservationsListResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *FutureReservationsListResponse.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 *FutureReservationsListCall) Do(opts ...googleapi.CallOption) (*FutureReservationsListResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -86031,7 +88481,7 @@ func (c *ForwardingRulesSetTargetCall) Do(opts ...googleapi.CallOption) (*Operat if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &FutureReservationsListResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -86043,21 +88493,36 @@ func (c *ForwardingRulesSetTargetCall) Do(opts ...googleapi.CallOption) (*Operat } return ret, nil // { - // "description": "Changes target URL for forwarding rule. The new target should be of the same type as the old target.", - // "flatPath": "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}/setTarget", - // "httpMethod": "POST", - // "id": "compute.forwardingRules.setTarget", + // "description": "A list of all the future reservations that have been configured for the specified project in specified zone.", + // "flatPath": "projects/{project}/zones/{zone}/futureReservations", + // "httpMethod": "GET", + // "id": "compute.futureReservations.list", // "parameterOrder": [ // "project", - // "region", - // "forwardingRule" + // "zone" // ], // "parameters": { - // "forwardingRule": { - // "description": "Name of the ForwardingRule resource in which target is to be set.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - // "required": true, + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", // "type": "string" // }, // "project": { @@ -86067,66 +88532,108 @@ func (c *ForwardingRulesSetTargetCall) Do(opts ...googleapi.CallOption) (*Operat // "required": true, // "type": "string" // }, - // "region": { - // "description": "Name of the region scoping this request.", + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "location": "query", + // "type": "boolean" + // }, + // "zone": { + // "description": "Name of the zone for this request. Name should conform to RFC1035.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" - // }, - // "requestId": { - // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" // } // }, - // "path": "projects/{project}/regions/{region}/forwardingRules/{forwardingRule}/setTarget", - // "request": { - // "$ref": "TargetReference" - // }, + // "path": "projects/{project}/zones/{zone}/futureReservations", // "response": { - // "$ref": "Operation" + // "$ref": "FutureReservationsListResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute" + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" // ] // } } -// method id "compute.forwardingRules.testIamPermissions": +// 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 *FutureReservationsListCall) Pages(ctx context.Context, f func(*FutureReservationsListResponse) 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 ForwardingRulesTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "compute.futureReservations.update": + +type FutureReservationsUpdateCall struct { + s *Service + project string + zone string + futureReservation string + futurereservation *FutureReservation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// Update: Updates the specified future reservation. // -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *ForwardingRulesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *ForwardingRulesTestIamPermissionsCall { - c := &ForwardingRulesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - futureReservation: Name of the reservation to update. Name should +// conform to RFC1035. +// - project: Project ID for this request. +// - zone: Name of the zone for this request. Name should conform to +// RFC1035. +func (r *FutureReservationsService) Update(project string, zone string, futureReservation string, futurereservation *FutureReservation) *FutureReservationsUpdateCall { + c := &FutureReservationsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest + c.zone = zone + c.futureReservation = futureReservation + c.futurereservation = futurereservation + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *FutureReservationsUpdateCall) RequestId(requestId string) *FutureReservationsUpdateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": update_mask +// indicates fields to be updated as part of this request. +func (c *FutureReservationsUpdateCall) UpdateMask(updateMask string) *FutureReservationsUpdateCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ForwardingRulesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ForwardingRulesTestIamPermissionsCall { +func (c *FutureReservationsUpdateCall) Fields(s ...googleapi.Field) *FutureReservationsUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -86134,21 +88641,21 @@ func (c *ForwardingRulesTestIamPermissionsCall) Fields(s ...googleapi.Field) *Fo // 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 *ForwardingRulesTestIamPermissionsCall) Context(ctx context.Context) *ForwardingRulesTestIamPermissionsCall { +func (c *FutureReservationsUpdateCall) Context(ctx context.Context) *FutureReservationsUpdateCall { 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 *ForwardingRulesTestIamPermissionsCall) Header() http.Header { +func (c *FutureReservationsUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ForwardingRulesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *FutureReservationsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -86156,36 +88663,36 @@ func (c *ForwardingRulesTestIamPermissionsCall) doRequest(alt string) (*http.Res } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.futurereservation) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/forwardingRules/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/futureReservations/{futureReservation}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, + "project": c.project, + "zone": c.zone, + "futureReservation": c.futureReservation, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.forwardingRules.testIamPermissions" call. -// Exactly one of *TestPermissionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *ForwardingRulesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { +// Do executes the "compute.futureReservations.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 *FutureReservationsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -86204,7 +88711,7 @@ func (c *ForwardingRulesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestPermissionsResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -86216,16 +88723,22 @@ func (c *ForwardingRulesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", - // "flatPath": "projects/{project}/regions/{region}/forwardingRules/{resource}/testIamPermissions", - // "httpMethod": "POST", - // "id": "compute.forwardingRules.testIamPermissions", + // "description": "Updates the specified future reservation.", + // "flatPath": "projects/{project}/zones/{zone}/futureReservations/{futureReservation}", + // "httpMethod": "PATCH", + // "id": "compute.futureReservations.update", // "parameterOrder": [ // "project", - // "region", - // "resource" + // "zone", + // "futureReservation" // ], // "parameters": { + // "futureReservation": { + // "description": "Name of the reservation to update. Name should conform to RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -86233,32 +88746,34 @@ func (c *ForwardingRulesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) // "required": true, // "type": "string" // }, - // "region": { - // "description": "The name of the region for this request.", - // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - // "required": true, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", // "type": "string" // }, - // "resource": { - // "description": "Name or id of the resource for this request.", + // "updateMask": { + // "description": "update_mask indicates fields to be updated as part of this request.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone for this request. Name should conform to RFC1035.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/regions/{region}/forwardingRules/{resource}/testIamPermissions", + // "path": "projects/{project}/zones/{zone}/futureReservations/{futureReservation}", // "request": { - // "$ref": "TestPermissionsRequest" + // "$ref": "FutureReservation" // }, // "response": { - // "$ref": "TestPermissionsResponse" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } diff --git a/containeranalysis/v1alpha1/containeranalysis-api.json b/containeranalysis/v1alpha1/containeranalysis-api.json index 1d1a9f0e7e3..a679e7ce515 100644 --- a/containeranalysis/v1alpha1/containeranalysis-api.json +++ b/containeranalysis/v1alpha1/containeranalysis-api.json @@ -1233,7 +1233,7 @@ } } }, - "revision": "20230721", + "revision": "20230804", "rootUrl": "https://containeranalysis.googleapis.com/", "schemas": { "AnalysisCompleted": { @@ -5059,7 +5059,7 @@ "description": "Properties of the object. Contains field @type with type URL.", "type": "any" }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", "type": "object" } }, @@ -5336,7 +5336,7 @@ "type": "object" }, "Policy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", "properties": { "bindings": { diff --git a/containeranalysis/v1alpha1/containeranalysis-gen.go b/containeranalysis/v1alpha1/containeranalysis-gen.go index eede35833fd..d72ac7c2197 100644 --- a/containeranalysis/v1alpha1/containeranalysis-gen.go +++ b/containeranalysis/v1alpha1/containeranalysis-gen.go @@ -5883,8 +5883,8 @@ type Operation struct { // `operations/{unique_id}`. Name string `json:"name,omitempty"` - // Response: The normal response of the operation in case of success. If - // the original method returns no data on success, such as `Delete`, the + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the // response is `google.protobuf.Empty`. If the original method is // standard `Get`/`Create`/`Update`, the response should be the // resource. For other methods, the response should have the type @@ -6296,7 +6296,7 @@ func (s *PgpSignedAttestation) MarshalJSON() ([]byte, error) { // both. To learn which resources support conditions in their IAM // policies, see the IAM documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -// **JSON example:** { "bindings": [ { "role": +// **JSON example:** ``` { "bindings": [ { "role": // "roles/resourcemanager.organizationAdmin", "members": [ // "user:mike@example.com", "group:admins@example.com", // "domain:google.com", @@ -6305,17 +6305,17 @@ func (s *PgpSignedAttestation) MarshalJSON() ([]byte, error) { // "user:eve@example.com" ], "condition": { "title": "expirable access", // "description": "Does not grant access after Sep 2020", "expression": // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], -// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - -// members: - user:mike@example.com - group:admins@example.com - -// domain:google.com - +// "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` +// bindings: - members: - user:mike@example.com - +// group:admins@example.com - domain:google.com - // serviceAccount:my-project-id@appspot.gserviceaccount.com role: // roles/resourcemanager.organizationAdmin - members: - // user:eve@example.com role: roles/resourcemanager.organizationViewer // condition: title: expirable access description: Does not grant access // after Sep 2020 expression: request.time < // timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 -// For a description of IAM and its features, see the IAM documentation -// (https://cloud.google.com/iam/docs/). +// ``` For a description of IAM and its features, see the IAM +// documentation (https://cloud.google.com/iam/docs/). type Policy struct { // Bindings: Associates a list of `members`, or principals, with a // `role`. Optionally, may specify a `condition` that determines how and diff --git a/containeranalysis/v1beta1/containeranalysis-api.json b/containeranalysis/v1beta1/containeranalysis-api.json index 27b26aad036..882ccbcfb1c 100644 --- a/containeranalysis/v1beta1/containeranalysis-api.json +++ b/containeranalysis/v1beta1/containeranalysis-api.json @@ -815,7 +815,7 @@ } } }, - "revision": "20230721", + "revision": "20230804", "rootUrl": "https://containeranalysis.googleapis.com/", "schemas": { "AliasContext": { @@ -4943,7 +4943,7 @@ "type": "object" }, "Policy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", "properties": { "bindings": { diff --git a/containeranalysis/v1beta1/containeranalysis-gen.go b/containeranalysis/v1beta1/containeranalysis-gen.go index e0b3315fad3..e6a950ce3d4 100644 --- a/containeranalysis/v1beta1/containeranalysis-gen.go +++ b/containeranalysis/v1beta1/containeranalysis-gen.go @@ -6147,7 +6147,7 @@ func (s *PgpSignedAttestation) MarshalJSON() ([]byte, error) { // both. To learn which resources support conditions in their IAM // policies, see the IAM documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -// **JSON example:** { "bindings": [ { "role": +// **JSON example:** ``` { "bindings": [ { "role": // "roles/resourcemanager.organizationAdmin", "members": [ // "user:mike@example.com", "group:admins@example.com", // "domain:google.com", @@ -6156,17 +6156,17 @@ func (s *PgpSignedAttestation) MarshalJSON() ([]byte, error) { // "user:eve@example.com" ], "condition": { "title": "expirable access", // "description": "Does not grant access after Sep 2020", "expression": // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], -// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - -// members: - user:mike@example.com - group:admins@example.com - -// domain:google.com - +// "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` +// bindings: - members: - user:mike@example.com - +// group:admins@example.com - domain:google.com - // serviceAccount:my-project-id@appspot.gserviceaccount.com role: // roles/resourcemanager.organizationAdmin - members: - // user:eve@example.com role: roles/resourcemanager.organizationViewer // condition: title: expirable access description: Does not grant access // after Sep 2020 expression: request.time < // timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 -// For a description of IAM and its features, see the IAM documentation -// (https://cloud.google.com/iam/docs/). +// ``` For a description of IAM and its features, see the IAM +// documentation (https://cloud.google.com/iam/docs/). type Policy struct { // Bindings: Associates a list of `members`, or principals, with a // `role`. Optionally, may specify a `condition` that determines how and diff --git a/dataform/v1beta1/dataform-api.json b/dataform/v1beta1/dataform-api.json index e5e56312b26..19f087b8de1 100644 --- a/dataform/v1beta1/dataform-api.json +++ b/dataform/v1beta1/dataform-api.json @@ -1961,7 +1961,7 @@ } } }, - "revision": "20230722", + "revision": "20230805", "rootUrl": "https://dataform.googleapis.com/", "schemas": { "Assertion": { @@ -2976,7 +2976,7 @@ "type": "object" }, "Policy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", "properties": { "bindings": { diff --git a/dataform/v1beta1/dataform-gen.go b/dataform/v1beta1/dataform-gen.go index 9ca4c3d049c..d77e821ed69 100644 --- a/dataform/v1beta1/dataform-gen.go +++ b/dataform/v1beta1/dataform-gen.go @@ -1976,7 +1976,7 @@ func (s *Operations) MarshalJSON() ([]byte, error) { // both. To learn which resources support conditions in their IAM // policies, see the IAM documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -// **JSON example:** { "bindings": [ { "role": +// **JSON example:** ``` { "bindings": [ { "role": // "roles/resourcemanager.organizationAdmin", "members": [ // "user:mike@example.com", "group:admins@example.com", // "domain:google.com", @@ -1985,17 +1985,17 @@ func (s *Operations) MarshalJSON() ([]byte, error) { // "user:eve@example.com" ], "condition": { "title": "expirable access", // "description": "Does not grant access after Sep 2020", "expression": // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], -// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - -// members: - user:mike@example.com - group:admins@example.com - -// domain:google.com - +// "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` +// bindings: - members: - user:mike@example.com - +// group:admins@example.com - domain:google.com - // serviceAccount:my-project-id@appspot.gserviceaccount.com role: // roles/resourcemanager.organizationAdmin - members: - // user:eve@example.com role: roles/resourcemanager.organizationViewer // condition: title: expirable access description: Does not grant access // after Sep 2020 expression: request.time < // timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 -// For a description of IAM and its features, see the IAM documentation -// (https://cloud.google.com/iam/docs/). +// ``` For a description of IAM and its features, see the IAM +// documentation (https://cloud.google.com/iam/docs/). type Policy struct { // Bindings: Associates a list of `members`, or principals, with a // `role`. Optionally, may specify a `condition` that determines how and diff --git a/datastream/v1/datastream-api.json b/datastream/v1/datastream-api.json index 04a3466c5cf..ba90c6e50a9 100644 --- a/datastream/v1/datastream-api.json +++ b/datastream/v1/datastream-api.json @@ -1076,7 +1076,7 @@ ] }, "run": { - "description": "Use this method to start, resume or recover a stream with a non default CDC strategy.", + "description": "Use this method to start, resume or recover a stream with a non default CDC strategy. NOTE: This feature is currently experimental.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/streams/{streamsId}:run", "httpMethod": "POST", "id": "datastream.projects.locations.streams.run", @@ -1261,7 +1261,7 @@ } } }, - "revision": "20230719", + "revision": "20230802", "rootUrl": "https://datastream.googleapis.com/", "schemas": { "AvroFileFormat": { @@ -2195,7 +2195,7 @@ "description": "Properties of the object. Contains field @type with type URL.", "type": "any" }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", "type": "object" } }, diff --git a/datastream/v1/datastream-gen.go b/datastream/v1/datastream-gen.go index e47bc3a83c0..da5a744465c 100644 --- a/datastream/v1/datastream-gen.go +++ b/datastream/v1/datastream-gen.go @@ -1655,8 +1655,8 @@ type Operation struct { // `operations/{unique_id}`. Name string `json:"name,omitempty"` - // Response: The normal response of the operation in case of success. If - // the original method returns no data on success, such as `Delete`, the + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the // response is `google.protobuf.Empty`. If the original method is // standard `Get`/`Create`/`Update`, the response should be the // resource. For other methods, the response should have the type @@ -7695,7 +7695,7 @@ type ProjectsLocationsStreamsRunCall struct { } // Run: Use this method to start, resume or recover a stream with a non -// default CDC strategy. +// default CDC strategy. NOTE: This feature is currently experimental. // // - name: Name of the stream resource to start, in the format: // projects/{project_id}/locations/{location}/streams/{stream_name}. @@ -7797,7 +7797,7 @@ func (c *ProjectsLocationsStreamsRunCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Use this method to start, resume or recover a stream with a non default CDC strategy.", + // "description": "Use this method to start, resume or recover a stream with a non default CDC strategy. NOTE: This feature is currently experimental.", // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/streams/{streamsId}:run", // "httpMethod": "POST", // "id": "datastream.projects.locations.streams.run", diff --git a/datastream/v1alpha1/datastream-api.json b/datastream/v1alpha1/datastream-api.json index edef3315d76..6a3e4cb8796 100644 --- a/datastream/v1alpha1/datastream-api.json +++ b/datastream/v1alpha1/datastream-api.json @@ -1224,7 +1224,7 @@ } } }, - "revision": "20230620", + "revision": "20230802", "rootUrl": "https://datastream.googleapis.com/", "schemas": { "AvroFileFormat": { @@ -2048,7 +2048,7 @@ "description": "Properties of the object. Contains field @type with type URL.", "type": "any" }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", "type": "object" } }, diff --git a/datastream/v1alpha1/datastream-gen.go b/datastream/v1alpha1/datastream-gen.go index b0736ecab5d..a93aaf0b77f 100644 --- a/datastream/v1alpha1/datastream-gen.go +++ b/datastream/v1alpha1/datastream-gen.go @@ -1454,8 +1454,8 @@ type Operation struct { // `operations/{unique_id}`. Name string `json:"name,omitempty"` - // Response: The normal response of the operation in case of success. If - // the original method returns no data on success, such as `Delete`, the + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the // response is `google.protobuf.Empty`. If the original method is // standard `Get`/`Create`/`Update`, the response should be the // resource. For other methods, the response should have the type diff --git a/gkehub/v1/gkehub-api.json b/gkehub/v1/gkehub-api.json index ce55387b471..a62ec5678cc 100644 --- a/gkehub/v1/gkehub-api.json +++ b/gkehub/v1/gkehub-api.json @@ -1834,7 +1834,7 @@ } } }, - "revision": "20230728", + "revision": "20230804", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "AppDevExperienceFeatureSpec": { @@ -2781,12 +2781,12 @@ "UNREACHABLE" ], "enumDescriptions": [ - "ACM cannot determine a sync code", - "ACM successfully synced the git Repo with the cluster", - "ACM is in the progress of syncing a new change", - "Indicates an error configuring ACM, and user action is required", - "ACM has been installed (operator manifest deployed), but not configured.", - "ACM has not been installed (no operator pod found)", + "Config Sync cannot determine a sync code", + "Config Sync successfully synced the git Repo with the cluster", + "Config Sync is in the progress of syncing a new change", + "Indicates an error configuring Config Sync, and user action is required", + "Config Sync has been installed but not configured", + "Config Sync has not been installed", "Error authorizing with the cluster", "Cluster could not be reached" ], @@ -3352,6 +3352,10 @@ "tenant": { "description": "Kind of Azure AD account to be authenticated. Supported values are or for accounts belonging to a specific tenant.", "type": "string" + }, + "userClaim": { + "description": "Optional. Claim in the AzureAD ID Token that holds the user details.", + "type": "string" } }, "type": "object" @@ -4239,7 +4243,7 @@ "description": "Properties of the object. Contains field @type with type URL.", "type": "any" }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", "type": "object" } }, @@ -4311,7 +4315,7 @@ "type": "object" }, "Policy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", "properties": { "auditConfigs": { diff --git a/gkehub/v1/gkehub-gen.go b/gkehub/v1/gkehub-gen.go index 273432c945a..4b3c42bae38 100644 --- a/gkehub/v1/gkehub-gen.go +++ b/gkehub/v1/gkehub-gen.go @@ -1777,15 +1777,15 @@ type ConfigManagementSyncState struct { // Code: Sync status code // // Possible values: - // "SYNC_CODE_UNSPECIFIED" - ACM cannot determine a sync code - // "SYNCED" - ACM successfully synced the git Repo with the cluster - // "PENDING" - ACM is in the progress of syncing a new change - // "ERROR" - Indicates an error configuring ACM, and user action is - // required - // "NOT_CONFIGURED" - ACM has been installed (operator manifest - // deployed), but not configured. - // "NOT_INSTALLED" - ACM has not been installed (no operator pod - // found) + // "SYNC_CODE_UNSPECIFIED" - Config Sync cannot determine a sync code + // "SYNCED" - Config Sync successfully synced the git Repo with the + // cluster + // "PENDING" - Config Sync is in the progress of syncing a new change + // "ERROR" - Indicates an error configuring Config Sync, and user + // action is required + // "NOT_CONFIGURED" - Config Sync has been installed but not + // configured + // "NOT_INSTALLED" - Config Sync has not been installed // "UNAUTHORIZED" - Error authorizing with the cluster // "UNREACHABLE" - Cluster could not be reached Code string `json:"code,omitempty"` @@ -2724,6 +2724,10 @@ type IdentityServiceAzureADConfig struct { // values are or for accounts belonging to a specific tenant. Tenant string `json:"tenant,omitempty"` + // UserClaim: Optional. Claim in the AzureAD ID Token that holds the + // user details. + UserClaim string `json:"userClaim,omitempty"` + // ForceSendFields is a list of field names (e.g. "ClientId") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -4124,8 +4128,8 @@ type Operation struct { // `operations/{unique_id}`. Name string `json:"name,omitempty"` - // Response: The normal response of the operation in case of success. If - // the original method returns no data on success, such as `Delete`, the + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the // response is `google.protobuf.Empty`. If the original method is // standard `Get`/`Create`/`Update`, the response should be the // resource. For other methods, the response should have the type @@ -4263,7 +4267,7 @@ func (s *Origin) MarshalJSON() ([]byte, error) { // both. To learn which resources support conditions in their IAM // policies, see the IAM documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -// **JSON example:** { "bindings": [ { "role": +// **JSON example:** ``` { "bindings": [ { "role": // "roles/resourcemanager.organizationAdmin", "members": [ // "user:mike@example.com", "group:admins@example.com", // "domain:google.com", @@ -4272,17 +4276,17 @@ func (s *Origin) MarshalJSON() ([]byte, error) { // "user:eve@example.com" ], "condition": { "title": "expirable access", // "description": "Does not grant access after Sep 2020", "expression": // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], -// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - -// members: - user:mike@example.com - group:admins@example.com - -// domain:google.com - +// "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` +// bindings: - members: - user:mike@example.com - +// group:admins@example.com - domain:google.com - // serviceAccount:my-project-id@appspot.gserviceaccount.com role: // roles/resourcemanager.organizationAdmin - members: - // user:eve@example.com role: roles/resourcemanager.organizationViewer // condition: title: expirable access description: Does not grant access // after Sep 2020 expression: request.time < // timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 -// For a description of IAM and its features, see the IAM documentation -// (https://cloud.google.com/iam/docs/). +// ``` For a description of IAM and its features, see the IAM +// documentation (https://cloud.google.com/iam/docs/). type Policy struct { // AuditConfigs: Specifies cloud audit logging configuration for this // policy. diff --git a/gkehub/v1alpha/gkehub-api.json b/gkehub/v1alpha/gkehub-api.json index 7dcdc3e3bc7..4eb9f10cb51 100644 --- a/gkehub/v1alpha/gkehub-api.json +++ b/gkehub/v1alpha/gkehub-api.json @@ -2414,7 +2414,7 @@ } } }, - "revision": "20230728", + "revision": "20230804", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "AnthosObservabilityFeatureSpec": { @@ -2666,13 +2666,6 @@ }, "type": "array" }, - "state": { - "description": "Scope-level upgrade state.", - "items": { - "$ref": "ClusterUpgradeScopeGKEUpgradeState" - }, - "type": "array" - }, "upgradeState": { "description": "Upgrade state. It will eventually replace `state`.", "items": { @@ -2789,29 +2782,6 @@ }, "type": "object" }, - "ClusterUpgradeScopeGKEUpgradeState": { - "description": "ScopeGKEUpgradeState is a GKEUpgrade and its state at the scope level.", - "id": "ClusterUpgradeScopeGKEUpgradeState", - "properties": { - "stats": { - "additionalProperties": { - "format": "int64", - "type": "string" - }, - "description": "Number of GKE clusters in each status code.", - "type": "object" - }, - "status": { - "$ref": "ClusterUpgradeUpgradeStatus", - "description": "Status of the upgrade." - }, - "upgrade": { - "$ref": "ClusterUpgradeGKEUpgrade", - "description": "Which upgrade to track the state." - } - }, - "type": "object" - }, "ClusterUpgradeScopeSpec": { "description": "**ClusterUpgrade**: The configuration for the scope-level ClusterUpgrade feature.", "id": "ClusterUpgradeScopeSpec", @@ -3792,12 +3762,12 @@ "UNREACHABLE" ], "enumDescriptions": [ - "ACM cannot determine a sync code", - "ACM successfully synced the git Repo with the cluster", - "ACM is in the progress of syncing a new change", - "Indicates an error configuring ACM, and user action is required", - "ACM has been installed (operator manifest deployed), but not configured.", - "ACM has not been installed (no operator pod found)", + "Config Sync cannot determine a sync code", + "Config Sync successfully synced the git Repo with the cluster", + "Config Sync is in the progress of syncing a new change", + "Indicates an error configuring Config Sync, and user action is required", + "Config Sync has been installed but not configured", + "Config Sync has not been installed", "Error authorizing with the cluster", "Cluster could not be reached" ], @@ -4403,6 +4373,10 @@ "tenant": { "description": "Kind of Azure AD account to be authenticated. Supported values are or for accounts belonging to a specific tenant.", "type": "string" + }, + "userClaim": { + "description": "Optional. Claim in the AzureAD ID Token that holds the user details.", + "type": "string" } }, "type": "object" @@ -5450,7 +5424,7 @@ "description": "Properties of the object. Contains field @type with type URL.", "type": "any" }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", "type": "object" } }, @@ -5522,7 +5496,7 @@ "type": "object" }, "Policy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", "properties": { "auditConfigs": { diff --git a/gkehub/v1alpha/gkehub-gen.go b/gkehub/v1alpha/gkehub-gen.go index 2841e3b1947..4ade87fff77 100644 --- a/gkehub/v1alpha/gkehub-gen.go +++ b/gkehub/v1alpha/gkehub-gen.go @@ -857,9 +857,6 @@ type ClusterUpgradeGKEUpgradeFeatureState struct { // Conditions: Current conditions of the feature. Conditions []*ClusterUpgradeGKEUpgradeFeatureCondition `json:"conditions,omitempty"` - // State: Scope-level upgrade state. - State []*ClusterUpgradeScopeGKEUpgradeState `json:"state,omitempty"` - // UpgradeState: Upgrade state. It will eventually replace `state`. UpgradeState []*ClusterUpgradeGKEUpgradeState `json:"upgradeState,omitempty"` @@ -1088,41 +1085,6 @@ func (s *ClusterUpgradePostConditions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ClusterUpgradeScopeGKEUpgradeState: ScopeGKEUpgradeState is a -// GKEUpgrade and its state at the scope level. -type ClusterUpgradeScopeGKEUpgradeState struct { - // Stats: Number of GKE clusters in each status code. - Stats map[string]string `json:"stats,omitempty"` - - // Status: Status of the upgrade. - Status *ClusterUpgradeUpgradeStatus `json:"status,omitempty"` - - // Upgrade: Which upgrade to track the state. - Upgrade *ClusterUpgradeGKEUpgrade `json:"upgrade,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Stats") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Stats") 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 *ClusterUpgradeScopeGKEUpgradeState) MarshalJSON() ([]byte, error) { - type NoMethod ClusterUpgradeScopeGKEUpgradeState - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // ClusterUpgradeScopeSpec: **ClusterUpgrade**: The configuration for // the scope-level ClusterUpgrade feature. type ClusterUpgradeScopeSpec struct { @@ -2584,15 +2546,15 @@ type ConfigManagementSyncState struct { // Code: Sync status code // // Possible values: - // "SYNC_CODE_UNSPECIFIED" - ACM cannot determine a sync code - // "SYNCED" - ACM successfully synced the git Repo with the cluster - // "PENDING" - ACM is in the progress of syncing a new change - // "ERROR" - Indicates an error configuring ACM, and user action is - // required - // "NOT_CONFIGURED" - ACM has been installed (operator manifest - // deployed), but not configured. - // "NOT_INSTALLED" - ACM has not been installed (no operator pod - // found) + // "SYNC_CODE_UNSPECIFIED" - Config Sync cannot determine a sync code + // "SYNCED" - Config Sync successfully synced the git Repo with the + // cluster + // "PENDING" - Config Sync is in the progress of syncing a new change + // "ERROR" - Indicates an error configuring Config Sync, and user + // action is required + // "NOT_CONFIGURED" - Config Sync has been installed but not + // configured + // "NOT_INSTALLED" - Config Sync has not been installed // "UNAUTHORIZED" - Error authorizing with the cluster // "UNREACHABLE" - Cluster could not be reached Code string `json:"code,omitempty"` @@ -3610,6 +3572,10 @@ type IdentityServiceAzureADConfig struct { // values are or for accounts belonging to a specific tenant. Tenant string `json:"tenant,omitempty"` + // UserClaim: Optional. Claim in the AzureAD ID Token that holds the + // user details. + UserClaim string `json:"userClaim,omitempty"` + // ForceSendFields is a list of field names (e.g. "ClientId") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -5281,8 +5247,8 @@ type Operation struct { // `operations/{unique_id}`. Name string `json:"name,omitempty"` - // Response: The normal response of the operation in case of success. If - // the original method returns no data on success, such as `Delete`, the + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the // response is `google.protobuf.Empty`. If the original method is // standard `Get`/`Create`/`Update`, the response should be the // resource. For other methods, the response should have the type @@ -5420,7 +5386,7 @@ func (s *Origin) MarshalJSON() ([]byte, error) { // both. To learn which resources support conditions in their IAM // policies, see the IAM documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -// **JSON example:** { "bindings": [ { "role": +// **JSON example:** ``` { "bindings": [ { "role": // "roles/resourcemanager.organizationAdmin", "members": [ // "user:mike@example.com", "group:admins@example.com", // "domain:google.com", @@ -5429,17 +5395,17 @@ func (s *Origin) MarshalJSON() ([]byte, error) { // "user:eve@example.com" ], "condition": { "title": "expirable access", // "description": "Does not grant access after Sep 2020", "expression": // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], -// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - -// members: - user:mike@example.com - group:admins@example.com - -// domain:google.com - +// "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` +// bindings: - members: - user:mike@example.com - +// group:admins@example.com - domain:google.com - // serviceAccount:my-project-id@appspot.gserviceaccount.com role: // roles/resourcemanager.organizationAdmin - members: - // user:eve@example.com role: roles/resourcemanager.organizationViewer // condition: title: expirable access description: Does not grant access // after Sep 2020 expression: request.time < // timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 -// For a description of IAM and its features, see the IAM documentation -// (https://cloud.google.com/iam/docs/). +// ``` For a description of IAM and its features, see the IAM +// documentation (https://cloud.google.com/iam/docs/). type Policy struct { // AuditConfigs: Specifies cloud audit logging configuration for this // policy. diff --git a/gkehub/v1alpha2/gkehub-api.json b/gkehub/v1alpha2/gkehub-api.json index ae8c4cdfa2c..392c5cf038b 100644 --- a/gkehub/v1alpha2/gkehub-api.json +++ b/gkehub/v1alpha2/gkehub-api.json @@ -657,7 +657,7 @@ } } }, - "revision": "20230430", + "revision": "20230804", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "ApplianceCluster": { @@ -1335,7 +1335,7 @@ "description": "Properties of the object. Contains field @type with type URL.", "type": "any" }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", "type": "object" } }, @@ -1386,7 +1386,7 @@ "type": "object" }, "Policy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", "properties": { "auditConfigs": { diff --git a/gkehub/v1alpha2/gkehub-gen.go b/gkehub/v1alpha2/gkehub-gen.go index a3a76366274..c144fa794c7 100644 --- a/gkehub/v1alpha2/gkehub-gen.go +++ b/gkehub/v1alpha2/gkehub-gen.go @@ -1430,8 +1430,8 @@ type Operation struct { // `operations/{unique_id}`. Name string `json:"name,omitempty"` - // Response: The normal response of the operation in case of success. If - // the original method returns no data on success, such as `Delete`, the + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the // response is `google.protobuf.Empty`. If the original method is // standard `Get`/`Create`/`Update`, the response should be the // resource. For other methods, the response should have the type @@ -1533,7 +1533,7 @@ func (s *OperationMetadata) MarshalJSON() ([]byte, error) { // both. To learn which resources support conditions in their IAM // policies, see the IAM documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -// **JSON example:** { "bindings": [ { "role": +// **JSON example:** ``` { "bindings": [ { "role": // "roles/resourcemanager.organizationAdmin", "members": [ // "user:mike@example.com", "group:admins@example.com", // "domain:google.com", @@ -1542,17 +1542,17 @@ func (s *OperationMetadata) MarshalJSON() ([]byte, error) { // "user:eve@example.com" ], "condition": { "title": "expirable access", // "description": "Does not grant access after Sep 2020", "expression": // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], -// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - -// members: - user:mike@example.com - group:admins@example.com - -// domain:google.com - +// "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` +// bindings: - members: - user:mike@example.com - +// group:admins@example.com - domain:google.com - // serviceAccount:my-project-id@appspot.gserviceaccount.com role: // roles/resourcemanager.organizationAdmin - members: - // user:eve@example.com role: roles/resourcemanager.organizationViewer // condition: title: expirable access description: Does not grant access // after Sep 2020 expression: request.time < // timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 -// For a description of IAM and its features, see the IAM documentation -// (https://cloud.google.com/iam/docs/). +// ``` For a description of IAM and its features, see the IAM +// documentation (https://cloud.google.com/iam/docs/). type Policy struct { // AuditConfigs: Specifies cloud audit logging configuration for this // policy. diff --git a/gkehub/v1beta/gkehub-api.json b/gkehub/v1beta/gkehub-api.json index 0fb2268515b..f7372ffea66 100644 --- a/gkehub/v1beta/gkehub-api.json +++ b/gkehub/v1beta/gkehub-api.json @@ -2100,7 +2100,7 @@ } } }, - "revision": "20230728", + "revision": "20230804", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "AnthosObservabilityFeatureSpec": { @@ -3106,12 +3106,12 @@ "UNREACHABLE" ], "enumDescriptions": [ - "ACM cannot determine a sync code", - "ACM successfully synced the git Repo with the cluster", - "ACM is in the progress of syncing a new change", - "Indicates an error configuring ACM, and user action is required", - "ACM has been installed (operator manifest deployed), but not configured.", - "ACM has not been installed (no operator pod found)", + "Config Sync cannot determine a sync code", + "Config Sync successfully synced the git Repo with the cluster", + "Config Sync is in the progress of syncing a new change", + "Indicates an error configuring Config Sync, and user action is required", + "Config Sync has been installed but not configured", + "Config Sync has not been installed", "Error authorizing with the cluster", "Cluster could not be reached" ], @@ -3632,6 +3632,10 @@ "tenant": { "description": "Kind of Azure AD account to be authenticated. Supported values are or for accounts belonging to a specific tenant.", "type": "string" + }, + "userClaim": { + "description": "Optional. Claim in the AzureAD ID Token that holds the user details.", + "type": "string" } }, "type": "object" @@ -4329,7 +4333,7 @@ "description": "Properties of the object. Contains field @type with type URL.", "type": "any" }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", "type": "object" } }, @@ -4401,7 +4405,7 @@ "type": "object" }, "Policy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", "properties": { "auditConfigs": { diff --git a/gkehub/v1beta/gkehub-gen.go b/gkehub/v1beta/gkehub-gen.go index da1584efc70..10a964a5403 100644 --- a/gkehub/v1beta/gkehub-gen.go +++ b/gkehub/v1beta/gkehub-gen.go @@ -1923,15 +1923,15 @@ type ConfigManagementSyncState struct { // Code: Sync status code // // Possible values: - // "SYNC_CODE_UNSPECIFIED" - ACM cannot determine a sync code - // "SYNCED" - ACM successfully synced the git Repo with the cluster - // "PENDING" - ACM is in the progress of syncing a new change - // "ERROR" - Indicates an error configuring ACM, and user action is - // required - // "NOT_CONFIGURED" - ACM has been installed (operator manifest - // deployed), but not configured. - // "NOT_INSTALLED" - ACM has not been installed (no operator pod - // found) + // "SYNC_CODE_UNSPECIFIED" - Config Sync cannot determine a sync code + // "SYNCED" - Config Sync successfully synced the git Repo with the + // cluster + // "PENDING" - Config Sync is in the progress of syncing a new change + // "ERROR" - Indicates an error configuring Config Sync, and user + // action is required + // "NOT_CONFIGURED" - Config Sync has been installed but not + // configured + // "NOT_INSTALLED" - Config Sync has not been installed // "UNAUTHORIZED" - Error authorizing with the cluster // "UNREACHABLE" - Cluster could not be reached Code string `json:"code,omitempty"` @@ -2768,6 +2768,10 @@ type IdentityServiceAzureADConfig struct { // values are or for accounts belonging to a specific tenant. Tenant string `json:"tenant,omitempty"` + // UserClaim: Optional. Claim in the AzureAD ID Token that holds the + // user details. + UserClaim string `json:"userClaim,omitempty"` + // ForceSendFields is a list of field names (e.g. "ClientId") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -3892,8 +3896,8 @@ type Operation struct { // `operations/{unique_id}`. Name string `json:"name,omitempty"` - // Response: The normal response of the operation in case of success. If - // the original method returns no data on success, such as `Delete`, the + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the // response is `google.protobuf.Empty`. If the original method is // standard `Get`/`Create`/`Update`, the response should be the // resource. For other methods, the response should have the type @@ -4031,7 +4035,7 @@ func (s *Origin) MarshalJSON() ([]byte, error) { // both. To learn which resources support conditions in their IAM // policies, see the IAM documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -// **JSON example:** { "bindings": [ { "role": +// **JSON example:** ``` { "bindings": [ { "role": // "roles/resourcemanager.organizationAdmin", "members": [ // "user:mike@example.com", "group:admins@example.com", // "domain:google.com", @@ -4040,17 +4044,17 @@ func (s *Origin) MarshalJSON() ([]byte, error) { // "user:eve@example.com" ], "condition": { "title": "expirable access", // "description": "Does not grant access after Sep 2020", "expression": // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], -// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - -// members: - user:mike@example.com - group:admins@example.com - -// domain:google.com - +// "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` +// bindings: - members: - user:mike@example.com - +// group:admins@example.com - domain:google.com - // serviceAccount:my-project-id@appspot.gserviceaccount.com role: // roles/resourcemanager.organizationAdmin - members: - // user:eve@example.com role: roles/resourcemanager.organizationViewer // condition: title: expirable access description: Does not grant access // after Sep 2020 expression: request.time < // timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 -// For a description of IAM and its features, see the IAM documentation -// (https://cloud.google.com/iam/docs/). +// ``` For a description of IAM and its features, see the IAM +// documentation (https://cloud.google.com/iam/docs/). type Policy struct { // AuditConfigs: Specifies cloud audit logging configuration for this // policy. diff --git a/gkehub/v1beta1/gkehub-api.json b/gkehub/v1beta1/gkehub-api.json index f38b617a82a..e696d87a694 100644 --- a/gkehub/v1beta1/gkehub-api.json +++ b/gkehub/v1beta1/gkehub-api.json @@ -712,7 +712,7 @@ } } }, - "revision": "20230620", + "revision": "20230804", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "ApplianceCluster": { @@ -1394,7 +1394,7 @@ "description": "Properties of the object. Contains field @type with type URL.", "type": "any" }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", "type": "object" } }, @@ -1445,7 +1445,7 @@ "type": "object" }, "Policy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", "properties": { "auditConfigs": { diff --git a/gkehub/v1beta1/gkehub-gen.go b/gkehub/v1beta1/gkehub-gen.go index d0baf268ae4..8b64da74fc0 100644 --- a/gkehub/v1beta1/gkehub-gen.go +++ b/gkehub/v1beta1/gkehub-gen.go @@ -1405,8 +1405,8 @@ type Operation struct { // `operations/{unique_id}`. Name string `json:"name,omitempty"` - // Response: The normal response of the operation in case of success. If - // the original method returns no data on success, such as `Delete`, the + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the // response is `google.protobuf.Empty`. If the original method is // standard `Get`/`Create`/`Update`, the response should be the // resource. For other methods, the response should have the type @@ -1508,7 +1508,7 @@ func (s *OperationMetadata) MarshalJSON() ([]byte, error) { // both. To learn which resources support conditions in their IAM // policies, see the IAM documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -// **JSON example:** { "bindings": [ { "role": +// **JSON example:** ``` { "bindings": [ { "role": // "roles/resourcemanager.organizationAdmin", "members": [ // "user:mike@example.com", "group:admins@example.com", // "domain:google.com", @@ -1517,17 +1517,17 @@ func (s *OperationMetadata) MarshalJSON() ([]byte, error) { // "user:eve@example.com" ], "condition": { "title": "expirable access", // "description": "Does not grant access after Sep 2020", "expression": // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], -// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - -// members: - user:mike@example.com - group:admins@example.com - -// domain:google.com - +// "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` +// bindings: - members: - user:mike@example.com - +// group:admins@example.com - domain:google.com - // serviceAccount:my-project-id@appspot.gserviceaccount.com role: // roles/resourcemanager.organizationAdmin - members: - // user:eve@example.com role: roles/resourcemanager.organizationViewer // condition: title: expirable access description: Does not grant access // after Sep 2020 expression: request.time < // timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 -// For a description of IAM and its features, see the IAM documentation -// (https://cloud.google.com/iam/docs/). +// ``` For a description of IAM and its features, see the IAM +// documentation (https://cloud.google.com/iam/docs/). type Policy struct { // AuditConfigs: Specifies cloud audit logging configuration for this // policy. diff --git a/gkehub/v2alpha/gkehub-api.json b/gkehub/v2alpha/gkehub-api.json index e54de9c9b27..c2fd470d914 100644 --- a/gkehub/v2alpha/gkehub-api.json +++ b/gkehub/v2alpha/gkehub-api.json @@ -280,7 +280,7 @@ } } }, - "revision": "20230430", + "revision": "20230804", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "CancelOperationRequest": { @@ -421,7 +421,7 @@ "description": "Properties of the object. Contains field @type with type URL.", "type": "any" }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", "type": "object" } }, diff --git a/gkehub/v2alpha/gkehub-gen.go b/gkehub/v2alpha/gkehub-gen.go index e8ae9b82143..cc276ed7ef6 100644 --- a/gkehub/v2alpha/gkehub-gen.go +++ b/gkehub/v2alpha/gkehub-gen.go @@ -380,8 +380,8 @@ type Operation struct { // `operations/{unique_id}`. Name string `json:"name,omitempty"` - // Response: The normal response of the operation in case of success. If - // the original method returns no data on success, such as `Delete`, the + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the // response is `google.protobuf.Empty`. If the original method is // standard `Get`/`Create`/`Update`, the response should be the // resource. For other methods, the response should have the type diff --git a/memcache/v1/memcache-api.json b/memcache/v1/memcache-api.json index 5782dcf0f32..e9e3c88230b 100644 --- a/memcache/v1/memcache-api.json +++ b/memcache/v1/memcache-api.json @@ -556,7 +556,7 @@ } } }, - "revision": "20230727", + "revision": "20230803", "rootUrl": "https://memcache.googleapis.com/", "schemas": { "ApplyParametersRequest": { @@ -1483,7 +1483,7 @@ "description": "Properties of the object. Contains field @type with type URL.", "type": "any" }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", "type": "object" } }, diff --git a/memcache/v1/memcache-gen.go b/memcache/v1/memcache-gen.go index dba4678f6e2..a63e555351b 100644 --- a/memcache/v1/memcache-gen.go +++ b/memcache/v1/memcache-gen.go @@ -1606,8 +1606,8 @@ type Operation struct { // `operations/{unique_id}`. Name string `json:"name,omitempty"` - // Response: The normal response of the operation in case of success. If - // the original method returns no data on success, such as `Delete`, the + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the // response is `google.protobuf.Empty`. If the original method is // standard `Get`/`Create`/`Update`, the response should be the // resource. For other methods, the response should have the type diff --git a/memcache/v1beta2/memcache-api.json b/memcache/v1beta2/memcache-api.json index f51cd342623..23559a7ff0d 100644 --- a/memcache/v1beta2/memcache-api.json +++ b/memcache/v1beta2/memcache-api.json @@ -584,7 +584,7 @@ } } }, - "revision": "20230727", + "revision": "20230803", "rootUrl": "https://memcache.googleapis.com/", "schemas": { "ApplyParametersRequest": { @@ -1539,7 +1539,7 @@ "description": "Properties of the object. Contains field @type with type URL.", "type": "any" }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", "type": "object" } }, diff --git a/memcache/v1beta2/memcache-gen.go b/memcache/v1beta2/memcache-gen.go index 17e33944e34..ea9dfeb85db 100644 --- a/memcache/v1beta2/memcache-gen.go +++ b/memcache/v1beta2/memcache-gen.go @@ -1647,8 +1647,8 @@ type Operation struct { // `operations/{unique_id}`. Name string `json:"name,omitempty"` - // Response: The normal response of the operation in case of success. If - // the original method returns no data on success, such as `Delete`, the + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the // response is `google.protobuf.Empty`. If the original method is // standard `Get`/`Create`/`Update`, the response should be the // resource. For other methods, the response should have the type diff --git a/migrationcenter/v1/migrationcenter-api.json b/migrationcenter/v1/migrationcenter-api.json index e7ecca9b447..18ba202634e 100644 --- a/migrationcenter/v1/migrationcenter-api.json +++ b/migrationcenter/v1/migrationcenter-api.json @@ -2099,7 +2099,7 @@ } } }, - "revision": "20230714", + "revision": "20230804", "rootUrl": "https://migrationcenter.googleapis.com/", "schemas": { "AddAssetsToGroupRequest": { @@ -2989,8 +2989,9 @@ "type": "integer" }, "totalRowsCount": { - "description": "Total number of rows in the import job.", + "description": "Output only. Total number of rows in the import job.", "format": "int32", + "readOnly": true, "type": "integer" } }, @@ -3124,6 +3125,32 @@ }, "type": "object" }, + "GenericInsight": { + "description": "An insight about an asset (experimental insight)", + "id": "GenericInsight", + "properties": { + "additionalInformation": { + "description": "Output only. Additional information about the insight, each entry can be a logical entry and must make sense if it is displayed with line breaks between each entry. Text can contain md style links", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "defaultMessage": { + "description": "Output only. In case message_code is not yet known by the client default_message will be the message to be used instead.", + "readOnly": true, + "type": "string" + }, + "messageId": { + "description": "Output only. Represents a globally unique message id for this insight, can be used for localization purposes, in case message_code is not yet known by the client use default_message instead.", + "format": "int64", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GenericPlatformDetails": { "description": "Generic platform details.", "id": "GenericPlatformDetails", @@ -3566,6 +3593,11 @@ "description": "An insight about an asset.", "id": "Insight", "properties": { + "genericInsight": { + "$ref": "GenericInsight", + "description": "Output only. A generic insight about an asset", + "readOnly": true + }, "migrationInsight": { "$ref": "MigrationInsight", "description": "Output only. An insight about potential migrations for an asset.", @@ -4412,7 +4444,7 @@ "description": "Properties of the object. Contains field @type with type URL.", "type": "any" }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", "type": "object" } }, diff --git a/migrationcenter/v1/migrationcenter-gen.go b/migrationcenter/v1/migrationcenter-gen.go index 0b799f41648..31c35a4c29b 100644 --- a/migrationcenter/v1/migrationcenter-gen.go +++ b/migrationcenter/v1/migrationcenter-gen.go @@ -1840,7 +1840,7 @@ type ExecutionReport struct { // job. FramesReported int64 `json:"framesReported,omitempty"` - // TotalRowsCount: Total number of rows in the import job. + // TotalRowsCount: Output only. Total number of rows in the import job. TotalRowsCount int64 `json:"totalRowsCount,omitempty"` // ForceSendFields is a list of field names (e.g. "ExecutionErrors") to @@ -2073,6 +2073,49 @@ func (s *FstabEntryList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GenericInsight: An insight about an asset (experimental insight) +type GenericInsight struct { + // AdditionalInformation: Output only. Additional information about the + // insight, each entry can be a logical entry and must make sense if it + // is displayed with line breaks between each entry. Text can contain md + // style links + AdditionalInformation []string `json:"additionalInformation,omitempty"` + + // DefaultMessage: Output only. In case message_code is not yet known by + // the client default_message will be the message to be used instead. + DefaultMessage string `json:"defaultMessage,omitempty"` + + // MessageId: Output only. Represents a globally unique message id for + // this insight, can be used for localization purposes, in case + // message_code is not yet known by the client use default_message + // instead. + MessageId int64 `json:"messageId,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. + // "AdditionalInformation") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AdditionalInformation") 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 *GenericInsight) MarshalJSON() ([]byte, error) { + type NoMethod GenericInsight + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GenericPlatformDetails: Generic platform details. type GenericPlatformDetails struct { // Location: Free text representation of the machine location. The @@ -2648,11 +2691,14 @@ func (s *ImportRowError) MarshalJSON() ([]byte, error) { // Insight: An insight about an asset. type Insight struct { + // GenericInsight: Output only. A generic insight about an asset + GenericInsight *GenericInsight `json:"genericInsight,omitempty"` + // MigrationInsight: Output only. An insight about potential migrations // for an asset. MigrationInsight *MigrationInsight `json:"migrationInsight,omitempty"` - // ForceSendFields is a list of field names (e.g. "MigrationInsight") to + // ForceSendFields is a list of field names (e.g. "GenericInsight") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2660,7 +2706,7 @@ type Insight struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MigrationInsight") to + // NullFields is a list of field names (e.g. "GenericInsight") 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 @@ -3991,8 +4037,8 @@ type Operation struct { // `operations/{unique_id}`. Name string `json:"name,omitempty"` - // Response: The normal response of the operation in case of success. If - // the original method returns no data on success, such as `Delete`, the + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the // response is `google.protobuf.Empty`. If the original method is // standard `Get`/`Create`/`Update`, the response should be the // resource. For other methods, the response should have the type diff --git a/migrationcenter/v1alpha1/migrationcenter-api.json b/migrationcenter/v1alpha1/migrationcenter-api.json index a74cd569741..a3e51e090a4 100644 --- a/migrationcenter/v1alpha1/migrationcenter-api.json +++ b/migrationcenter/v1alpha1/migrationcenter-api.json @@ -2102,7 +2102,7 @@ } } }, - "revision": "20230725", + "revision": "20230804", "rootUrl": "https://migrationcenter.googleapis.com/", "schemas": { "AddAssetsToGroupRequest": { @@ -3223,6 +3223,32 @@ }, "type": "object" }, + "GenericInsight": { + "description": "An insight about an asset (experimental insight)", + "id": "GenericInsight", + "properties": { + "additionalInformation": { + "description": "Output only. Additional information about the insight, each entry can be a logical entry and must make sense if it is displayed with line breaks between each entry. Text can contain md style links", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "defaultMessage": { + "description": "Output only. In case message_code is not yet known by the client default_message will be the message to be used instead. Text can contain md file style links.", + "readOnly": true, + "type": "string" + }, + "messageId": { + "description": "Output only. Represents a globally unique message id for this insight, can be used for localization purposes, in case message_code is not yet known by the client use default_message instead.", + "format": "int64", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GenericPlatformDetails": { "description": "Generic platform details.", "id": "GenericPlatformDetails", @@ -3698,6 +3724,11 @@ "description": "An insight about an asset.", "id": "Insight", "properties": { + "genericInsight": { + "$ref": "GenericInsight", + "description": "Output only. A generic insight about an asset.", + "readOnly": true + }, "migrationInsight": { "$ref": "MigrationInsight", "description": "Output only. An insight about potential migrations for an asset.", @@ -4361,7 +4392,7 @@ "description": "Properties of the object. Contains field @type with type URL.", "type": "any" }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", "type": "object" } }, diff --git a/migrationcenter/v1alpha1/migrationcenter-gen.go b/migrationcenter/v1alpha1/migrationcenter-gen.go index 0a768f1303a..4efb9147383 100644 --- a/migrationcenter/v1alpha1/migrationcenter-gen.go +++ b/migrationcenter/v1alpha1/migrationcenter-gen.go @@ -2201,6 +2201,50 @@ func (s *GCSPayloadInfo) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GenericInsight: An insight about an asset (experimental insight) +type GenericInsight struct { + // AdditionalInformation: Output only. Additional information about the + // insight, each entry can be a logical entry and must make sense if it + // is displayed with line breaks between each entry. Text can contain md + // style links + AdditionalInformation []string `json:"additionalInformation,omitempty"` + + // DefaultMessage: Output only. In case message_code is not yet known by + // the client default_message will be the message to be used instead. + // Text can contain md file style links. + DefaultMessage string `json:"defaultMessage,omitempty"` + + // MessageId: Output only. Represents a globally unique message id for + // this insight, can be used for localization purposes, in case + // message_code is not yet known by the client use default_message + // instead. + MessageId int64 `json:"messageId,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. + // "AdditionalInformation") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AdditionalInformation") 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 *GenericInsight) MarshalJSON() ([]byte, error) { + type NoMethod GenericInsight + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GenericPlatformDetails: Generic platform details. type GenericPlatformDetails struct { // Location: Free text representation of the machine location. The @@ -2809,11 +2853,14 @@ func (s *InlinePayloadInfo) MarshalJSON() ([]byte, error) { // Insight: An insight about an asset. type Insight struct { + // GenericInsight: Output only. A generic insight about an asset. + GenericInsight *GenericInsight `json:"genericInsight,omitempty"` + // MigrationInsight: Output only. An insight about potential migrations // for an asset. MigrationInsight *MigrationInsight `json:"migrationInsight,omitempty"` - // ForceSendFields is a list of field names (e.g. "MigrationInsight") to + // ForceSendFields is a list of field names (e.g. "GenericInsight") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2821,7 +2868,7 @@ type Insight struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MigrationInsight") to + // NullFields is a list of field names (e.g. "GenericInsight") 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 @@ -3949,8 +3996,8 @@ type Operation struct { // `operations/{unique_id}`. Name string `json:"name,omitempty"` - // Response: The normal response of the operation in case of success. If - // the original method returns no data on success, such as `Delete`, the + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the // response is `google.protobuf.Empty`. If the original method is // standard `Get`/`Create`/`Update`, the response should be the // resource. For other methods, the response should have the type diff --git a/networkconnectivity/v1/networkconnectivity-api.json b/networkconnectivity/v1/networkconnectivity-api.json index b0c97266020..45939a6f958 100644 --- a/networkconnectivity/v1/networkconnectivity-api.json +++ b/networkconnectivity/v1/networkconnectivity-api.json @@ -2491,7 +2491,7 @@ } } }, - "revision": "20230727", + "revision": "20230804", "rootUrl": "https://networkconnectivity.googleapis.com/", "schemas": { "AcceptSpokeRequest": { @@ -2771,7 +2771,7 @@ "description": "Properties of the object. Contains field @type with type URL.", "type": "any" }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", "type": "object" } }, @@ -3578,7 +3578,7 @@ "type": "object" }, "Policy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", "properties": { "auditConfigs": { @@ -4187,7 +4187,7 @@ "type": "object" }, "Spoke": { - "description": "A Network Connectivity Center spoke represents one or more network connectivity resources. When you create a spoke, you associate it with a hub. You must also identify a value for exactly one of the following fields: * linked_vpn_tunnels * linked_interconnect_attachments * linked_router_appliance_instances", + "description": "A Network Connectivity Center spoke represents one or more network connectivity resources. When you create a spoke, you associate it with a hub. You must also identify a value for exactly one of the following fields: * linked_vpn_tunnels * linked_interconnect_attachments * linked_router_appliance_instances * linked_vpc_network", "id": "Spoke", "properties": { "createTime": { diff --git a/networkconnectivity/v1/networkconnectivity-gen.go b/networkconnectivity/v1/networkconnectivity-gen.go index 99c99c75b5e..c4589b0a4be 100644 --- a/networkconnectivity/v1/networkconnectivity-gen.go +++ b/networkconnectivity/v1/networkconnectivity-gen.go @@ -811,8 +811,8 @@ type GoogleLongrunningOperation struct { // `operations/{unique_id}`. Name string `json:"name,omitempty"` - // Response: The normal response of the operation in case of success. If - // the original method returns no data on success, such as `Delete`, the + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the // response is `google.protobuf.Empty`. If the original method is // standard `Get`/`Create`/`Update`, the response should be the // resource. For other methods, the response should have the type @@ -2082,7 +2082,7 @@ func (s *OperationMetadata) MarshalJSON() ([]byte, error) { // both. To learn which resources support conditions in their IAM // policies, see the IAM documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -// **JSON example:** { "bindings": [ { "role": +// **JSON example:** ``` { "bindings": [ { "role": // "roles/resourcemanager.organizationAdmin", "members": [ // "user:mike@example.com", "group:admins@example.com", // "domain:google.com", @@ -2091,17 +2091,17 @@ func (s *OperationMetadata) MarshalJSON() ([]byte, error) { // "user:eve@example.com" ], "condition": { "title": "expirable access", // "description": "Does not grant access after Sep 2020", "expression": // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], -// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - -// members: - user:mike@example.com - group:admins@example.com - -// domain:google.com - +// "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` +// bindings: - members: - user:mike@example.com - +// group:admins@example.com - domain:google.com - // serviceAccount:my-project-id@appspot.gserviceaccount.com role: // roles/resourcemanager.organizationAdmin - members: - // user:eve@example.com role: roles/resourcemanager.organizationViewer // condition: title: expirable access description: Does not grant access // after Sep 2020 expression: request.time < // timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 -// For a description of IAM and its features, see the IAM documentation -// (https://cloud.google.com/iam/docs/). +// ``` For a description of IAM and its features, see the IAM +// documentation (https://cloud.google.com/iam/docs/). type Policy struct { // AuditConfigs: Specifies cloud audit logging configuration for this // policy. @@ -2940,7 +2940,8 @@ func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { // network connectivity resources. When you create a spoke, you // associate it with a hub. You must also identify a value for exactly // one of the following fields: * linked_vpn_tunnels * -// linked_interconnect_attachments * linked_router_appliance_instances +// linked_interconnect_attachments * linked_router_appliance_instances * +// linked_vpc_network type Spoke struct { // CreateTime: Output only. The time the spoke was created. CreateTime string `json:"createTime,omitempty"` diff --git a/networkconnectivity/v1alpha1/networkconnectivity-api.json b/networkconnectivity/v1alpha1/networkconnectivity-api.json index ece2bbdecef..240bf8ffa03 100644 --- a/networkconnectivity/v1alpha1/networkconnectivity-api.json +++ b/networkconnectivity/v1alpha1/networkconnectivity-api.json @@ -1116,7 +1116,7 @@ } } }, - "revision": "20230712", + "revision": "20230804", "rootUrl": "https://networkconnectivity.googleapis.com/", "schemas": { "AuditConfig": { @@ -1271,7 +1271,7 @@ "description": "Properties of the object. Contains field @type with type URL.", "type": "any" }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", "type": "object" } }, @@ -1648,7 +1648,7 @@ "type": "object" }, "Policy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", "properties": { "auditConfigs": { diff --git a/networkconnectivity/v1alpha1/networkconnectivity-gen.go b/networkconnectivity/v1alpha1/networkconnectivity-gen.go index 2d2b9bf5b1f..0f11f8b519f 100644 --- a/networkconnectivity/v1alpha1/networkconnectivity-gen.go +++ b/networkconnectivity/v1alpha1/networkconnectivity-gen.go @@ -532,8 +532,8 @@ type GoogleLongrunningOperation struct { // `operations/{unique_id}`. Name string `json:"name,omitempty"` - // Response: The normal response of the operation in case of success. If - // the original method returns no data on success, such as `Delete`, the + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the // response is `google.protobuf.Empty`. If the original method is // standard `Get`/`Create`/`Update`, the response should be the // resource. For other methods, the response should have the type @@ -1092,7 +1092,7 @@ func (s *OperationMetadata) MarshalJSON() ([]byte, error) { // both. To learn which resources support conditions in their IAM // policies, see the IAM documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -// **JSON example:** { "bindings": [ { "role": +// **JSON example:** ``` { "bindings": [ { "role": // "roles/resourcemanager.organizationAdmin", "members": [ // "user:mike@example.com", "group:admins@example.com", // "domain:google.com", @@ -1101,17 +1101,17 @@ func (s *OperationMetadata) MarshalJSON() ([]byte, error) { // "user:eve@example.com" ], "condition": { "title": "expirable access", // "description": "Does not grant access after Sep 2020", "expression": // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], -// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - -// members: - user:mike@example.com - group:admins@example.com - -// domain:google.com - +// "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` +// bindings: - members: - user:mike@example.com - +// group:admins@example.com - domain:google.com - // serviceAccount:my-project-id@appspot.gserviceaccount.com role: // roles/resourcemanager.organizationAdmin - members: - // user:eve@example.com role: roles/resourcemanager.organizationViewer // condition: title: expirable access description: Does not grant access // after Sep 2020 expression: request.time < // timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 -// For a description of IAM and its features, see the IAM documentation -// (https://cloud.google.com/iam/docs/). +// ``` For a description of IAM and its features, see the IAM +// documentation (https://cloud.google.com/iam/docs/). type Policy struct { // AuditConfigs: Specifies cloud audit logging configuration for this // policy. diff --git a/networkmanagement/v1/networkmanagement-api.json b/networkmanagement/v1/networkmanagement-api.json index 9164946e2dd..b830356de85 100644 --- a/networkmanagement/v1/networkmanagement-api.json +++ b/networkmanagement/v1/networkmanagement-api.json @@ -591,7 +591,7 @@ } } }, - "revision": "20230705", + "revision": "20230802", "rootUrl": "https://networkmanagement.googleapis.com/", "schemas": { "AbortInfo": { @@ -621,7 +621,8 @@ "GKE_KONNECTIVITY_PROXY_UNSUPPORTED", "RESOURCE_CONFIG_NOT_FOUND", "GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT", - "SOURCE_PSC_CLOUD_SQL_UNSUPPORTED" + "SOURCE_PSC_CLOUD_SQL_UNSUPPORTED", + "SOURCE_FORWARDING_RULE_UNSUPPORTED" ], "enumDescriptions": [ "Cause is unspecified.", @@ -644,7 +645,8 @@ "Aborted because the connection between the control plane and the node of the source cluster is initiated by the node and managed by the Konnectivity proxy.", "Aborted because expected resource configuration was missing.", "Aborted because a PSC endpoint selection for the Google-managed service is ambiguous (several PSC endpoints satisfy test input).", - "Aborted because tests with a PSC-based Cloud SQL instance as a source are not supported." + "Aborted because tests with a PSC-based Cloud SQL instance as a source are not supported.", + "Aborted because tests with a forwarding rule as a source are not supported." ], "type": "string" }, @@ -1291,7 +1293,8 @@ "GKE_MASTER", "IMPORTED_CUSTOM_ROUTE_NEXT_HOP", "CLOUD_SQL_INSTANCE", - "ANOTHER_PROJECT" + "ANOTHER_PROJECT", + "NCC_HUB" ], "enumDescriptions": [ "Target not specified.", @@ -1301,7 +1304,8 @@ "Forwarded to a Google Kubernetes Engine Container cluster master.", "Forwarded to the next hop of a custom route imported from a peering VPC.", "Forwarded to a Cloud SQL instance.", - "Forwarded to a VPC network in another project." + "Forwarded to a VPC network in another project.", + "Forwarded to an NCC Hub." ], "type": "string" } @@ -1680,7 +1684,7 @@ "description": "Properties of the object. Contains field @type with type URL.", "type": "any" }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", "type": "object" } }, @@ -1724,7 +1728,7 @@ "type": "object" }, "Policy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", "properties": { "auditConfigs": { @@ -1817,7 +1821,7 @@ "type": "array" }, "displayName": { - "description": "Name of a Compute Engine route.", + "description": "Name of a route.", "type": "string" }, "instanceTags": { @@ -1827,8 +1831,16 @@ }, "type": "array" }, + "nccHubUri": { + "description": "URI of a NCC Hub. NCC_HUB routes only.", + "type": "string" + }, + "nccSpokeUri": { + "description": "URI of a NCC Spoke. NCC_HUB routes only.", + "type": "string" + }, "networkUri": { - "description": "URI of a Compute Engine network.", + "description": "URI of a Compute Engine network. NETWORK routes only.", "type": "string" }, "nextHop": { @@ -1849,7 +1861,8 @@ "NEXT_HOP_INTERNET_GATEWAY", "NEXT_HOP_BLACKHOLE", "NEXT_HOP_ILB", - "NEXT_HOP_ROUTER_APPLIANCE" + "NEXT_HOP_ROUTER_APPLIANCE", + "NEXT_HOP_NCC_HUB" ], "enumDescriptions": [ "Unspecified type. Default value.", @@ -1863,7 +1876,8 @@ "Next hop is an internet gateway.", "Next hop is blackhole; that is, the next hop either does not exist or is not running.", "Next hop is the forwarding rule of an Internal Load Balancer.", - "Next hop is a [router appliance instance](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/ra-overview)." + "Next hop is a [router appliance instance](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/ra-overview).", + "Next hop is an NCC hub." ], "type": "string" }, @@ -1879,6 +1893,20 @@ }, "type": "array" }, + "routeScope": { + "description": "Indicates where route is applicable.", + "enum": [ + "ROUTE_SCOPE_UNSPECIFIED", + "NETWORK", + "NCC_HUB" + ], + "enumDescriptions": [ + "Unspecified scope. Default value.", + "Route is applicable to packets in Network.", + "Route is applicable to packets using NCC Hub's routing table." + ], + "type": "string" + }, "routeType": { "description": "Type of route.", "enum": [ @@ -1915,7 +1943,7 @@ "type": "array" }, "uri": { - "description": "URI of a Compute Engine route. Dynamic route from cloud router does not have a URI. Advertised route from Google Cloud VPC to on-premises network also does not have a URI.", + "description": "URI of a route. Dynamic, peering static and peering dynamic routes do not have an URI. Advertised route from Google Cloud VPC to on-premises network also does not have an URI.", "type": "string" } }, diff --git a/networkmanagement/v1/networkmanagement-gen.go b/networkmanagement/v1/networkmanagement-gen.go index dd87e0c089d..080669ee8f7 100644 --- a/networkmanagement/v1/networkmanagement-gen.go +++ b/networkmanagement/v1/networkmanagement-gen.go @@ -251,6 +251,8 @@ type AbortInfo struct { // (several PSC endpoints satisfy test input). // "SOURCE_PSC_CLOUD_SQL_UNSUPPORTED" - Aborted because tests with a // PSC-based Cloud SQL instance as a source are not supported. + // "SOURCE_FORWARDING_RULE_UNSUPPORTED" - Aborted because tests with a + // forwarding rule as a source are not supported. Cause string `json:"cause,omitempty"` // ProjectsMissingPermission: List of project IDs that the user has @@ -1330,6 +1332,7 @@ type ForwardInfo struct { // custom route imported from a peering VPC. // "CLOUD_SQL_INSTANCE" - Forwarded to a Cloud SQL instance. // "ANOTHER_PROJECT" - Forwarded to a VPC network in another project. + // "NCC_HUB" - Forwarded to an NCC Hub. Target string `json:"target,omitempty"` // ForceSendFields is a list of field names (e.g. "ResourceUri") to @@ -1879,8 +1882,8 @@ type Operation struct { // `operations/{unique_id}`. Name string `json:"name,omitempty"` - // Response: The normal response of the operation in case of success. If - // the original method returns no data on success, such as `Delete`, the + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the // response is `google.protobuf.Empty`. If the original method is // standard `Get`/`Create`/`Update`, the response should be the // resource. For other methods, the response should have the type @@ -1978,7 +1981,7 @@ func (s *OperationMetadata) MarshalJSON() ([]byte, error) { // both. To learn which resources support conditions in their IAM // policies, see the IAM documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -// **JSON example:** { "bindings": [ { "role": +// **JSON example:** ``` { "bindings": [ { "role": // "roles/resourcemanager.organizationAdmin", "members": [ // "user:mike@example.com", "group:admins@example.com", // "domain:google.com", @@ -1987,17 +1990,17 @@ func (s *OperationMetadata) MarshalJSON() ([]byte, error) { // "user:eve@example.com" ], "condition": { "title": "expirable access", // "description": "Does not grant access after Sep 2020", "expression": // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], -// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - -// members: - user:mike@example.com - group:admins@example.com - -// domain:google.com - +// "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` +// bindings: - members: - user:mike@example.com - +// group:admins@example.com - domain:google.com - // serviceAccount:my-project-id@appspot.gserviceaccount.com role: // roles/resourcemanager.organizationAdmin - members: - // user:eve@example.com role: roles/resourcemanager.organizationViewer // condition: title: expirable access description: Does not grant access // after Sep 2020 expression: request.time < // timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 -// For a description of IAM and its features, see the IAM documentation -// (https://cloud.google.com/iam/docs/). +// ``` For a description of IAM and its features, see the IAM +// documentation (https://cloud.google.com/iam/docs/). type Policy struct { // AuditConfigs: Specifies cloud audit logging configuration for this // policy. @@ -2151,13 +2154,19 @@ type RouteInfo struct { // routes only. DestPortRanges []string `json:"destPortRanges,omitempty"` - // DisplayName: Name of a Compute Engine route. + // DisplayName: Name of a route. DisplayName string `json:"displayName,omitempty"` // InstanceTags: Instance tags of the route. InstanceTags []string `json:"instanceTags,omitempty"` - // NetworkUri: URI of a Compute Engine network. + // NccHubUri: URI of a NCC Hub. NCC_HUB routes only. + NccHubUri string `json:"nccHubUri,omitempty"` + + // NccSpokeUri: URI of a NCC Spoke. NCC_HUB routes only. + NccSpokeUri string `json:"nccSpokeUri,omitempty"` + + // NetworkUri: URI of a Compute Engine network. NETWORK routes only. NetworkUri string `json:"networkUri,omitempty"` // NextHop: Next hop of the route. @@ -2186,6 +2195,7 @@ type RouteInfo struct { // "NEXT_HOP_ROUTER_APPLIANCE" - Next hop is a [router appliance // instance](https://cloud.google.com/network-connectivity/docs/network-c // onnectivity-center/concepts/ra-overview). + // "NEXT_HOP_NCC_HUB" - Next hop is an NCC hub. NextHopType string `json:"nextHopType,omitempty"` // Priority: Priority of the route. @@ -2194,6 +2204,15 @@ type RouteInfo struct { // Protocols: Protocols of the route. Policy based routes only. Protocols []string `json:"protocols,omitempty"` + // RouteScope: Indicates where route is applicable. + // + // Possible values: + // "ROUTE_SCOPE_UNSPECIFIED" - Unspecified scope. Default value. + // "NETWORK" - Route is applicable to packets in Network. + // "NCC_HUB" - Route is applicable to packets using NCC Hub's routing + // table. + RouteScope string `json:"routeScope,omitempty"` + // RouteType: Type of route. // // Possible values: @@ -2217,9 +2236,9 @@ type RouteInfo struct { // only. SrcPortRanges []string `json:"srcPortRanges,omitempty"` - // Uri: URI of a Compute Engine route. Dynamic route from cloud router - // does not have a URI. Advertised route from Google Cloud VPC to - // on-premises network also does not have a URI. + // Uri: URI of a route. Dynamic, peering static and peering dynamic + // routes do not have an URI. Advertised route from Google Cloud VPC to + // on-premises network also does not have an URI. Uri string `json:"uri,omitempty"` // ForceSendFields is a list of field names (e.g. "DestIpRange") to diff --git a/pubsublite/v1/pubsublite-api.json b/pubsublite/v1/pubsublite-api.json index 67ff9a173fe..7d1eb5ce834 100644 --- a/pubsublite/v1/pubsublite-api.json +++ b/pubsublite/v1/pubsublite-api.json @@ -1040,7 +1040,7 @@ } } }, - "revision": "20230707", + "revision": "20230804", "rootUrl": "https://pubsublite.googleapis.com/", "schemas": { "CancelOperationRequest": { @@ -1431,7 +1431,7 @@ "description": "Properties of the object. Contains field @type with type URL.", "type": "any" }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", "type": "object" } }, diff --git a/pubsublite/v1/pubsublite-gen.go b/pubsublite/v1/pubsublite-gen.go index e397f230b0e..a017660cf57 100644 --- a/pubsublite/v1/pubsublite-gen.go +++ b/pubsublite/v1/pubsublite-gen.go @@ -1088,8 +1088,8 @@ type Operation struct { // `operations/{unique_id}`. Name string `json:"name,omitempty"` - // Response: The normal response of the operation in case of success. If - // the original method returns no data on success, such as `Delete`, the + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the // response is `google.protobuf.Empty`. If the original method is // standard `Get`/`Create`/`Update`, the response should be the // resource. For other methods, the response should have the type diff --git a/redis/v1/redis-api.json b/redis/v1/redis-api.json index 608bd0d6e07..0f4b1343bf9 100644 --- a/redis/v1/redis-api.json +++ b/redis/v1/redis-api.json @@ -624,7 +624,7 @@ } } }, - "revision": "20230620", + "revision": "20230804", "rootUrl": "https://redis.googleapis.com/", "schemas": { "Empty": { @@ -1231,7 +1231,7 @@ "description": "Properties of the object. Contains field @type with type URL.", "type": "any" }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", "type": "object" } }, diff --git a/redis/v1/redis-gen.go b/redis/v1/redis-gen.go index 62727e53cb4..3127b911d83 100644 --- a/redis/v1/redis-gen.go +++ b/redis/v1/redis-gen.go @@ -1076,8 +1076,8 @@ type Operation struct { // `operations/{unique_id}`. Name string `json:"name,omitempty"` - // Response: The normal response of the operation in case of success. If - // the original method returns no data on success, such as `Delete`, the + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the // response is `google.protobuf.Empty`. If the original method is // standard `Get`/`Create`/`Update`, the response should be the // resource. For other methods, the response should have the type diff --git a/servicedirectory/v1/servicedirectory-api.json b/servicedirectory/v1/servicedirectory-api.json index 8861e72ed98..ed874008c3c 100644 --- a/servicedirectory/v1/servicedirectory-api.json +++ b/servicedirectory/v1/servicedirectory-api.json @@ -883,7 +883,7 @@ } } }, - "revision": "20230516", + "revision": "20230806", "rootUrl": "https://servicedirectory.googleapis.com/", "schemas": { "Binding": { @@ -1126,7 +1126,7 @@ "type": "object" }, "Policy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", "properties": { "bindings": { diff --git a/servicedirectory/v1/servicedirectory-gen.go b/servicedirectory/v1/servicedirectory-gen.go index 27a559acde6..3a6b7729fbb 100644 --- a/servicedirectory/v1/servicedirectory-gen.go +++ b/servicedirectory/v1/servicedirectory-gen.go @@ -742,7 +742,7 @@ func (s *Namespace) MarshalJSON() ([]byte, error) { // both. To learn which resources support conditions in their IAM // policies, see the IAM documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -// **JSON example:** { "bindings": [ { "role": +// **JSON example:** ``` { "bindings": [ { "role": // "roles/resourcemanager.organizationAdmin", "members": [ // "user:mike@example.com", "group:admins@example.com", // "domain:google.com", @@ -751,17 +751,17 @@ func (s *Namespace) MarshalJSON() ([]byte, error) { // "user:eve@example.com" ], "condition": { "title": "expirable access", // "description": "Does not grant access after Sep 2020", "expression": // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], -// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - -// members: - user:mike@example.com - group:admins@example.com - -// domain:google.com - +// "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` +// bindings: - members: - user:mike@example.com - +// group:admins@example.com - domain:google.com - // serviceAccount:my-project-id@appspot.gserviceaccount.com role: // roles/resourcemanager.organizationAdmin - members: - // user:eve@example.com role: roles/resourcemanager.organizationViewer // condition: title: expirable access description: Does not grant access // after Sep 2020 expression: request.time < // timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 -// For a description of IAM and its features, see the IAM documentation -// (https://cloud.google.com/iam/docs/). +// ``` For a description of IAM and its features, see the IAM +// documentation (https://cloud.google.com/iam/docs/). type Policy struct { // Bindings: Associates a list of `members`, or principals, with a // `role`. Optionally, may specify a `condition` that determines how and diff --git a/servicedirectory/v1beta1/servicedirectory-api.json b/servicedirectory/v1beta1/servicedirectory-api.json index bd95bd2be64..ea43e394a96 100644 --- a/servicedirectory/v1beta1/servicedirectory-api.json +++ b/servicedirectory/v1beta1/servicedirectory-api.json @@ -971,7 +971,7 @@ } } }, - "revision": "20230716", + "revision": "20230806", "rootUrl": "https://servicedirectory.googleapis.com/", "schemas": { "Binding": { @@ -1238,7 +1238,7 @@ "type": "object" }, "Policy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", "properties": { "bindings": { diff --git a/servicedirectory/v1beta1/servicedirectory-gen.go b/servicedirectory/v1beta1/servicedirectory-gen.go index 129708e9024..40c31d63297 100644 --- a/servicedirectory/v1beta1/servicedirectory-gen.go +++ b/servicedirectory/v1beta1/servicedirectory-gen.go @@ -769,7 +769,7 @@ func (s *Namespace) MarshalJSON() ([]byte, error) { // both. To learn which resources support conditions in their IAM // policies, see the IAM documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -// **JSON example:** { "bindings": [ { "role": +// **JSON example:** ``` { "bindings": [ { "role": // "roles/resourcemanager.organizationAdmin", "members": [ // "user:mike@example.com", "group:admins@example.com", // "domain:google.com", @@ -778,17 +778,17 @@ func (s *Namespace) MarshalJSON() ([]byte, error) { // "user:eve@example.com" ], "condition": { "title": "expirable access", // "description": "Does not grant access after Sep 2020", "expression": // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], -// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - -// members: - user:mike@example.com - group:admins@example.com - -// domain:google.com - +// "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` +// bindings: - members: - user:mike@example.com - +// group:admins@example.com - domain:google.com - // serviceAccount:my-project-id@appspot.gserviceaccount.com role: // roles/resourcemanager.organizationAdmin - members: - // user:eve@example.com role: roles/resourcemanager.organizationViewer // condition: title: expirable access description: Does not grant access // after Sep 2020 expression: request.time < // timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 -// For a description of IAM and its features, see the IAM documentation -// (https://cloud.google.com/iam/docs/). +// ``` For a description of IAM and its features, see the IAM +// documentation (https://cloud.google.com/iam/docs/). type Policy struct { // Bindings: Associates a list of `members`, or principals, with a // `role`. Optionally, may specify a `condition` that determines how and diff --git a/servicemanagement/v1/servicemanagement-api.json b/servicemanagement/v1/servicemanagement-api.json index 34a4c193e9c..6786af08966 100644 --- a/servicemanagement/v1/servicemanagement-api.json +++ b/servicemanagement/v1/servicemanagement-api.json @@ -830,7 +830,7 @@ } } }, - "revision": "20230721", + "revision": "20230804", "rootUrl": "https://servicemanagement.googleapis.com/", "schemas": { "Advice": { @@ -2754,7 +2754,7 @@ "description": "Properties of the object. Contains field @type with type URL.", "type": "any" }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", "type": "object" } }, @@ -2859,7 +2859,7 @@ "type": "object" }, "Policy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", "properties": { "auditConfigs": { diff --git a/servicemanagement/v1/servicemanagement-gen.go b/servicemanagement/v1/servicemanagement-gen.go index 06f3c9f6b5b..c3fb4e46eec 100644 --- a/servicemanagement/v1/servicemanagement-gen.go +++ b/servicemanagement/v1/servicemanagement-gen.go @@ -3945,8 +3945,8 @@ type Operation struct { // `operations/{unique_id}`. Name string `json:"name,omitempty"` - // Response: The normal response of the operation in case of success. If - // the original method returns no data on success, such as `Delete`, the + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the // response is `google.protobuf.Empty`. If the original method is // standard `Get`/`Create`/`Update`, the response should be the // resource. For other methods, the response should have the type @@ -4194,7 +4194,7 @@ func (s *PhpSettings) MarshalJSON() ([]byte, error) { // both. To learn which resources support conditions in their IAM // policies, see the IAM documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -// **JSON example:** { "bindings": [ { "role": +// **JSON example:** ``` { "bindings": [ { "role": // "roles/resourcemanager.organizationAdmin", "members": [ // "user:mike@example.com", "group:admins@example.com", // "domain:google.com", @@ -4203,17 +4203,17 @@ func (s *PhpSettings) MarshalJSON() ([]byte, error) { // "user:eve@example.com" ], "condition": { "title": "expirable access", // "description": "Does not grant access after Sep 2020", "expression": // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], -// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - -// members: - user:mike@example.com - group:admins@example.com - -// domain:google.com - +// "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` +// bindings: - members: - user:mike@example.com - +// group:admins@example.com - domain:google.com - // serviceAccount:my-project-id@appspot.gserviceaccount.com role: // roles/resourcemanager.organizationAdmin - members: - // user:eve@example.com role: roles/resourcemanager.organizationViewer // condition: title: expirable access description: Does not grant access // after Sep 2020 expression: request.time < // timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 -// For a description of IAM and its features, see the IAM documentation -// (https://cloud.google.com/iam/docs/). +// ``` For a description of IAM and its features, see the IAM +// documentation (https://cloud.google.com/iam/docs/). type Policy struct { // AuditConfigs: Specifies cloud audit logging configuration for this // policy. diff --git a/translate/v3/translate-api.json b/translate/v3/translate-api.json index 07df875e623..5830e53d675 100644 --- a/translate/v3/translate-api.json +++ b/translate/v3/translate-api.json @@ -1344,7 +1344,7 @@ } } }, - "revision": "20230714", + "revision": "20230808", "rootUrl": "https://translation.googleapis.com/", "schemas": { "BatchDocumentInputConfig": { @@ -1364,7 +1364,7 @@ "properties": { "gcsDestination": { "$ref": "GcsDestination", - "description": "Google Cloud Storage destination for output content. For every single input document (for example, gs://a/b/c.[extension]), we generate at most 2 * n output files. (n is the # of target_language_codes in the BatchTranslateDocumentRequest). While the input documents are being processed, we write/update an index file `index.csv` under `gcs_destination.output_uri_prefix` (for example, gs://translation_output/index.csv) The index file is generated/updated as new files are being translated. The format is: input_document,target_language_code,translation_output,error_output, glossary_translation_output,glossary_error_output `input_document` is one file we matched using gcs_source.input_uri. `target_language_code` is provided in the request. `translation_output` contains the translations. (details provided below) `error_output` contains the error message during processing of the file. Both translations_file and errors_file could be empty strings if we have no content to output. `glossary_translation_output` and `glossary_error_output` are the translated output/error when we apply glossaries. They could also be empty if we have no content to output. Once a row is present in index.csv, the input/output matching never changes. Callers should also expect all the content in input_file are processed and ready to be consumed (that is, no partial output file is written). Since index.csv will be keeping updated during the process, please make sure there is no custom retention policy applied on the output bucket that may avoid file updating. (https://cloud.google.com/storage/docs/bucket-lock#retention-policy) The naming format of translation output files follows (for target language code [trg]): `translation_output`: gs://translation_output/a_b_c_[trg]_translation.[extension] `glossary_translation_output`: gs://translation_test/a_b_c_[trg]_glossary_translation.[extension] The output document will maintain the same file format as the input document. The naming format of error output files follows (for target language code [trg]): `error_output`: gs://translation_test/a_b_c_[trg]_errors.txt `glossary_error_output`: gs://translation_test/a_b_c_[trg]_glossary_translation.txt The error output is a txt file containing error details." + "description": "Google Cloud Storage destination for output content. For every single input document (for example, gs://a/b/c.[extension]), we generate at most 2 * n output files. (n is the # of target_language_codes in the BatchTranslateDocumentRequest). While the input documents are being processed, we write/update an index file `index.csv` under `gcs_destination.output_uri_prefix` (for example, gs://translation_output/index.csv) The index file is generated/updated as new files are being translated. The format is: input_document,target_language_code,translation_output,error_output, glossary_translation_output,glossary_error_output `input_document` is one file we matched using gcs_source.input_uri. `target_language_code` is provided in the request. `translation_output` contains the translations. (details provided below) `error_output` contains the error message during processing of the file. Both translations_file and errors_file could be empty strings if we have no content to output. `glossary_translation_output` and `glossary_error_output` are the translated output/error when we apply glossaries. They could also be empty if we have no content to output. Once a row is present in index.csv, the input/output matching never changes. Callers should also expect all the content in input_file are processed and ready to be consumed (that is, no partial output file is written). Since index.csv will be keeping updated during the process, please make sure there is no custom retention policy applied on the output bucket that may avoid file updating. (https://cloud.google.com/storage/docs/bucket-lock#retention-policy) The naming format of translation output files follows (for target language code [trg]): `translation_output`: `gs://translation_output/a_b_c_[trg]_translation.[extension]` `glossary_translation_output`: `gs://translation_test/a_b_c_[trg]_glossary_translation.[extension]`. The output document will maintain the same file format as the input document. The naming format of error output files follows (for target language code [trg]): `error_output`: `gs://translation_test/a_b_c_[trg]_errors.txt` `glossary_error_output`: `gs://translation_test/a_b_c_[trg]_glossary_translation.txt`. The error output is a txt file containing error details." } }, "type": "object" @@ -1653,7 +1653,7 @@ "properties": { "gcsDestination": { "$ref": "GcsDestination", - "description": "Optional. Google Cloud Storage destination for the translation output, e.g., `gs://my_bucket/my_directory/`. The destination directory provided does not have to be empty, but the bucket must exist. If a file with the same name as the output file already exists in the destination an error will be returned. For a DocumentInputConfig.contents provided document, the output file will have the name \"output_[trg]_translations.[ext]\", where - [trg] corresponds to the translated file's language code, - [ext] corresponds to the translated file's extension according to its mime type. For a DocumentInputConfig.gcs_uri provided document, the output file will have a name according to its URI. For example: an input file with URI: \"gs://a/b/c.[extension]\" stored in a gcs_destination bucket with name \"my_bucket\" will have an output URI: \"gs://my_bucket/a_b_c_[trg]_translations.[ext]\", where - [trg] corresponds to the translated file's language code, - [ext] corresponds to the translated file's extension according to its mime type. If the document was directly provided through the request, then the output document will have the format: \"gs://my_bucket/translated_document_[trg]_translations.[ext], where - [trg] corresponds to the translated file's language code, - [ext] corresponds to the translated file's extension according to its mime type. If a glossary was provided, then the output URI for the glossary translation will be equal to the default output URI but have `glossary_translations` instead of `translations`. For the previous example, its glossary URI would be: \"gs://my_bucket/a_b_c_[trg]_glossary_translations.[ext]\". Thus the max number of output files will be 2 (Translated document, Glossary translated document). Callers should expect no partial outputs. If there is any error during document translation, no output will be stored in the Cloud Storage bucket." + "description": "Optional. Google Cloud Storage destination for the translation output, e.g., `gs://my_bucket/my_directory/`. The destination directory provided does not have to be empty, but the bucket must exist. If a file with the same name as the output file already exists in the destination an error will be returned. For a DocumentInputConfig.contents provided document, the output file will have the name \"output_[trg]_translations.[ext]\", where - [trg] corresponds to the translated file's language code, - [ext] corresponds to the translated file's extension according to its mime type. For a DocumentInputConfig.gcs_uri provided document, the output file will have a name according to its URI. For example: an input file with URI: `gs://a/b/c.[extension]` stored in a gcs_destination bucket with name \"my_bucket\" will have an output URI: `gs://my_bucket/a_b_c_[trg]_translations.[ext]`, where - [trg] corresponds to the translated file's language code, - [ext] corresponds to the translated file's extension according to its mime type. If the document was directly provided through the request, then the output document will have the format: `gs://my_bucket/translated_document_[trg]_translations.[ext]`, where - [trg] corresponds to the translated file's language code, - [ext] corresponds to the translated file's extension according to its mime type. If a glossary was provided, then the output URI for the glossary translation will be equal to the default output URI but have `glossary_translations` instead of `translations`. For the previous example, its glossary URI would be: `gs://my_bucket/a_b_c_[trg]_glossary_translations.[ext]`. Thus the max number of output files will be 2 (Translated document, Glossary translated document). Callers should expect no partial outputs. If there is any error during document translation, no output will be stored in the Cloud Storage bucket." }, "mimeType": { "description": "Optional. Specifies the translated document's mime_type. If not specified, the translated file's mime type will be the same as the input file's mime type. Currently only support the output mime type to be the same as input mime type. - application/pdf - application/vnd.openxmlformats-officedocument.wordprocessingml.document - application/vnd.openxmlformats-officedocument.presentationml.presentation - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", @@ -2212,7 +2212,7 @@ "description": "Properties of the object. Contains field @type with type URL.", "type": "any" }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", "type": "object" } }, @@ -2224,7 +2224,7 @@ "properties": { "gcsDestination": { "$ref": "GcsDestination", - "description": "Google Cloud Storage destination for output content. For every single input file (for example, gs://a/b/c.[extension]), we generate at most 2 * n output files. (n is the # of target_language_codes in the BatchTranslateTextRequest). Output files (tsv) generated are compliant with RFC 4180 except that record delimiters are '\\n' instead of '\\r\\n'. We don't provide any way to change record delimiters. While the input files are being processed, we write/update an index file 'index.csv' under 'output_uri_prefix' (for example, gs://translation-test/index.csv) The index file is generated/updated as new files are being translated. The format is: input_file,target_language_code,translations_file,errors_file, glossary_translations_file,glossary_errors_file input_file is one file we matched using gcs_source.input_uri. target_language_code is provided in the request. translations_file contains the translations. (details provided below) errors_file contains the errors during processing of the file. (details below). Both translations_file and errors_file could be empty strings if we have no content to output. glossary_translations_file and glossary_errors_file are always empty strings if the input_file is tsv. They could also be empty if we have no content to output. Once a row is present in index.csv, the input/output matching never changes. Callers should also expect all the content in input_file are processed and ready to be consumed (that is, no partial output file is written). Since index.csv will be keeping updated during the process, please make sure there is no custom retention policy applied on the output bucket that may avoid file updating. (https://cloud.google.com/storage/docs/bucket-lock#retention-policy) The format of translations_file (for target language code 'trg') is: `gs://translation_test/a_b_c_'trg'_translations.[extension]` If the input file extension is tsv, the output has the following columns: Column 1: ID of the request provided in the input, if it's not provided in the input, then the input row number is used (0-based). Column 2: source sentence. Column 3: translation without applying a glossary. Empty string if there is an error. Column 4 (only present if a glossary is provided in the request): translation after applying the glossary. Empty string if there is an error applying the glossary. Could be same string as column 3 if there is no glossary applied. If input file extension is a txt or html, the translation is directly written to the output file. If glossary is requested, a separate glossary_translations_file has format of gs://translation_test/a_b_c_'trg'_glossary_translations.[extension] The format of errors file (for target language code 'trg') is: gs://translation_test/a_b_c_'trg'_errors.[extension] If the input file extension is tsv, errors_file contains the following: Column 1: ID of the request provided in the input, if it's not provided in the input, then the input row number is used (0-based). Column 2: source sentence. Column 3: Error detail for the translation. Could be empty. Column 4 (only present if a glossary is provided in the request): Error when applying the glossary. If the input file extension is txt or html, glossary_error_file will be generated that contains error details. glossary_error_file has format of gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]" + "description": "Google Cloud Storage destination for output content. For every single input file (for example, gs://a/b/c.[extension]), we generate at most 2 * n output files. (n is the # of target_language_codes in the BatchTranslateTextRequest). Output files (tsv) generated are compliant with RFC 4180 except that record delimiters are '\\n' instead of '\\r\\n'. We don't provide any way to change record delimiters. While the input files are being processed, we write/update an index file 'index.csv' under 'output_uri_prefix' (for example, gs://translation-test/index.csv) The index file is generated/updated as new files are being translated. The format is: input_file,target_language_code,translations_file,errors_file, glossary_translations_file,glossary_errors_file input_file is one file we matched using gcs_source.input_uri. target_language_code is provided in the request. translations_file contains the translations. (details provided below) errors_file contains the errors during processing of the file. (details below). Both translations_file and errors_file could be empty strings if we have no content to output. glossary_translations_file and glossary_errors_file are always empty strings if the input_file is tsv. They could also be empty if we have no content to output. Once a row is present in index.csv, the input/output matching never changes. Callers should also expect all the content in input_file are processed and ready to be consumed (that is, no partial output file is written). Since index.csv will be keeping updated during the process, please make sure there is no custom retention policy applied on the output bucket that may avoid file updating. (https://cloud.google.com/storage/docs/bucket-lock#retention-policy) The format of translations_file (for target language code 'trg') is: `gs://translation_test/a_b_c_'trg'_translations.[extension]` If the input file extension is tsv, the output has the following columns: Column 1: ID of the request provided in the input, if it's not provided in the input, then the input row number is used (0-based). Column 2: source sentence. Column 3: translation without applying a glossary. Empty string if there is an error. Column 4 (only present if a glossary is provided in the request): translation after applying the glossary. Empty string if there is an error applying the glossary. Could be same string as column 3 if there is no glossary applied. If input file extension is a txt or html, the translation is directly written to the output file. If glossary is requested, a separate glossary_translations_file has format of `gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]` The format of errors file (for target language code 'trg') is: `gs://translation_test/a_b_c_'trg'_errors.[extension]` If the input file extension is tsv, errors_file contains the following: Column 1: ID of the request provided in the input, if it's not provided in the input, then the input row number is used (0-based). Column 2: source sentence. Column 3: Error detail for the translation. Could be empty. Column 4 (only present if a glossary is provided in the request): Error when applying the glossary. If the input file extension is txt or html, glossary_error_file will be generated that contains error details. glossary_error_file has format of `gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]`" } }, "type": "object" diff --git a/translate/v3/translate-gen.go b/translate/v3/translate-gen.go index 2381c92eb8c..1e3322f8129 100644 --- a/translate/v3/translate-gen.go +++ b/translate/v3/translate-gen.go @@ -316,15 +316,16 @@ type BatchDocumentOutputConfig struct { // (https://cloud.google.com/storage/docs/bucket-lock#retention-policy) // The naming format of translation output files follows (for target // language code [trg]): `translation_output`: - // gs://translation_output/a_b_c_[trg]_translation.[extension] + // `gs://translation_output/a_b_c_[trg]_translation.[extension]` // `glossary_translation_output`: - // gs://translation_test/a_b_c_[trg]_glossary_translation.[extension] + // `gs://translation_test/a_b_c_[trg]_glossary_translation.[extension]`. // The output document will maintain the same file format as the input // document. The naming format of error output files follows (for target // language code [trg]): `error_output`: - // gs://translation_test/a_b_c_[trg]_errors.txt `glossary_error_output`: - // gs://translation_test/a_b_c_[trg]_glossary_translation.txt The error - // output is a txt file containing error details. + // `gs://translation_test/a_b_c_[trg]_errors.txt` + // `glossary_error_output`: + // `gs://translation_test/a_b_c_[trg]_glossary_translation.txt`. The + // error output is a txt file containing error details. GcsDestination *GcsDestination `json:"gcsDestination,omitempty"` // ForceSendFields is a list of field names (e.g. "GcsDestination") to @@ -817,21 +818,21 @@ type DocumentOutputConfig struct { // corresponds to the translated file's extension according to its mime // type. For a DocumentInputConfig.gcs_uri provided document, the output // file will have a name according to its URI. For example: an input - // file with URI: "gs://a/b/c.[extension]" stored in a gcs_destination + // file with URI: `gs://a/b/c.[extension]` stored in a gcs_destination // bucket with name "my_bucket" will have an output URI: - // "gs://my_bucket/a_b_c_[trg]_translations.[ext]", where - [trg] + // `gs://my_bucket/a_b_c_[trg]_translations.[ext]`, where - [trg] // corresponds to the translated file's language code, - [ext] // corresponds to the translated file's extension according to its mime // type. If the document was directly provided through the request, then // the output document will have the format: - // "gs://my_bucket/translated_document_[trg]_translations.[ext], where - - // [trg] corresponds to the translated file's language code, - [ext] + // `gs://my_bucket/translated_document_[trg]_translations.[ext]`, where + // - [trg] corresponds to the translated file's language code, - [ext] // corresponds to the translated file's extension according to its mime // type. If a glossary was provided, then the output URI for the // glossary translation will be equal to the default output URI but have // `glossary_translations` instead of `translations`. For the previous // example, its glossary URI would be: - // "gs://my_bucket/a_b_c_[trg]_glossary_translations.[ext]". Thus the + // `gs://my_bucket/a_b_c_[trg]_glossary_translations.[ext]`. Thus the // max number of output files will be 2 (Translated document, Glossary // translated document). Callers should expect no partial outputs. If // there is any error during document translation, no output will be @@ -1936,8 +1937,8 @@ type Operation struct { // `operations/{unique_id}`. Name string `json:"name,omitempty"` - // Response: The normal response of the operation in case of success. If - // the original method returns no data on success, such as `Delete`, the + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the // response is `google.protobuf.Empty`. If the original method is // standard `Get`/`Create`/`Update`, the response should be the // resource. For other methods, the response should have the type @@ -2015,9 +2016,9 @@ type OutputConfig struct { // applied. If input file extension is a txt or html, the translation is // directly written to the output file. If glossary is requested, a // separate glossary_translations_file has format of - // gs://translation_test/a_b_c_'trg'_glossary_translations.[extension] + // `gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]` // The format of errors file (for target language code 'trg') is: - // gs://translation_test/a_b_c_'trg'_errors.[extension] If the input + // `gs://translation_test/a_b_c_'trg'_errors.[extension]` If the input // file extension is tsv, errors_file contains the following: Column 1: // ID of the request provided in the input, if it's not provided in the // input, then the input row number is used (0-based). Column 2: source @@ -2026,7 +2027,7 @@ type OutputConfig struct { // Error when applying the glossary. If the input file extension is txt // or html, glossary_error_file will be generated that contains error // details. glossary_error_file has format of - // gs://translation_test/a_b_c_'trg'_glossary_errors.[extension] + // `gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]` GcsDestination *GcsDestination `json:"gcsDestination,omitempty"` // ForceSendFields is a list of field names (e.g. "GcsDestination") to diff --git a/translate/v3beta1/translate-api.json b/translate/v3beta1/translate-api.json index 4683b9a1a13..0d45dcdb507 100644 --- a/translate/v3beta1/translate-api.json +++ b/translate/v3beta1/translate-api.json @@ -744,7 +744,7 @@ } } }, - "revision": "20230714", + "revision": "20230808", "rootUrl": "https://translation.googleapis.com/", "schemas": { "BatchDocumentInputConfig": { @@ -764,7 +764,7 @@ "properties": { "gcsDestination": { "$ref": "GcsDestination", - "description": "Google Cloud Storage destination for output content. For every single input document (for example, gs://a/b/c.[extension]), we generate at most 2 * n output files. (n is the # of target_language_codes in the BatchTranslateDocumentRequest). While the input documents are being processed, we write/update an index file `index.csv` under `gcs_destination.output_uri_prefix` (for example, gs://translation_output/index.csv) The index file is generated/updated as new files are being translated. The format is: input_document,target_language_code,translation_output,error_output, glossary_translation_output,glossary_error_output `input_document` is one file we matched using gcs_source.input_uri. `target_language_code` is provided in the request. `translation_output` contains the translations. (details provided below) `error_output` contains the error message during processing of the file. Both translations_file and errors_file could be empty strings if we have no content to output. `glossary_translation_output` and `glossary_error_output` are the translated output/error when we apply glossaries. They could also be empty if we have no content to output. Once a row is present in index.csv, the input/output matching never changes. Callers should also expect all the content in input_file are processed and ready to be consumed (that is, no partial output file is written). Since index.csv will be keeping updated during the process, please make sure there is no custom retention policy applied on the output bucket that may avoid file updating. (https://cloud.google.com/storage/docs/bucket-lock#retention-policy) The naming format of translation output files follows (for target language code [trg]): `translation_output`: gs://translation_output/a_b_c_[trg]_translation.[extension] `glossary_translation_output`: gs://translation_test/a_b_c_[trg]_glossary_translation.[extension] The output document will maintain the same file format as the input document. The naming format of error output files follows (for target language code [trg]): `error_output`: gs://translation_test/a_b_c_[trg]_errors.txt `glossary_error_output`: gs://translation_test/a_b_c_[trg]_glossary_translation.txt The error output is a txt file containing error details." + "description": "Google Cloud Storage destination for output content. For every single input document (for example, gs://a/b/c.[extension]), we generate at most 2 * n output files. (n is the # of target_language_codes in the BatchTranslateDocumentRequest). While the input documents are being processed, we write/update an index file `index.csv` under `gcs_destination.output_uri_prefix` (for example, gs://translation_output/index.csv) The index file is generated/updated as new files are being translated. The format is: input_document,target_language_code,translation_output,error_output, glossary_translation_output,glossary_error_output `input_document` is one file we matched using gcs_source.input_uri. `target_language_code` is provided in the request. `translation_output` contains the translations. (details provided below) `error_output` contains the error message during processing of the file. Both translations_file and errors_file could be empty strings if we have no content to output. `glossary_translation_output` and `glossary_error_output` are the translated output/error when we apply glossaries. They could also be empty if we have no content to output. Once a row is present in index.csv, the input/output matching never changes. Callers should also expect all the content in input_file are processed and ready to be consumed (that is, no partial output file is written). Since index.csv will be keeping updated during the process, please make sure there is no custom retention policy applied on the output bucket that may avoid file updating. (https://cloud.google.com/storage/docs/bucket-lock#retention-policy) The naming format of translation output files follows (for target language code [trg]): `translation_output`: `gs://translation_output/a_b_c_[trg]_translation.[extension]` `glossary_translation_output`: `gs://translation_test/a_b_c_[trg]_glossary_translation.[extension]`. The output document will maintain the same file format as the input document. The naming format of error output files follows (for target language code [trg]): `error_output`: `gs://translation_test/a_b_c_[trg]_errors.txt` `glossary_error_output`: `gs://translation_test/a_b_c_[trg]_glossary_translation.txt` The error output is a txt file containing error details." } }, "type": "object" @@ -969,7 +969,7 @@ "properties": { "gcsDestination": { "$ref": "GcsDestination", - "description": "Optional. Google Cloud Storage destination for the translation output, e.g., `gs://my_bucket/my_directory/`. The destination directory provided does not have to be empty, but the bucket must exist. If a file with the same name as the output file already exists in the destination an error will be returned. For a DocumentInputConfig.contents provided document, the output file will have the name \"output_[trg]_translations.[ext]\", where - [trg] corresponds to the translated file's language code, - [ext] corresponds to the translated file's extension according to its mime type. For a DocumentInputConfig.gcs_uri provided document, the output file will have a name according to its URI. For example: an input file with URI: \"gs://a/b/c.[extension]\" stored in a gcs_destination bucket with name \"my_bucket\" will have an output URI: \"gs://my_bucket/a_b_c_[trg]_translations.[ext]\", where - [trg] corresponds to the translated file's language code, - [ext] corresponds to the translated file's extension according to its mime type. If the document was directly provided through the request, then the output document will have the format: \"gs://my_bucket/translated_document_[trg]_translations.[ext], where - [trg] corresponds to the translated file's language code, - [ext] corresponds to the translated file's extension according to its mime type. If a glossary was provided, then the output URI for the glossary translation will be equal to the default output URI but have `glossary_translations` instead of `translations`. For the previous example, its glossary URI would be: \"gs://my_bucket/a_b_c_[trg]_glossary_translations.[ext]\". Thus the max number of output files will be 2 (Translated document, Glossary translated document). Callers should expect no partial outputs. If there is any error during document translation, no output will be stored in the Cloud Storage bucket." + "description": "Optional. Google Cloud Storage destination for the translation output, e.g., `gs://my_bucket/my_directory/`. The destination directory provided does not have to be empty, but the bucket must exist. If a file with the same name as the output file already exists in the destination an error will be returned. For a DocumentInputConfig.contents provided document, the output file will have the name \"output_[trg]_translations.[ext]\", where - [trg] corresponds to the translated file's language code, - [ext] corresponds to the translated file's extension according to its mime type. For a DocumentInputConfig.gcs_uri provided document, the output file will have a name according to its URI. For example: an input file with URI: `gs://a/b/c.[extension]` stored in a gcs_destination bucket with name \"my_bucket\" will have an output URI: `gs://my_bucket/a_b_c_[trg]_translations.[ext]`, where - [trg] corresponds to the translated file's language code, - [ext] corresponds to the translated file's extension according to its mime type. If the document was directly provided through the request, then the output document will have the format: `gs://my_bucket/translated_document_[trg]_translations.[ext]`, where - [trg] corresponds to the translated file's language code, - [ext] corresponds to the translated file's extension according to its mime type. If a glossary was provided, then the output URI for the glossary translation will be equal to the default output URI but have `glossary_translations` instead of `translations`. For the previous example, its glossary URI would be: `gs://my_bucket/a_b_c_[trg]_glossary_translations.[ext]`. Thus the max number of output files will be 2 (Translated document, Glossary translated document). Callers should expect no partial outputs. If there is any error during document translation, no output will be stored in the Cloud Storage bucket." }, "mimeType": { "description": "Optional. Specifies the translated document's mime_type. If not specified, the translated file's mime type will be the same as the input file's mime type. Currently only support the output mime type to be the same as input mime type. - application/pdf - application/vnd.openxmlformats-officedocument.wordprocessingml.document - application/vnd.openxmlformats-officedocument.presentationml.presentation - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", @@ -1242,7 +1242,7 @@ "description": "Properties of the object. Contains field @type with type URL.", "type": "any" }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", "type": "object" } }, @@ -1254,7 +1254,7 @@ "properties": { "gcsDestination": { "$ref": "GcsDestination", - "description": "Google Cloud Storage destination for output content. For every single input file (for example, gs://a/b/c.[extension]), we generate at most 2 * n output files. (n is the # of target_language_codes in the BatchTranslateTextRequest). Output files (tsv) generated are compliant with RFC 4180 except that record delimiters are '\\n' instead of '\\r\\n'. We don't provide any way to change record delimiters. While the input files are being processed, we write/update an index file 'index.csv' under 'output_uri_prefix' (for example, gs://translation-test/index.csv) The index file is generated/updated as new files are being translated. The format is: input_file,target_language_code,translations_file,errors_file, glossary_translations_file,glossary_errors_file input_file is one file we matched using gcs_source.input_uri. target_language_code is provided in the request. translations_file contains the translations. (details provided below) errors_file contains the errors during processing of the file. (details below). Both translations_file and errors_file could be empty strings if we have no content to output. glossary_translations_file and glossary_errors_file are always empty strings if the input_file is tsv. They could also be empty if we have no content to output. Once a row is present in index.csv, the input/output matching never changes. Callers should also expect all the content in input_file are processed and ready to be consumed (that is, no partial output file is written). Since index.csv will be keeping updated during the process, please make sure there is no custom retention policy applied on the output bucket that may avoid file updating. (https://cloud.google.com/storage/docs/bucket-lock#retention-policy) The format of translations_file (for target language code 'trg') is: `gs://translation_test/a_b_c_'trg'_translations.[extension]` If the input file extension is tsv, the output has the following columns: Column 1: ID of the request provided in the input, if it's not provided in the input, then the input row number is used (0-based). Column 2: source sentence. Column 3: translation without applying a glossary. Empty string if there is an error. Column 4 (only present if a glossary is provided in the request): translation after applying the glossary. Empty string if there is an error applying the glossary. Could be same string as column 3 if there is no glossary applied. If input file extension is a txt or html, the translation is directly written to the output file. If glossary is requested, a separate glossary_translations_file has format of gs://translation_test/a_b_c_'trg'_glossary_translations.[extension] The format of errors file (for target language code 'trg') is: gs://translation_test/a_b_c_'trg'_errors.[extension] If the input file extension is tsv, errors_file contains the following: Column 1: ID of the request provided in the input, if it's not provided in the input, then the input row number is used (0-based). Column 2: source sentence. Column 3: Error detail for the translation. Could be empty. Column 4 (only present if a glossary is provided in the request): Error when applying the glossary. If the input file extension is txt or html, glossary_error_file will be generated that contains error details. glossary_error_file has format of gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]" + "description": "Google Cloud Storage destination for output content. For every single input file (for example, gs://a/b/c.[extension]), we generate at most 2 * n output files. (n is the # of target_language_codes in the BatchTranslateTextRequest). Output files (tsv) generated are compliant with RFC 4180 except that record delimiters are '\\n' instead of '\\r\\n'. We don't provide any way to change record delimiters. While the input files are being processed, we write/update an index file 'index.csv' under 'output_uri_prefix' (for example, gs://translation-test/index.csv) The index file is generated/updated as new files are being translated. The format is: input_file,target_language_code,translations_file,errors_file, glossary_translations_file,glossary_errors_file input_file is one file we matched using gcs_source.input_uri. target_language_code is provided in the request. translations_file contains the translations. (details provided below) errors_file contains the errors during processing of the file. (details below). Both translations_file and errors_file could be empty strings if we have no content to output. glossary_translations_file and glossary_errors_file are always empty strings if the input_file is tsv. They could also be empty if we have no content to output. Once a row is present in index.csv, the input/output matching never changes. Callers should also expect all the content in input_file are processed and ready to be consumed (that is, no partial output file is written). Since index.csv will be keeping updated during the process, please make sure there is no custom retention policy applied on the output bucket that may avoid file updating. (https://cloud.google.com/storage/docs/bucket-lock#retention-policy) The format of translations_file (for target language code 'trg') is: `gs://translation_test/a_b_c_'trg'_translations.[extension]` If the input file extension is tsv, the output has the following columns: Column 1: ID of the request provided in the input, if it's not provided in the input, then the input row number is used (0-based). Column 2: source sentence. Column 3: translation without applying a glossary. Empty string if there is an error. Column 4 (only present if a glossary is provided in the request): translation after applying the glossary. Empty string if there is an error applying the glossary. Could be same string as column 3 if there is no glossary applied. If input file extension is a txt or html, the translation is directly written to the output file. If glossary is requested, a separate glossary_translations_file has format of `gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]` The format of errors file (for target language code 'trg') is: `gs://translation_test/a_b_c_'trg'_errors.[extension]` If the input file extension is tsv, errors_file contains the following: Column 1: ID of the request provided in the input, if it's not provided in the input, then the input row number is used (0-based). Column 2: source sentence. Column 3: Error detail for the translation. Could be empty. Column 4 (only present if a glossary is provided in the request): Error when applying the glossary. If the input file extension is txt or html, glossary_error_file will be generated that contains error details. glossary_error_file has format of `gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]`" } }, "type": "object" diff --git a/translate/v3beta1/translate-gen.go b/translate/v3beta1/translate-gen.go index 8c4c42ba698..b9d406bd0cd 100644 --- a/translate/v3beta1/translate-gen.go +++ b/translate/v3beta1/translate-gen.go @@ -268,15 +268,16 @@ type BatchDocumentOutputConfig struct { // (https://cloud.google.com/storage/docs/bucket-lock#retention-policy) // The naming format of translation output files follows (for target // language code [trg]): `translation_output`: - // gs://translation_output/a_b_c_[trg]_translation.[extension] + // `gs://translation_output/a_b_c_[trg]_translation.[extension]` // `glossary_translation_output`: - // gs://translation_test/a_b_c_[trg]_glossary_translation.[extension] + // `gs://translation_test/a_b_c_[trg]_glossary_translation.[extension]`. // The output document will maintain the same file format as the input // document. The naming format of error output files follows (for target // language code [trg]): `error_output`: - // gs://translation_test/a_b_c_[trg]_errors.txt `glossary_error_output`: - // gs://translation_test/a_b_c_[trg]_glossary_translation.txt The error - // output is a txt file containing error details. + // `gs://translation_test/a_b_c_[trg]_errors.txt` + // `glossary_error_output`: + // `gs://translation_test/a_b_c_[trg]_glossary_translation.txt` The + // error output is a txt file containing error details. GcsDestination *GcsDestination `json:"gcsDestination,omitempty"` // ForceSendFields is a list of field names (e.g. "GcsDestination") to @@ -642,21 +643,21 @@ type DocumentOutputConfig struct { // corresponds to the translated file's extension according to its mime // type. For a DocumentInputConfig.gcs_uri provided document, the output // file will have a name according to its URI. For example: an input - // file with URI: "gs://a/b/c.[extension]" stored in a gcs_destination + // file with URI: `gs://a/b/c.[extension]` stored in a gcs_destination // bucket with name "my_bucket" will have an output URI: - // "gs://my_bucket/a_b_c_[trg]_translations.[ext]", where - [trg] + // `gs://my_bucket/a_b_c_[trg]_translations.[ext]`, where - [trg] // corresponds to the translated file's language code, - [ext] // corresponds to the translated file's extension according to its mime // type. If the document was directly provided through the request, then // the output document will have the format: - // "gs://my_bucket/translated_document_[trg]_translations.[ext], where - - // [trg] corresponds to the translated file's language code, - [ext] + // `gs://my_bucket/translated_document_[trg]_translations.[ext]`, where + // - [trg] corresponds to the translated file's language code, - [ext] // corresponds to the translated file's extension according to its mime // type. If a glossary was provided, then the output URI for the // glossary translation will be equal to the default output URI but have // `glossary_translations` instead of `translations`. For the previous // example, its glossary URI would be: - // "gs://my_bucket/a_b_c_[trg]_glossary_translations.[ext]". Thus the + // `gs://my_bucket/a_b_c_[trg]_glossary_translations.[ext]`. Thus the // max number of output files will be 2 (Translated document, Glossary // translated document). Callers should expect no partial outputs. If // there is any error during document translation, no output will be @@ -1208,8 +1209,8 @@ type Operation struct { // `operations/{unique_id}`. Name string `json:"name,omitempty"` - // Response: The normal response of the operation in case of success. If - // the original method returns no data on success, such as `Delete`, the + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the // response is `google.protobuf.Empty`. If the original method is // standard `Get`/`Create`/`Update`, the response should be the // resource. For other methods, the response should have the type @@ -1287,9 +1288,9 @@ type OutputConfig struct { // applied. If input file extension is a txt or html, the translation is // directly written to the output file. If glossary is requested, a // separate glossary_translations_file has format of - // gs://translation_test/a_b_c_'trg'_glossary_translations.[extension] + // `gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]` // The format of errors file (for target language code 'trg') is: - // gs://translation_test/a_b_c_'trg'_errors.[extension] If the input + // `gs://translation_test/a_b_c_'trg'_errors.[extension]` If the input // file extension is tsv, errors_file contains the following: Column 1: // ID of the request provided in the input, if it's not provided in the // input, then the input row number is used (0-based). Column 2: source @@ -1298,7 +1299,7 @@ type OutputConfig struct { // Error when applying the glossary. If the input file extension is txt // or html, glossary_error_file will be generated that contains error // details. glossary_error_file has format of - // gs://translation_test/a_b_c_'trg'_glossary_errors.[extension] + // `gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]` GcsDestination *GcsDestination `json:"gcsDestination,omitempty"` // ForceSendFields is a list of field names (e.g. "GcsDestination") to diff --git a/vision/v1/vision-api.json b/vision/v1/vision-api.json index 0df98926814..070aa2bad7a 100644 --- a/vision/v1/vision-api.json +++ b/vision/v1/vision-api.json @@ -1282,7 +1282,7 @@ } } }, - "revision": "20230710", + "revision": "20230804", "rootUrl": "https://vision.googleapis.com/", "schemas": { "AddProductToProductSetRequest": { @@ -8622,7 +8622,7 @@ "description": "Properties of the object. Contains field @type with type URL.", "type": "any" }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", "type": "object" } }, diff --git a/vision/v1/vision-gen.go b/vision/v1/vision-gen.go index 0d6ad0079a2..06714924845 100644 --- a/vision/v1/vision-gen.go +++ b/vision/v1/vision-gen.go @@ -12573,8 +12573,8 @@ type Operation struct { // `operations/{unique_id}`. Name string `json:"name,omitempty"` - // Response: The normal response of the operation in case of success. If - // the original method returns no data on success, such as `Delete`, the + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the // response is `google.protobuf.Empty`. If the original method is // standard `Get`/`Create`/`Update`, the response should be the // resource. For other methods, the response should have the type diff --git a/vision/v1p1beta1/vision-api.json b/vision/v1p1beta1/vision-api.json index 7ab9db763f6..f19f42dc3a1 100644 --- a/vision/v1p1beta1/vision-api.json +++ b/vision/v1p1beta1/vision-api.json @@ -449,7 +449,7 @@ } } }, - "revision": "20230710", + "revision": "20230804", "rootUrl": "https://vision.googleapis.com/", "schemas": { "AnnotateFileResponse": { @@ -7707,7 +7707,7 @@ "description": "Properties of the object. Contains field @type with type URL.", "type": "any" }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", "type": "object" } }, diff --git a/vision/v1p1beta1/vision-gen.go b/vision/v1p1beta1/vision-gen.go index 3847616b7a9..9daad15cde2 100644 --- a/vision/v1p1beta1/vision-gen.go +++ b/vision/v1p1beta1/vision-gen.go @@ -12271,8 +12271,8 @@ type Operation struct { // `operations/{unique_id}`. Name string `json:"name,omitempty"` - // Response: The normal response of the operation in case of success. If - // the original method returns no data on success, such as `Delete`, the + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the // response is `google.protobuf.Empty`. If the original method is // standard `Get`/`Create`/`Update`, the response should be the // resource. For other methods, the response should have the type diff --git a/vision/v1p2beta1/vision-api.json b/vision/v1p2beta1/vision-api.json index 2f880aad34d..c650e686155 100644 --- a/vision/v1p2beta1/vision-api.json +++ b/vision/v1p2beta1/vision-api.json @@ -449,7 +449,7 @@ } } }, - "revision": "20230710", + "revision": "20230804", "rootUrl": "https://vision.googleapis.com/", "schemas": { "AnnotateFileResponse": { @@ -7707,7 +7707,7 @@ "description": "Properties of the object. Contains field @type with type URL.", "type": "any" }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", "type": "object" } }, diff --git a/vision/v1p2beta1/vision-gen.go b/vision/v1p2beta1/vision-gen.go index 7a0e3ca7ab3..5d6d7a53e6e 100644 --- a/vision/v1p2beta1/vision-gen.go +++ b/vision/v1p2beta1/vision-gen.go @@ -12271,8 +12271,8 @@ type Operation struct { // `operations/{unique_id}`. Name string `json:"name,omitempty"` - // Response: The normal response of the operation in case of success. If - // the original method returns no data on success, such as `Delete`, the + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the // response is `google.protobuf.Empty`. If the original method is // standard `Get`/`Create`/`Update`, the response should be the // resource. For other methods, the response should have the type diff --git a/vmmigration/v1/vmmigration-api.json b/vmmigration/v1/vmmigration-api.json index 98704733271..0f3281dedf8 100644 --- a/vmmigration/v1/vmmigration-api.json +++ b/vmmigration/v1/vmmigration-api.json @@ -1972,7 +1972,7 @@ } } }, - "revision": "20230727", + "revision": "20230803", "rootUrl": "https://vmmigration.googleapis.com/", "schemas": { "AccessKeyCredentials": { @@ -2204,6 +2204,24 @@ "The firmware is BIOS." ], "type": "string" + }, + "vmCapabilities": { + "description": "Output only. Unordered list. List of VM certain capabilities needed for some Compute Engine features.", + "items": { + "enum": [ + "VM_CAPABILITY_UNSPECIFIED", + "VM_CAPABILITY_NVME_STORAGE_ACCESS", + "VM_CAPABILITY_GVNIC_NETWORK_INTERFACE" + ], + "enumDescriptions": [ + "Unknown capability.", + "NVMe driver install and the VM can use NVMe PD or local SSD.", + "gVNIC virtual NIC driver supported." + ], + "type": "string" + }, + "readOnly": true, + "type": "array" } }, "type": "object" @@ -3825,7 +3843,7 @@ "description": "Properties of the object. Contains field @type with type URL.", "type": "any" }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", "type": "object" } }, diff --git a/vmmigration/v1/vmmigration-gen.go b/vmmigration/v1/vmmigration-gen.go index 32c86905233..73629683b2a 100644 --- a/vmmigration/v1/vmmigration-gen.go +++ b/vmmigration/v1/vmmigration-gen.go @@ -614,6 +614,17 @@ type AwsSourceVmDetails struct { // "BIOS" - The firmware is BIOS. Firmware string `json:"firmware,omitempty"` + // VmCapabilities: Output only. Unordered list. List of VM certain + // capabilities needed for some Compute Engine features. + // + // Possible values: + // "VM_CAPABILITY_UNSPECIFIED" - Unknown capability. + // "VM_CAPABILITY_NVME_STORAGE_ACCESS" - NVMe driver install and the + // VM can use NVMe PD or local SSD. + // "VM_CAPABILITY_GVNIC_NETWORK_INTERFACE" - gVNIC virtual NIC driver + // supported. + VmCapabilities []string `json:"vmCapabilities,omitempty"` + // ForceSendFields is a list of field names (e.g. // "CommittedStorageBytes") to unconditionally include in API requests. // By default, fields with empty or default values are omitted from API @@ -2575,8 +2586,8 @@ type Operation struct { // `operations/{unique_id}`. Name string `json:"name,omitempty"` - // Response: The normal response of the operation in case of success. If - // the original method returns no data on success, such as `Delete`, the + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the // response is `google.protobuf.Empty`. If the original method is // standard `Get`/`Create`/`Update`, the response should be the // resource. For other methods, the response should have the type diff --git a/workstations/v1beta/workstations-api.json b/workstations/v1beta/workstations-api.json index 6d4a6bd7a3d..a57b49a96a4 100644 --- a/workstations/v1beta/workstations-api.json +++ b/workstations/v1beta/workstations-api.json @@ -251,7 +251,7 @@ "type": "string" }, "validateOnly": { - "description": "If set, validate the request and preview the review, but do not actually apply it.", + "description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", "location": "query", "type": "boolean" }, @@ -282,12 +282,12 @@ ], "parameters": { "etag": { - "description": "If set, the request will be rejected if the latest version of the workstation cluster on the server does not have this ETag.", + "description": "Optional. If set, the request will be rejected if the latest version of the workstation cluster on the server does not have this ETag.", "location": "query", "type": "string" }, "force": { - "description": "If set, any workstation configurations and workstations in the workstation cluster are also deleted. Otherwise, the request only works if the workstation cluster has no configurations or workstations.", + "description": "Optional. If set, any workstation configurations and workstations in the workstation cluster are also deleted. Otherwise, the request only works if the workstation cluster has no configurations or workstations.", "location": "query", "type": "boolean" }, @@ -299,7 +299,7 @@ "type": "string" }, "validateOnly": { - "description": "If set, validate the request and preview the review, but do not apply it.", + "description": "Optional. If set, validate the request and preview the review, but do not apply it.", "location": "query", "type": "boolean" } @@ -347,13 +347,13 @@ ], "parameters": { "pageSize": { - "description": "Maximum number of items to return.", + "description": "Optional. Maximum number of items to return.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "next_page_token value returned from a previous List request, if any.", + "description": "Optional. next_page_token value returned from a previous List request, if any.", "location": "query", "type": "string" }, @@ -383,12 +383,12 @@ ], "parameters": { "allowMissing": { - "description": "If set, and the workstation cluster is not found, a new workstation cluster will be created. In this situation, update_mask is ignored.", + "description": "Optional. If set, and the workstation cluster is not found, a new workstation cluster will be created. In this situation, update_mask is ignored.", "location": "query", "type": "boolean" }, "name": { - "description": "Full name of this resource.", + "description": "Full name of this workstation cluster.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+$", "required": true, @@ -401,7 +401,7 @@ "type": "string" }, "validateOnly": { - "description": "If set, validate the request and preview the review, but do not actually apply it.", + "description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", "location": "query", "type": "boolean" } @@ -438,7 +438,7 @@ "type": "string" }, "validateOnly": { - "description": "If set, validate the request and preview the review, but do not actually apply it.", + "description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", "location": "query", "type": "boolean" }, @@ -469,12 +469,12 @@ ], "parameters": { "etag": { - "description": "If set, the request is rejected if the latest version of the workstation configuration on the server does not have this ETag.", + "description": "Optional. If set, the request is rejected if the latest version of the workstation configuration on the server does not have this ETag.", "location": "query", "type": "string" }, "force": { - "description": "If set, any workstations in the workstation configuration are also deleted. Otherwise, the request works only if the workstation configuration has no workstations.", + "description": "Optional. If set, any workstations in the workstation configuration are also deleted. Otherwise, the request works only if the workstation configuration has no workstations.", "location": "query", "type": "boolean" }, @@ -486,7 +486,7 @@ "type": "string" }, "validateOnly": { - "description": "If set, validate the request and preview the review, but do not actually apply it.", + "description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", "location": "query", "type": "boolean" } @@ -565,13 +565,13 @@ ], "parameters": { "pageSize": { - "description": "Maximum number of items to return.", + "description": "Optional. Maximum number of items to return.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "next_page_token value returned from a previous List request, if any.", + "description": "Optional. next_page_token value returned from a previous List request, if any.", "location": "query", "type": "string" }, @@ -601,13 +601,13 @@ ], "parameters": { "pageSize": { - "description": "Maximum number of items to return.", + "description": "Optional. Maximum number of items to return.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "next_page_token value returned from a previous List request, if any.", + "description": "Optional. next_page_token value returned from a previous List request, if any.", "location": "query", "type": "string" }, @@ -637,12 +637,12 @@ ], "parameters": { "allowMissing": { - "description": "If set and the workstation configuration is not found, a new workstation configuration will be created. In this situation, update_mask is ignored.", + "description": "Optional. If set and the workstation configuration is not found, a new workstation configuration will be created. In this situation, update_mask is ignored.", "location": "query", "type": "boolean" }, "name": { - "description": "Full name of this resource.", + "description": "Full name of this workstation configuration.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", "required": true, @@ -655,7 +655,7 @@ "type": "string" }, "validateOnly": { - "description": "If set, validate the request and preview the review, but do not actually apply it.", + "description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", "location": "query", "type": "boolean" } @@ -748,7 +748,7 @@ "type": "string" }, "validateOnly": { - "description": "If set, validate the request and preview the review, but do not actually apply it.", + "description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", "location": "query", "type": "boolean" }, @@ -779,7 +779,7 @@ ], "parameters": { "etag": { - "description": "If set, the request will be rejected if the latest version of the workstation on the server does not have this ETag.", + "description": "Optional. If set, the request will be rejected if the latest version of the workstation on the server does not have this ETag.", "location": "query", "type": "string" }, @@ -791,7 +791,7 @@ "type": "string" }, "validateOnly": { - "description": "If set, validate the request and preview the review, but do not actually apply it.", + "description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", "location": "query", "type": "boolean" } @@ -898,13 +898,13 @@ ], "parameters": { "pageSize": { - "description": "Maximum number of items to return.", + "description": "Optional. Maximum number of items to return.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "next_page_token value returned from a previous List request, if any.", + "description": "Optional. next_page_token value returned from a previous List request, if any.", "location": "query", "type": "string" }, @@ -934,13 +934,13 @@ ], "parameters": { "pageSize": { - "description": "Maximum number of items to return.", + "description": "Optional. Maximum number of items to return.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "next_page_token value returned from a previous List request, if any.", + "description": "Optional. next_page_token value returned from a previous List request, if any.", "location": "query", "type": "string" }, @@ -970,12 +970,12 @@ ], "parameters": { "allowMissing": { - "description": "If set and the workstation configuration is not found, a new workstation configuration is created. In this situation, update_mask is ignored.", + "description": "Optional. If set and the workstation configuration is not found, a new workstation configuration is created. In this situation, update_mask is ignored.", "location": "query", "type": "boolean" }, "name": { - "description": "Full name of this resource.", + "description": "Full name of this workstation.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", "required": true, @@ -988,7 +988,7 @@ "type": "string" }, "validateOnly": { - "description": "If set, validate the request and preview the review, but do not actually apply it.", + "description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", "location": "query", "type": "boolean" } @@ -1127,7 +1127,7 @@ } } }, - "revision": "20230619", + "revision": "20230802", "rootUrl": "https://workstations.googleapis.com/", "schemas": { "Accelerator": { @@ -1135,12 +1135,12 @@ "id": "Accelerator", "properties": { "count": { - "description": "Number of accelerator cards exposed to the instance.", + "description": "Optional. Number of accelerator cards exposed to the instance.", "format": "int32", "type": "integer" }, "type": { - "description": "Type of accelerator resource to attach to the instance, for example, \"nvidia-tesla-p100\".", + "description": "Optional. Type of accelerator resource to attach to the instance, for example, `\"nvidia-tesla-p100\"`.", "type": "string" } }, @@ -1227,14 +1227,14 @@ "id": "Container", "properties": { "args": { - "description": "Arguments passed to the entrypoint.", + "description": "Optional. Arguments passed to the entrypoint.", "items": { "type": "string" }, "type": "array" }, "command": { - "description": "If set, overrides the default ENTRYPOINT specified by the image.", + "description": "Optional. If set, overrides the default ENTRYPOINT specified by the image.", "items": { "type": "string" }, @@ -1244,20 +1244,20 @@ "additionalProperties": { "type": "string" }, - "description": "Environment variables passed to the container's entrypoint.", + "description": "Optional. Environment variables passed to the container's entrypoint.", "type": "object" }, "image": { - "description": "A Docker container image that defines a custom environment. Cloud Workstations provides a number of [preconfigured images](https://cloud.google.com/workstations/docs/preconfigured-base-images), but you can create your own [custom container images](https://cloud.google.com/workstations/docs/custom-container-images). If using a private image, the `host.gceInstance.serviceAccount` field must be specified in the workstation configuration and must have permission to pull the specified image. Otherwise, the image must be publicly accessible.", + "description": "Optional. A Docker container image that defines a custom environment. Cloud Workstations provides a number of [preconfigured images](https://cloud.google.com/workstations/docs/preconfigured-base-images), but you can create your own [custom container images](https://cloud.google.com/workstations/docs/custom-container-images). If using a private image, the `host.gceInstance.serviceAccount` field must be specified in the workstation configuration and must have permission to pull the specified image. Otherwise, the image must be publicly accessible.", "type": "string" }, "runAsUser": { - "description": "If set, overrides the USER specified in the image with the given uid.", + "description": "Optional. If set, overrides the USER specified in the image with the given uid.", "format": "int32", "type": "integer" }, "workingDir": { - "description": "If set, overrides the default DIR specified by the image.", + "description": "Optional. If set, overrides the default DIR specified by the image.", "type": "string" } }, @@ -1268,7 +1268,7 @@ "id": "CustomerEncryptionKey", "properties": { "kmsKey": { - "description": "Immutable. The name of the Google Cloud KMS encryption key. For example, `projects/PROJECT_ID/locations/REGION/keyRings/KEY_RING/cryptoKeys/KEY_NAME`. The key must be in the same region as the workstation configuration.", + "description": "Immutable. The name of the Google Cloud KMS encryption key. For example, `\"projects/PROJECT_ID/locations/REGION/keyRings/KEY_RING/cryptoKeys/KEY_NAME\"`. The key must be in the same region as the workstation configuration.", "type": "string" }, "kmsKeyServiceAccount": { @@ -1306,7 +1306,7 @@ "id": "GceConfidentialInstanceConfig", "properties": { "enableConfidentialCompute": { - "description": "Whether the instance has confidential compute enabled.", + "description": "Optional. Whether the instance has confidential compute enabled.", "type": "boolean" } }, @@ -1317,35 +1317,35 @@ "id": "GceInstance", "properties": { "accelerators": { - "description": "A list of the type and count of accelerator cards attached to the instance.", + "description": "Optional. A list of the type and count of accelerator cards attached to the instance.", "items": { "$ref": "Accelerator" }, "type": "array" }, "bootDiskSizeGb": { - "description": "The size of the boot disk for the VM in gigabytes (GB). The minimum boot disk size is `30` GB. Defaults to `50` GB.", + "description": "Optional. The size of the boot disk for the VM in gigabytes (GB). The minimum boot disk size is `30` GB. Defaults to `50` GB.", "format": "int32", "type": "integer" }, "confidentialInstanceConfig": { "$ref": "GceConfidentialInstanceConfig", - "description": "A set of Compute Engine Confidential VM instance options." + "description": "Optional. A set of Compute Engine Confidential VM instance options." }, "disablePublicIpAddresses": { - "description": "When set to true, disables public IP addresses for VMs. If you disable public IP addresses, you must set up Private Google Access or Cloud NAT on your network. If you use Private Google Access and you use `private.googleapis.com` or `restricted.googleapis.com` for Container Registry and Artifact Registry, make sure that you set up DNS records for domains `*.gcr.io` and `*.pkg.dev`. Defaults to false (VMs have public IP addresses).", + "description": "Optional. When set to true, disables public IP addresses for VMs. If you disable public IP addresses, you must set up Private Google Access or Cloud NAT on your network. If you use Private Google Access and you use `private.googleapis.com` or `restricted.googleapis.com` for Container Registry and Artifact Registry, make sure that you set up DNS records for domains `*.gcr.io` and `*.pkg.dev`. Defaults to false (VMs have public IP addresses).", "type": "boolean" }, "enableNestedVirtualization": { - "description": "Whether to enable nested virtualization on instances.", + "description": "Optional. Whether to enable nested virtualization on Cloud Workstations VMs created under this workstation configuration. Nested virtualization lets you run virtual machine (VM) instances inside your workstation. Before enabling nested virtualization, consider the following important considerations. Cloud Workstations instances are subject to the [same restrictions as Compute Engine instances](https://cloud.google.com/compute/docs/instances/nested-virtualization/overview#restrictions): * **Organization policy**: projects, folders, or organizations may be restricted from creating nested VMs if the **Disable VM nested virtualization** constraint is enforced in the organization policy. For more information, see the Compute Engine section, [Checking whether nested virtualization is allowed](https://cloud.google.com/compute/docs/instances/nested-virtualization/managing-constraint#checking_whether_nested_virtualization_is_allowed). * **Performance**: nested VMs might experience a 10% or greater decrease in performance for workloads that are CPU-bound and possibly greater than a 10% decrease for workloads that are input/output bound. * **Machine Type**: nested virtualization can only be enabled on workstation configurations that specify a machine_type in the N1 or N2 machine series. * **GPUs**: nested virtualization may not be enabled on workstation configurations with accelerators. * **Operating System**: Because [Container-Optimized OS](https://cloud.google.com/compute/docs/images/os-details#container-optimized_os_cos) does not support nested virtualization, when nested virtualization is enabled, the underlying Compute Engine VM instances boot from an [Ubuntu LTS](https://cloud.google.com/compute/docs/images/os-details#ubuntu_lts) image.", "type": "boolean" }, "machineType": { - "description": "The type of machine to use for VM instances—for example, `e2-standard-4`. For more information about machine types that Cloud Workstations supports, see the list of [available machine types](https://cloud.google.com/workstations/docs/available-machine-types).", + "description": "Optional. The type of machine to use for VM instances—for example, `\"e2-standard-4\"`. For more information about machine types that Cloud Workstations supports, see the list of [available machine types](https://cloud.google.com/workstations/docs/available-machine-types).", "type": "string" }, "poolSize": { - "description": "The number of VMs that the system should keep idle so that new workstations can be started quickly for new users. Defaults to `0` in the API.", + "description": "Optional. The number of VMs that the system should keep idle so that new workstations can be started quickly for new users. Defaults to `0` in the API.", "format": "int32", "type": "integer" }, @@ -1356,15 +1356,15 @@ "type": "integer" }, "serviceAccount": { - "description": "The email address of the service account for Cloud Workstations VMs created with this configuration. When specified, be sure that the service account has `logginglogEntries.create` permission on the project so it can write logs out to Cloud Logging. If using a custom container image, the service account must have permissions to pull the specified image. If you as the administrator want to be able to `ssh` into the underlying VM, you need to set this value to a service account for which you have the `iam.serviceAccounts.actAs` permission. Conversely, if you don't want anyone to be able to `ssh` into the underlying VM, use a service account where no one has that permission. If not set, VMs run with a service account provided by the Cloud Workstations service, and the image must be publicly accessible.", + "description": "Optional. The email address of the service account for Cloud Workstations VMs created with this configuration. When specified, be sure that the service account has `logginglogEntries.create` permission on the project so it can write logs out to Cloud Logging. If using a custom container image, the service account must have permissions to pull the specified image. If you as the administrator want to be able to `ssh` into the underlying VM, you need to set this value to a service account for which you have the `iam.serviceAccounts.actAs` permission. Conversely, if you don't want anyone to be able to `ssh` into the underlying VM, use a service account where no one has that permission. If not set, VMs run with a service account provided by the Cloud Workstations service, and the image must be publicly accessible.", "type": "string" }, "shieldedInstanceConfig": { "$ref": "GceShieldedInstanceConfig", - "description": "A set of Compute Engine Shielded instance options." + "description": "Optional. A set of Compute Engine Shielded instance options." }, "tags": { - "description": "Network tags to add to the Compute Engine machines backing the workstations. This option applies [network tags](https://cloud.google.com/vpc/docs/add-remove-network-tags) to VMs created with this configuration. These network tags enable the creation of [firewall rules](https://cloud.google.com/workstations/docs/configure-firewall-rules).", + "description": "Optional. Network tags to add to the Compute Engine VMs backing the workstations. This option applies [network tags](https://cloud.google.com/vpc/docs/add-remove-network-tags) to VMs created with this configuration. These network tags enable the creation of [firewall rules](https://cloud.google.com/workstations/docs/configure-firewall-rules).", "items": { "type": "string" }, @@ -1374,19 +1374,19 @@ "type": "object" }, "GceRegionalPersistentDisk": { - "description": "A PersistentDirectory backed by a Compute Engine regional persistent disk. The `persistentDirectories[]` field is repeated, but it may contain only one entry. It creates a [persistent disk](https://cloud.google.com/compute/docs/disks/persistent-disks) that mounts to the workstation VM at `/home` when the session starts and detaches when the session ends. If this field is empty, workstations created with this configuration do not have a persistent home directory.", + "description": "A PersistentDirectory backed by a Compute Engine regional persistent disk. The persistent_directories field is repeated, but it may contain only one entry. It creates a [persistent disk](https://cloud.google.com/compute/docs/disks/persistent-disks) that mounts to the workstation VM at `/home` when the session starts and detaches when the session ends. If this field is empty, workstations created with this configuration do not have a persistent home directory.", "id": "GceRegionalPersistentDisk", "properties": { "diskType": { - "description": "The [type of the persistent disk](https://cloud.google.com/compute/docs/disks#disk-types) for the home directory. Defaults to `pd-standard`.", + "description": "Optional. The [type of the persistent disk](https://cloud.google.com/compute/docs/disks#disk-types) for the home directory. Defaults to `\"pd-standard\"`.", "type": "string" }, "fsType": { - "description": "Type of file system that the disk should be formatted with. The workstation image must support this file system type. Must be empty if source_snapshot is set. Defaults to `ext4`.", + "description": "Optional. Type of file system that the disk should be formatted with. The workstation image must support this file system type. Must be empty if source_snapshot is set. Defaults to `\"ext4\"`.", "type": "string" }, "reclaimPolicy": { - "description": "Whether the persistent disk should be deleted when the workstation is deleted. Valid values are `DELETE` and `RETAIN`. Defaults to `DELETE`.", + "description": "Optional. Whether the persistent disk should be deleted when the workstation is deleted. Valid values are `DELETE` and `RETAIN`. Defaults to `DELETE`.", "enum": [ "RECLAIM_POLICY_UNSPECIFIED", "DELETE", @@ -1400,12 +1400,12 @@ "type": "string" }, "sizeGb": { - "description": "The GB capacity of a persistent home directory for each workstation created with this configuration. Must be empty if `source_snapshot` is set. Valid values are `10`, `50`, `100`, `200`, `500`, or `1000`. Defaults to `200`. If less than `200` GB, the `diskType` must be `pd-balanced` or `pd-ssd`.", + "description": "Optional. The GB capacity of a persistent home directory for each workstation created with this configuration. Must be empty if source_snapshot is set. Valid values are `10`, `50`, `100`, `200`, `500`, or `1000`. Defaults to `200`. If less than `200` GB, the disk_type must be `\"pd-balanced\"` or `\"pd-ssd\"`.", "format": "int32", "type": "integer" }, "sourceSnapshot": { - "description": "Name of the snapshot to use as the source for the disk. If set, size_gb and fs_type must be empty.", + "description": "Optional. Name of the snapshot to use as the source for the disk. If set, size_gb and fs_type must be empty.", "type": "string" } }, @@ -1416,15 +1416,15 @@ "id": "GceShieldedInstanceConfig", "properties": { "enableIntegrityMonitoring": { - "description": "Whether the instance has integrity monitoring enabled.", + "description": "Optional. Whether the instance has integrity monitoring enabled.", "type": "boolean" }, "enableSecureBoot": { - "description": "Whether the instance has Secure Boot enabled.", + "description": "Optional. Whether the instance has Secure Boot enabled.", "type": "boolean" }, "enableVtpm": { - "description": "Whether the instance has the vTPM enabled.", + "description": "Optional. Whether the instance has the vTPM enabled.", "type": "boolean" } }, @@ -1603,11 +1603,11 @@ "id": "ListWorkstationsResponse", "properties": { "nextPageToken": { - "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", + "description": "Optional. Token to retrieve the next page of results, or empty if there are no more results in the list.", "type": "string" }, "unreachable": { - "description": "Unreachable resources.", + "description": "Optional. Unreachable resources.", "items": { "type": "string" }, @@ -1652,7 +1652,7 @@ "description": "Properties of the object. Contains field @type with type URL.", "type": "any" }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", "type": "object" } }, @@ -1711,14 +1711,14 @@ "description": "A PersistentDirectory backed by a Compute Engine persistent disk." }, "mountPath": { - "description": "Location of this directory in the running workstation.", + "description": "Optional. Location of this directory in the running workstation.", "type": "string" } }, "type": "object" }, "Policy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", "properties": { "auditConfigs": { @@ -1749,18 +1749,18 @@ "type": "object" }, "PrivateClusterConfig": { - "description": "Configuration options for private clusters.", + "description": "Configuration options for private workstation clusters.", "id": "PrivateClusterConfig", "properties": { "allowedProjects": { - "description": "Additional projects that are allowed to attach to the workstation cluster's service attachment. By default, the workstation cluster's project and the VPC host project (if different) are allowed.", + "description": "Optional. Additional projects that are allowed to attach to the workstation cluster's service attachment. By default, the workstation cluster's project and the VPC host project (if different) are allowed.", "items": { "type": "string" }, "type": "array" }, "clusterHostname": { - "description": "Output only. Hostname for the workstation cluster. This field will be populated only when private endpoint is enabled. To access workstations in the cluster, create a new DNS zone mapping this domain name to an internal IP address and a forwarding rule mapping that address to the service attachment.", + "description": "Output only. Hostname for the workstation cluster. This field will be populated only when private endpoint is enabled. To access workstations in the workstation cluster, create a new DNS zone mapping this domain name to an internal IP address and a forwarding rule mapping that address to the service attachment.", "readOnly": true, "type": "string" }, @@ -1769,7 +1769,7 @@ "type": "boolean" }, "serviceAttachmentUri": { - "description": "Output only. Service attachment URI for the workstation cluster. The service attachemnt is created when private endpoint is enabled. To access workstations in the cluster, configure access to the managed service using [Private Service Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-services).", + "description": "Output only. Service attachment URI for the workstation cluster. The service attachemnt is created when private endpoint is enabled. To access workstations in the workstation cluster, configure access to the managed service using [Private Service Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-services).", "readOnly": true, "type": "string" } @@ -1781,11 +1781,11 @@ "id": "ReadinessCheck", "properties": { "path": { - "description": "Path to which the request should be sent.", + "description": "Optional. Path to which the request should be sent.", "type": "string" }, "port": { - "description": "Port to which the request should be sent.", + "description": "Optional. Port to which the request should be sent.", "format": "int32", "type": "integer" } @@ -1813,11 +1813,11 @@ "id": "StartWorkstationRequest", "properties": { "etag": { - "description": "If set, the request will be rejected if the latest version of the workstation on the server does not have this ETag.", + "description": "Optional. If set, the request will be rejected if the latest version of the workstation on the server does not have this ETag.", "type": "string" }, "validateOnly": { - "description": "If set, validate the request and preview the review, but do not actually apply it.", + "description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", "type": "boolean" } }, @@ -1855,11 +1855,11 @@ "id": "StopWorkstationRequest", "properties": { "etag": { - "description": "If set, the request will be rejected if the latest version of the workstation on the server does not have this ETag.", + "description": "Optional. If set, the request will be rejected if the latest version of the workstation on the server does not have this ETag.", "type": "string" }, "validateOnly": { - "description": "If set, validate the request and preview the review, but do not actually apply it.", + "description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", "type": "boolean" } }, @@ -1901,34 +1901,34 @@ "additionalProperties": { "type": "string" }, - "description": "Client-specified annotations.", + "description": "Optional. Client-specified annotations.", "type": "object" }, "createTime": { - "description": "Output only. Time when this resource was created.", + "description": "Output only. Time when this workstation was created.", "format": "google-datetime", "readOnly": true, "type": "string" }, "deleteTime": { - "description": "Output only. Time when this resource was soft-deleted.", + "description": "Output only. Time when this workstation was soft-deleted.", "format": "google-datetime", "readOnly": true, "type": "string" }, "displayName": { - "description": "Human-readable name for this resource.", + "description": "Optional. Human-readable name for this workstation.", "type": "string" }, "env": { "additionalProperties": { "type": "string" }, - "description": "Environment variables passed to the workstation container's entrypoint.", + "description": "Optional. Environment variables passed to the workstation container's entrypoint.", "type": "object" }, "etag": { - "description": "Checksum computed by the server. May be sent on update and delete requests to make sure that the client has an up-to-date value before proceeding.", + "description": "Optional. Checksum computed by the server. May be sent on update and delete requests to make sure that the client has an up-to-date value before proceeding.", "type": "string" }, "host": { @@ -1940,15 +1940,15 @@ "additionalProperties": { "type": "string" }, - "description": "Client-specified labels that are applied to the resource and that are also propagated to the underlying Compute Engine resources.", + "description": "Optional. [Labels](https://cloud.google.com/workstations/docs/label-resources) that are applied to the workstation and that are also propagated to the underlying Compute Engine resources.", "type": "object" }, "name": { - "description": "Full name of this resource.", + "description": "Full name of this workstation.", "type": "string" }, "reconciling": { - "description": "Output only. Indicates whether this resource is currently being updated to match its intended state.", + "description": "Output only. Indicates whether this workstation is currently being updated to match its intended state.", "readOnly": true, "type": "boolean" }, @@ -1972,12 +1972,12 @@ "type": "string" }, "uid": { - "description": "Output only. A system-assigned unique identifier for this resource.", + "description": "Output only. A system-assigned unique identifier for this workstation.", "readOnly": true, "type": "string" }, "updateTime": { - "description": "Output only. Time when this resource was most recently updated.", + "description": "Output only. Time when this workstation was most recently updated.", "format": "google-datetime", "readOnly": true, "type": "string" @@ -1986,18 +1986,18 @@ "type": "object" }, "WorkstationCluster": { - "description": "A grouping of workstation configurations and the associated workstations in that region.", + "description": "A workstation cluster resource in the Cloud Workstations API. Defines a group of workstations in a particular region and the VPC network they're attached to.", "id": "WorkstationCluster", "properties": { "annotations": { "additionalProperties": { "type": "string" }, - "description": "Client-specified annotations.", + "description": "Optional. Client-specified annotations.", "type": "object" }, "conditions": { - "description": "Output only. Status conditions describing the current resource state.", + "description": "Output only. Status conditions describing the workstation cluster's current state.", "items": { "$ref": "Status" }, @@ -2005,70 +2005,70 @@ "type": "array" }, "controlPlaneIp": { - "description": "Output only. The private IP address of the control plane for this cluster. Workstation VMs need access to this IP address to work with the service, so make sure that your firewall rules allow egress from the workstation VMs to this address.", + "description": "Output only. The private IP address of the control plane for this workstation cluster. Workstation VMs need access to this IP address to work with the service, so make sure that your firewall rules allow egress from the workstation VMs to this address.", "readOnly": true, "type": "string" }, "createTime": { - "description": "Output only. Time when this resource was created.", + "description": "Output only. Time when this workstation cluster was created.", "format": "google-datetime", "readOnly": true, "type": "string" }, "degraded": { - "description": "Output only. Whether this resource is in degraded mode, in which case it may require user action to restore full functionality. Details can be found in the `conditions` field.", + "description": "Output only. Whether this workstation cluster is in degraded mode, in which case it may require user action to restore full functionality. Details can be found in conditions.", "readOnly": true, "type": "boolean" }, "deleteTime": { - "description": "Output only. Time when this resource was soft-deleted.", + "description": "Output only. Time when this workstation cluster was soft-deleted.", "format": "google-datetime", "readOnly": true, "type": "string" }, "displayName": { - "description": "Human-readable name for this resource.", + "description": "Optional. Human-readable name for this workstation cluster.", "type": "string" }, "etag": { - "description": "Checksum computed by the server. May be sent on update and delete requests to make sure that the client has an up-to-date value before proceeding.", + "description": "Optional. Checksum computed by the server. May be sent on update and delete requests to make sure that the client has an up-to-date value before proceeding.", "type": "string" }, "labels": { "additionalProperties": { "type": "string" }, - "description": "Client-specified labels that are applied to the resource and that are also propagated to the underlying Compute Engine resources.", + "description": "Optional. [Labels](https://cloud.google.com/workstations/docs/label-resources) that are applied to the workstation cluster and that are also propagated to the underlying Compute Engine resources.", "type": "object" }, "name": { - "description": "Full name of this resource.", + "description": "Full name of this workstation cluster.", "type": "string" }, "network": { - "description": "Immutable. Name of the Compute Engine network in which instances associated with this cluster will be created.", + "description": "Immutable. Name of the Compute Engine network in which instances associated with this workstation cluster will be created.", "type": "string" }, "privateClusterConfig": { "$ref": "PrivateClusterConfig", - "description": "Configuration for private cluster." + "description": "Optional. Configuration for private workstation cluster." }, "reconciling": { - "description": "Output only. Indicates whether this resource is currently being updated to match its intended state.", + "description": "Output only. Indicates whether this workstation cluster is currently being updated to match its intended state.", "readOnly": true, "type": "boolean" }, "subnetwork": { - "description": "Immutable. Name of the Compute Engine subnetwork in which instances associated with this cluster will be created. Must be part of the subnetwork specified for this cluster.", + "description": "Immutable. Name of the Compute Engine subnetwork in which instances associated with this workstation cluster will be created. Must be part of the subnetwork specified for this workstation cluster.", "type": "string" }, "uid": { - "description": "Output only. A system-assigned unique identifier for this resource.", + "description": "Output only. A system-assigned unique identifier for this workstation cluster.", "readOnly": true, "type": "string" }, "updateTime": { - "description": "Output only. Time when this resource was most recently updated.", + "description": "Output only. Time when this workstation cluster was most recently updated.", "format": "google-datetime", "readOnly": true, "type": "string" @@ -2077,14 +2077,14 @@ "type": "object" }, "WorkstationConfig": { - "description": "A set of configuration options that describe how a workstation runs. Workstation configurations are intended to be shared across multiple workstations.", + "description": "A workstation configuration resource in the Cloud Workstations API. Workstation configurations act as templates for workstations. The workstation configuration defines details such as the workstation virtual machine (VM) instance type, persistent storage, container image defining environment, which IDE or Code Editor to use, and more. Administrators and platform teams can also use [Identity and Access Management (IAM)](https://cloud.google.com/iam/docs/overview) rules to grant access to teams or to individual developers.", "id": "WorkstationConfig", "properties": { "annotations": { "additionalProperties": { "type": "string" }, - "description": "Client-specified annotations.", + "description": "Optional. Client-specified annotations.", "type": "object" }, "conditions": { @@ -2097,31 +2097,31 @@ }, "container": { "$ref": "Container", - "description": "Container that runs upon startup for each workstation using this workstation configuration." + "description": "Optional. Container that runs upon startup for each workstation using this workstation configuration." }, "createTime": { - "description": "Output only. Time when this resource was created.", + "description": "Output only. Time when this workstation configuration was created.", "format": "google-datetime", "readOnly": true, "type": "string" }, "degraded": { - "description": "Output only. Whether this resource is degraded, in which case it may require user action to restore full functionality. See also the `conditions` field.", + "description": "Output only. Whether this resource is degraded, in which case it may require user action to restore full functionality. See also the conditions field.", "readOnly": true, "type": "boolean" }, "deleteTime": { - "description": "Output only. Time when this resource was soft-deleted.", + "description": "Output only. Time when this workstation configuration was soft-deleted.", "format": "google-datetime", "readOnly": true, "type": "string" }, "displayName": { - "description": "Human-readable name for this resource.", + "description": "Optional. Human-readable name for this workstation configuration.", "type": "string" }, "enableAuditAgent": { - "description": "Whether to enable Linux `auditd` logging on the workstation. When enabled, a service account must also be specified that has `logging.buckets.write` permission on the project. Operating system audit logging is distinct from [Cloud Audit Logs](https://cloud.google.com/workstations/docs/audit-logging).", + "description": "Optional. Whether to enable Linux `auditd` logging on the workstation. When enabled, a service account must also be specified that has `logging.buckets.write` permission on the project. Operating system audit logging is distinct from [Cloud Audit Logs](https://cloud.google.com/workstations/docs/audit-logging).", "type": "boolean" }, "encryptionKey": { @@ -2129,15 +2129,15 @@ "description": "Immutable. Encrypts resources of this workstation configuration using a customer-managed encryption key (CMEK). If specified, the boot disk of the Compute Engine instance and the persistent disk are encrypted using this encryption key. If this field is not set, the disks are encrypted using a generated key. Customer-managed encryption keys do not protect disk metadata. If the customer-managed encryption key is rotated, when the workstation instance is stopped, the system attempts to recreate the persistent disk with the new version of the key. Be sure to keep older versions of the key until the persistent disk is recreated. Otherwise, data on the persistent disk might be lost. If the encryption key is revoked, the workstation session automatically stops within 7 hours. Immutable after the workstation configuration is created." }, "etag": { - "description": "Checksum computed by the server. May be sent on update and delete requests to make sure that the client has an up-to-date value before proceeding.", + "description": "Optional. Checksum computed by the server. May be sent on update and delete requests to make sure that the client has an up-to-date value before proceeding.", "type": "string" }, "host": { "$ref": "Host", - "description": "Runtime host for the workstation." + "description": "Optional. Runtime host for the workstation." }, "idleTimeout": { - "description": "Number of seconds to wait before automatically stopping a workstation after it last received user traffic. A value of `0s` indicates that Cloud Workstations VMs created with this configuration should never time out due to idleness. Provide [duration](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#duration) terminated by `s` for seconds—for example, `7200s` (2 hours). The default is `1200s` (20 minutes).", + "description": "Optional. Number of seconds to wait before automatically stopping a workstation after it last received user traffic. A value of `\"0s\"` indicates that Cloud Workstations VMs created with this configuration should never time out due to idleness. Provide [duration](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#duration) terminated by `s` for seconds—for example, `\"7200s\"` (2 hours). The default is `\"1200s\"` (20 minutes).", "format": "google-duration", "type": "string" }, @@ -2145,44 +2145,44 @@ "additionalProperties": { "type": "string" }, - "description": "Client-specified labels that are applied to the resource and that are also propagated to the underlying Compute Engine resources.", + "description": "Optional. [Labels](https://cloud.google.com/workstations/docs/label-resources) that are applied to the workstation configuration and that are also propagated to the underlying Compute Engine resources.", "type": "object" }, "name": { - "description": "Full name of this resource.", + "description": "Full name of this workstation configuration.", "type": "string" }, "persistentDirectories": { - "description": "Directories to persist across workstation sessions.", + "description": "Optional. Directories to persist across workstation sessions.", "items": { "$ref": "PersistentDirectory" }, "type": "array" }, "readinessChecks": { - "description": "Readiness checks to perform when starting a workstation using this workstation configuration. Mark a workstation as running only after all specified readiness checks return 200 status codes.", + "description": "Optional. Readiness checks to perform when starting a workstation using this workstation configuration. Mark a workstation as running only after all specified readiness checks return 200 status codes.", "items": { "$ref": "ReadinessCheck" }, "type": "array" }, "reconciling": { - "description": "Output only. Indicates whether this resource is currently being updated to match its intended state.", + "description": "Output only. Indicates whether this workstation configuration is currently being updated to match its intended state.", "readOnly": true, "type": "boolean" }, "runningTimeout": { - "description": "Number of seconds that a workstation can run until it is automatically shut down. We recommend that workstations be shut down daily to reduce costs and so that security updates can be applied upon restart. The `idleTimeout` and `runningTimeout` parameters are independent of each other. Note that the `runningTimeout` parameter shuts down VMs after the specified time, regardless of whether or not the VMs are idle. Provide duration terminated by `s` for seconds—for example, `54000s` (15 hours). Defaults to `43200s` (12 hours). A value of `0` indicates that workstations using this configuration should never time out. If `encryption_key` is set, it must be greater than `0` and less than `86400s` (24 hours). Warning: A value of `0s` indicates that Cloud Workstations VMs created with this configuration have no maximum running time. This is strongly discouraged because you incur costs and will not pick up security updates.", + "description": "Optional. Number of seconds that a workstation can run until it is automatically shut down. We recommend that workstations be shut down daily to reduce costs and so that security updates can be applied upon restart. The idle_timeout and running_timeout fields are independent of each other. Note that the running_timeout field shuts down VMs after the specified time, regardless of whether or not the VMs are idle. Provide duration terminated by `s` for seconds—for example, `\"54000s\"` (15 hours). Defaults to `\"43200s\"` (12 hours). A value of `\"0s\"` indicates that workstations using this configuration should never time out. If encryption_key is set, it must be greater than `\"0s\"` and less than `\"86400s\"` (24 hours). Warning: A value of `\"0s\"` indicates that Cloud Workstations VMs created with this configuration have no maximum running time. This is strongly discouraged because you incur costs and will not pick up security updates.", "format": "google-duration", "type": "string" }, "uid": { - "description": "Output only. A system-assigned unique identifier for this resource.", + "description": "Output only. A system-assigned unique identifier for this workstation configuration.", "readOnly": true, "type": "string" }, "updateTime": { - "description": "Output only. Time when this resource was most recently updated.", + "description": "Output only. Time when this workstation configuration was most recently updated.", "format": "google-datetime", "readOnly": true, "type": "string" diff --git a/workstations/v1beta/workstations-gen.go b/workstations/v1beta/workstations-gen.go index f0c53bea295..72b07c0ff59 100644 --- a/workstations/v1beta/workstations-gen.go +++ b/workstations/v1beta/workstations-gen.go @@ -209,11 +209,11 @@ type ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService s // Accelerator: An accelerator card attached to the instance. type Accelerator struct { - // Count: Number of accelerator cards exposed to the instance. + // Count: Optional. Number of accelerator cards exposed to the instance. Count int64 `json:"count,omitempty"` - // Type: Type of accelerator resource to attach to the instance, for - // example, "nvidia-tesla-p100". + // Type: Optional. Type of accelerator resource to attach to the + // instance, for example, "nvidia-tesla-p100". Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Count") to @@ -421,18 +421,20 @@ type CancelOperationRequest struct { // Container: A Docker container. type Container struct { - // Args: Arguments passed to the entrypoint. + // Args: Optional. Arguments passed to the entrypoint. Args []string `json:"args,omitempty"` - // Command: If set, overrides the default ENTRYPOINT specified by the - // image. + // Command: Optional. If set, overrides the default ENTRYPOINT specified + // by the image. Command []string `json:"command,omitempty"` - // Env: Environment variables passed to the container's entrypoint. + // Env: Optional. Environment variables passed to the container's + // entrypoint. Env map[string]string `json:"env,omitempty"` - // Image: A Docker container image that defines a custom environment. - // Cloud Workstations provides a number of preconfigured images + // Image: Optional. A Docker container image that defines a custom + // environment. Cloud Workstations provides a number of preconfigured + // images // (https://cloud.google.com/workstations/docs/preconfigured-base-images), // but you can create your own custom container images // (https://cloud.google.com/workstations/docs/custom-container-images). @@ -442,11 +444,12 @@ type Container struct { // publicly accessible. Image string `json:"image,omitempty"` - // RunAsUser: If set, overrides the USER specified in the image with the - // given uid. + // RunAsUser: Optional. If set, overrides the USER specified in the + // image with the given uid. RunAsUser int64 `json:"runAsUser,omitempty"` - // WorkingDir: If set, overrides the default DIR specified by the image. + // WorkingDir: Optional. If set, overrides the default DIR specified by + // the image. WorkingDir string `json:"workingDir,omitempty"` // ForceSendFields is a list of field names (e.g. "Args") to @@ -481,8 +484,8 @@ func (s *Container) MarshalJSON() ([]byte, error) { type CustomerEncryptionKey struct { // KmsKey: Immutable. The name of the Google Cloud KMS encryption key. // For example, - // `projects/PROJECT_ID/locations/REGION/keyRings/KEY_RING/cryptoKeys/KEY - // _NAME`. The key must be in the same region as the workstation + // "projects/PROJECT_ID/locations/REGION/keyRings/KEY_RING/cryptoKeys/KE + // Y_NAME". The key must be in the same region as the workstation // configuration. KmsKey string `json:"kmsKey,omitempty"` @@ -581,8 +584,8 @@ func (s *Expr) MarshalJSON() ([]byte, error) { // GceConfidentialInstanceConfig: A set of Compute Engine Confidential // VM instance options. type GceConfidentialInstanceConfig struct { - // EnableConfidentialCompute: Whether the instance has confidential - // compute enabled. + // EnableConfidentialCompute: Optional. Whether the instance has + // confidential compute enabled. EnableConfidentialCompute bool `json:"enableConfidentialCompute,omitempty"` // ForceSendFields is a list of field names (e.g. @@ -612,21 +615,22 @@ func (s *GceConfidentialInstanceConfig) MarshalJSON() ([]byte, error) { // GceInstance: A runtime using a Compute Engine instance. type GceInstance struct { - // Accelerators: A list of the type and count of accelerator cards - // attached to the instance. + // Accelerators: Optional. A list of the type and count of accelerator + // cards attached to the instance. Accelerators []*Accelerator `json:"accelerators,omitempty"` - // BootDiskSizeGb: The size of the boot disk for the VM in gigabytes - // (GB). The minimum boot disk size is `30` GB. Defaults to `50` GB. + // BootDiskSizeGb: Optional. The size of the boot disk for the VM in + // gigabytes (GB). The minimum boot disk size is `30` GB. Defaults to + // `50` GB. BootDiskSizeGb int64 `json:"bootDiskSizeGb,omitempty"` - // ConfidentialInstanceConfig: A set of Compute Engine Confidential VM - // instance options. + // ConfidentialInstanceConfig: Optional. A set of Compute Engine + // Confidential VM instance options. ConfidentialInstanceConfig *GceConfidentialInstanceConfig `json:"confidentialInstanceConfig,omitempty"` - // DisablePublicIpAddresses: When set to true, disables public IP - // addresses for VMs. If you disable public IP addresses, you must set - // up Private Google Access or Cloud NAT on your network. If you use + // DisablePublicIpAddresses: Optional. When set to true, disables public + // IP addresses for VMs. If you disable public IP addresses, you must + // set up Private Google Access or Cloud NAT on your network. If you use // Private Google Access and you use `private.googleapis.com` or // `restricted.googleapis.com` for Container Registry and Artifact // Registry, make sure that you set up DNS records for domains @@ -634,47 +638,73 @@ type GceInstance struct { // addresses). DisablePublicIpAddresses bool `json:"disablePublicIpAddresses,omitempty"` - // EnableNestedVirtualization: Whether to enable nested virtualization - // on instances. + // EnableNestedVirtualization: Optional. Whether to enable nested + // virtualization on Cloud Workstations VMs created under this + // workstation configuration. Nested virtualization lets you run virtual + // machine (VM) instances inside your workstation. Before enabling + // nested virtualization, consider the following important + // considerations. Cloud Workstations instances are subject to the same + // restrictions as Compute Engine instances + // (https://cloud.google.com/compute/docs/instances/nested-virtualization/overview#restrictions): + // * **Organization policy**: projects, folders, or organizations may be + // restricted from creating nested VMs if the **Disable VM nested + // virtualization** constraint is enforced in the organization policy. + // For more information, see the Compute Engine section, Checking + // whether nested virtualization is allowed + // (https://cloud.google.com/compute/docs/instances/nested-virtualization/managing-constraint#checking_whether_nested_virtualization_is_allowed). + // * **Performance**: nested VMs might experience a 10% or greater + // decrease in performance for workloads that are CPU-bound and possibly + // greater than a 10% decrease for workloads that are input/output + // bound. * **Machine Type**: nested virtualization can only be enabled + // on workstation configurations that specify a machine_type in the N1 + // or N2 machine series. * **GPUs**: nested virtualization may not be + // enabled on workstation configurations with accelerators. * + // **Operating System**: Because Container-Optimized OS + // (https://cloud.google.com/compute/docs/images/os-details#container-optimized_os_cos) + // does not support nested virtualization, when nested virtualization is + // enabled, the underlying Compute Engine VM instances boot from an + // Ubuntu LTS + // (https://cloud.google.com/compute/docs/images/os-details#ubuntu_lts) + // image. EnableNestedVirtualization bool `json:"enableNestedVirtualization,omitempty"` - // MachineType: The type of machine to use for VM instances—for - // example, `e2-standard-4`. For more information about machine types - // that Cloud Workstations supports, see the list of available machine - // types + // MachineType: Optional. The type of machine to use for VM + // instances—for example, "e2-standard-4". For more information + // about machine types that Cloud Workstations supports, see the list of + // available machine types // (https://cloud.google.com/workstations/docs/available-machine-types). MachineType string `json:"machineType,omitempty"` - // PoolSize: The number of VMs that the system should keep idle so that - // new workstations can be started quickly for new users. Defaults to - // `0` in the API. + // PoolSize: Optional. The number of VMs that the system should keep + // idle so that new workstations can be started quickly for new users. + // Defaults to `0` in the API. PoolSize int64 `json:"poolSize,omitempty"` // PooledInstances: Output only. Number of instances currently available // in the pool for faster workstation startup. PooledInstances int64 `json:"pooledInstances,omitempty"` - // ServiceAccount: The email address of the service account for Cloud - // Workstations VMs created with this configuration. When specified, be - // sure that the service account has `logginglogEntries.create` - // permission on the project so it can write logs out to Cloud Logging. - // If using a custom container image, the service account must have - // permissions to pull the specified image. If you as the administrator - // want to be able to `ssh` into the underlying VM, you need to set this - // value to a service account for which you have the - // `iam.serviceAccounts.actAs` permission. Conversely, if you don't want - // anyone to be able to `ssh` into the underlying VM, use a service - // account where no one has that permission. If not set, VMs run with a - // service account provided by the Cloud Workstations service, and the - // image must be publicly accessible. + // ServiceAccount: Optional. The email address of the service account + // for Cloud Workstations VMs created with this configuration. When + // specified, be sure that the service account has + // `logginglogEntries.create` permission on the project so it can write + // logs out to Cloud Logging. If using a custom container image, the + // service account must have permissions to pull the specified image. If + // you as the administrator want to be able to `ssh` into the underlying + // VM, you need to set this value to a service account for which you + // have the `iam.serviceAccounts.actAs` permission. Conversely, if you + // don't want anyone to be able to `ssh` into the underlying VM, use a + // service account where no one has that permission. If not set, VMs run + // with a service account provided by the Cloud Workstations service, + // and the image must be publicly accessible. ServiceAccount string `json:"serviceAccount,omitempty"` - // ShieldedInstanceConfig: A set of Compute Engine Shielded instance - // options. + // ShieldedInstanceConfig: Optional. A set of Compute Engine Shielded + // instance options. ShieldedInstanceConfig *GceShieldedInstanceConfig `json:"shieldedInstanceConfig,omitempty"` - // Tags: Network tags to add to the Compute Engine machines backing the - // workstations. This option applies network tags + // Tags: Optional. Network tags to add to the Compute Engine VMs backing + // the workstations. This option applies network tags // (https://cloud.google.com/vpc/docs/add-remove-network-tags) to VMs // created with this configuration. These network tags enable the // creation of firewall rules @@ -705,28 +735,27 @@ func (s *GceInstance) MarshalJSON() ([]byte, error) { } // GceRegionalPersistentDisk: A PersistentDirectory backed by a Compute -// Engine regional persistent disk. The `persistentDirectories[]` field -// is repeated, but it may contain only one entry. It creates a -// persistent disk -// (https://cloud.google.com/compute/docs/disks/persistent-disks) that -// mounts to the workstation VM at `/home` when the session starts and -// detaches when the session ends. If this field is empty, workstations -// created with this configuration do not have a persistent home -// directory. +// Engine regional persistent disk. The persistent_directories field is +// repeated, but it may contain only one entry. It creates a persistent +// disk (https://cloud.google.com/compute/docs/disks/persistent-disks) +// that mounts to the workstation VM at `/home` when the session starts +// and detaches when the session ends. If this field is empty, +// workstations created with this configuration do not have a persistent +// home directory. type GceRegionalPersistentDisk struct { - // DiskType: The type of the persistent disk + // DiskType: Optional. The type of the persistent disk // (https://cloud.google.com/compute/docs/disks#disk-types) for the home - // directory. Defaults to `pd-standard`. + // directory. Defaults to "pd-standard". DiskType string `json:"diskType,omitempty"` - // FsType: Type of file system that the disk should be formatted with. - // The workstation image must support this file system type. Must be - // empty if source_snapshot is set. Defaults to `ext4`. + // FsType: Optional. Type of file system that the disk should be + // formatted with. The workstation image must support this file system + // type. Must be empty if source_snapshot is set. Defaults to "ext4". FsType string `json:"fsType,omitempty"` - // ReclaimPolicy: Whether the persistent disk should be deleted when the - // workstation is deleted. Valid values are `DELETE` and `RETAIN`. - // Defaults to `DELETE`. + // ReclaimPolicy: Optional. Whether the persistent disk should be + // deleted when the workstation is deleted. Valid values are `DELETE` + // and `RETAIN`. Defaults to `DELETE`. // // Possible values: // "RECLAIM_POLICY_UNSPECIFIED" - Do not use. @@ -736,15 +765,15 @@ type GceRegionalPersistentDisk struct { // An administrator must manually delete the disk. ReclaimPolicy string `json:"reclaimPolicy,omitempty"` - // SizeGb: The GB capacity of a persistent home directory for each - // workstation created with this configuration. Must be empty if - // `source_snapshot` is set. Valid values are `10`, `50`, `100`, `200`, + // SizeGb: Optional. The GB capacity of a persistent home directory for + // each workstation created with this configuration. Must be empty if + // source_snapshot is set. Valid values are `10`, `50`, `100`, `200`, // `500`, or `1000`. Defaults to `200`. If less than `200` GB, the - // `diskType` must be `pd-balanced` or `pd-ssd`. + // disk_type must be "pd-balanced" or "pd-ssd". SizeGb int64 `json:"sizeGb,omitempty"` - // SourceSnapshot: Name of the snapshot to use as the source for the - // disk. If set, size_gb and fs_type must be empty. + // SourceSnapshot: Optional. Name of the snapshot to use as the source + // for the disk. If set, size_gb and fs_type must be empty. SourceSnapshot string `json:"sourceSnapshot,omitempty"` // ForceSendFields is a list of field names (e.g. "DiskType") to @@ -773,14 +802,15 @@ func (s *GceRegionalPersistentDisk) MarshalJSON() ([]byte, error) { // GceShieldedInstanceConfig: A set of Compute Engine Shielded instance // options. type GceShieldedInstanceConfig struct { - // EnableIntegrityMonitoring: Whether the instance has integrity - // monitoring enabled. + // EnableIntegrityMonitoring: Optional. Whether the instance has + // integrity monitoring enabled. EnableIntegrityMonitoring bool `json:"enableIntegrityMonitoring,omitempty"` - // EnableSecureBoot: Whether the instance has Secure Boot enabled. + // EnableSecureBoot: Optional. Whether the instance has Secure Boot + // enabled. EnableSecureBoot bool `json:"enableSecureBoot,omitempty"` - // EnableVtpm: Whether the instance has the vTPM enabled. + // EnableVtpm: Optional. Whether the instance has the vTPM enabled. EnableVtpm bool `json:"enableVtpm,omitempty"` // ForceSendFields is a list of field names (e.g. @@ -1121,11 +1151,11 @@ func (s *ListWorkstationConfigsResponse) MarshalJSON() ([]byte, error) { // ListWorkstationsResponse: Response message for ListWorkstations. type ListWorkstationsResponse struct { - // NextPageToken: Token to retrieve the next page of results, or empty - // if there are no more results in the list. + // NextPageToken: Optional. Token to retrieve the next page of results, + // or empty if there are no more results in the list. NextPageToken string `json:"nextPageToken,omitempty"` - // Unreachable: Unreachable resources. + // Unreachable: Optional. Unreachable resources. Unreachable []string `json:"unreachable,omitempty"` // Workstations: The requested workstations. @@ -1183,8 +1213,8 @@ type Operation struct { // `operations/{unique_id}`. Name string `json:"name,omitempty"` - // Response: The normal response of the operation in case of success. If - // the original method returns no data on success, such as `Delete`, the + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the // response is `google.protobuf.Empty`. If the original method is // standard `Get`/`Create`/`Update`, the response should be the // resource. For other methods, the response should have the type @@ -1276,7 +1306,8 @@ type PersistentDirectory struct { // disk. GcePd *GceRegionalPersistentDisk `json:"gcePd,omitempty"` - // MountPath: Location of this directory in the running workstation. + // MountPath: Optional. Location of this directory in the running + // workstation. MountPath string `json:"mountPath,omitempty"` // ForceSendFields is a list of field names (e.g. "GcePd") to @@ -1316,7 +1347,7 @@ func (s *PersistentDirectory) MarshalJSON() ([]byte, error) { // both. To learn which resources support conditions in their IAM // policies, see the IAM documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -// **JSON example:** { "bindings": [ { "role": +// **JSON example:** ``` { "bindings": [ { "role": // "roles/resourcemanager.organizationAdmin", "members": [ // "user:mike@example.com", "group:admins@example.com", // "domain:google.com", @@ -1325,17 +1356,17 @@ func (s *PersistentDirectory) MarshalJSON() ([]byte, error) { // "user:eve@example.com" ], "condition": { "title": "expirable access", // "description": "Does not grant access after Sep 2020", "expression": // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], -// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - -// members: - user:mike@example.com - group:admins@example.com - -// domain:google.com - +// "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` +// bindings: - members: - user:mike@example.com - +// group:admins@example.com - domain:google.com - // serviceAccount:my-project-id@appspot.gserviceaccount.com role: // roles/resourcemanager.organizationAdmin - members: - // user:eve@example.com role: roles/resourcemanager.organizationViewer // condition: title: expirable access description: Does not grant access // after Sep 2020 expression: request.time < // timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 -// For a description of IAM and its features, see the IAM documentation -// (https://cloud.google.com/iam/docs/). +// ``` For a description of IAM and its features, see the IAM +// documentation (https://cloud.google.com/iam/docs/). type Policy struct { // AuditConfigs: Specifies cloud audit logging configuration for this // policy. @@ -1412,19 +1443,20 @@ func (s *Policy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// PrivateClusterConfig: Configuration options for private clusters. +// PrivateClusterConfig: Configuration options for private workstation +// clusters. type PrivateClusterConfig struct { - // AllowedProjects: Additional projects that are allowed to attach to - // the workstation cluster's service attachment. By default, the - // workstation cluster's project and the VPC host project (if different) - // are allowed. + // AllowedProjects: Optional. Additional projects that are allowed to + // attach to the workstation cluster's service attachment. By default, + // the workstation cluster's project and the VPC host project (if + // different) are allowed. AllowedProjects []string `json:"allowedProjects,omitempty"` // ClusterHostname: Output only. Hostname for the workstation cluster. // This field will be populated only when private endpoint is enabled. - // To access workstations in the cluster, create a new DNS zone mapping - // this domain name to an internal IP address and a forwarding rule - // mapping that address to the service attachment. + // To access workstations in the workstation cluster, create a new DNS + // zone mapping this domain name to an internal IP address and a + // forwarding rule mapping that address to the service attachment. ClusterHostname string `json:"clusterHostname,omitempty"` // EnablePrivateEndpoint: Immutable. Whether Workstations endpoint is @@ -1433,8 +1465,9 @@ type PrivateClusterConfig struct { // ServiceAttachmentUri: Output only. Service attachment URI for the // workstation cluster. The service attachemnt is created when private - // endpoint is enabled. To access workstations in the cluster, configure - // access to the managed service using Private Service Connect + // endpoint is enabled. To access workstations in the workstation + // cluster, configure access to the managed service using Private + // Service Connect // (https://cloud.google.com/vpc/docs/configure-private-service-connect-services). ServiceAttachmentUri string `json:"serviceAttachmentUri,omitempty"` @@ -1464,10 +1497,10 @@ func (s *PrivateClusterConfig) MarshalJSON() ([]byte, error) { // ReadinessCheck: A readiness check to be performed on a workstation. type ReadinessCheck struct { - // Path: Path to which the request should be sent. + // Path: Optional. Path to which the request should be sent. Path string `json:"path,omitempty"` - // Port: Port to which the request should be sent. + // Port: Optional. Port to which the request should be sent. Port int64 `json:"port,omitempty"` // ForceSendFields is a list of field names (e.g. "Path") to @@ -1532,12 +1565,12 @@ func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { // StartWorkstationRequest: Request message for StartWorkstation. type StartWorkstationRequest struct { - // Etag: If set, the request will be rejected if the latest version of - // the workstation on the server does not have this ETag. + // Etag: Optional. If set, the request will be rejected if the latest + // version of the workstation on the server does not have this ETag. Etag string `json:"etag,omitempty"` - // ValidateOnly: If set, validate the request and preview the review, - // but do not actually apply it. + // ValidateOnly: Optional. If set, validate the request and preview the + // review, but do not actually apply it. ValidateOnly bool `json:"validateOnly,omitempty"` // ForceSendFields is a list of field names (e.g. "Etag") to @@ -1609,12 +1642,12 @@ func (s *Status) MarshalJSON() ([]byte, error) { // StopWorkstationRequest: Request message for StopWorkstation. type StopWorkstationRequest struct { - // Etag: If set, the request will be rejected if the latest version of - // the workstation on the server does not have this ETag. + // Etag: Optional. If set, the request will be rejected if the latest + // version of the workstation on the server does not have this ETag. Etag string `json:"etag,omitempty"` - // ValidateOnly: If set, validate the request and preview the review, - // but do not actually apply it. + // ValidateOnly: Optional. If set, validate the request and preview the + // review, but do not actually apply it. ValidateOnly bool `json:"validateOnly,omitempty"` // ForceSendFields is a list of field names (e.g. "Etag") to @@ -1709,25 +1742,25 @@ func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { // Workstation: A single instance of a developer workstation with its // own persistent storage. type Workstation struct { - // Annotations: Client-specified annotations. + // Annotations: Optional. Client-specified annotations. Annotations map[string]string `json:"annotations,omitempty"` - // CreateTime: Output only. Time when this resource was created. + // CreateTime: Output only. Time when this workstation was created. CreateTime string `json:"createTime,omitempty"` - // DeleteTime: Output only. Time when this resource was soft-deleted. + // DeleteTime: Output only. Time when this workstation was soft-deleted. DeleteTime string `json:"deleteTime,omitempty"` - // DisplayName: Human-readable name for this resource. + // DisplayName: Optional. Human-readable name for this workstation. DisplayName string `json:"displayName,omitempty"` - // Env: Environment variables passed to the workstation container's - // entrypoint. + // Env: Optional. Environment variables passed to the workstation + // container's entrypoint. Env map[string]string `json:"env,omitempty"` - // Etag: Checksum computed by the server. May be sent on update and - // delete requests to make sure that the client has an up-to-date value - // before proceeding. + // Etag: Optional. Checksum computed by the server. May be sent on + // update and delete requests to make sure that the client has an + // up-to-date value before proceeding. Etag string `json:"etag,omitempty"` // Host: Output only. Host to which clients can send HTTPS traffic that @@ -1737,14 +1770,16 @@ type Workstation struct { // in the format `{port}-{host}`. Host string `json:"host,omitempty"` - // Labels: Client-specified labels that are applied to the resource and - // that are also propagated to the underlying Compute Engine resources. + // Labels: Optional. Labels + // (https://cloud.google.com/workstations/docs/label-resources) that are + // applied to the workstation and that are also propagated to the + // underlying Compute Engine resources. Labels map[string]string `json:"labels,omitempty"` - // Name: Full name of this resource. + // Name: Full name of this workstation. Name string `json:"name,omitempty"` - // Reconciling: Output only. Indicates whether this resource is + // Reconciling: Output only. Indicates whether this workstation is // currently being updated to match its intended state. Reconciling bool `json:"reconciling,omitempty"` @@ -1762,10 +1797,10 @@ type Workstation struct { State string `json:"state,omitempty"` // Uid: Output only. A system-assigned unique identifier for this - // resource. + // workstation. Uid string `json:"uid,omitempty"` - // UpdateTime: Output only. Time when this resource was most recently + // UpdateTime: Output only. Time when this workstation was most recently // updated. UpdateTime string `json:"updateTime,omitempty"` @@ -1796,70 +1831,78 @@ func (s *Workstation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// WorkstationCluster: A grouping of workstation configurations and the -// associated workstations in that region. +// WorkstationCluster: A workstation cluster resource in the Cloud +// Workstations API. Defines a group of workstations in a particular +// region and the VPC network they're attached to. type WorkstationCluster struct { - // Annotations: Client-specified annotations. + // Annotations: Optional. Client-specified annotations. Annotations map[string]string `json:"annotations,omitempty"` - // Conditions: Output only. Status conditions describing the current - // resource state. + // Conditions: Output only. Status conditions describing the workstation + // cluster's current state. Conditions []*Status `json:"conditions,omitempty"` // ControlPlaneIp: Output only. The private IP address of the control - // plane for this cluster. Workstation VMs need access to this IP - // address to work with the service, so make sure that your firewall - // rules allow egress from the workstation VMs to this address. + // plane for this workstation cluster. Workstation VMs need access to + // this IP address to work with the service, so make sure that your + // firewall rules allow egress from the workstation VMs to this address. ControlPlaneIp string `json:"controlPlaneIp,omitempty"` - // CreateTime: Output only. Time when this resource was created. + // CreateTime: Output only. Time when this workstation cluster was + // created. CreateTime string `json:"createTime,omitempty"` - // Degraded: Output only. Whether this resource is in degraded mode, in - // which case it may require user action to restore full functionality. - // Details can be found in the `conditions` field. + // Degraded: Output only. Whether this workstation cluster is in + // degraded mode, in which case it may require user action to restore + // full functionality. Details can be found in conditions. Degraded bool `json:"degraded,omitempty"` - // DeleteTime: Output only. Time when this resource was soft-deleted. + // DeleteTime: Output only. Time when this workstation cluster was + // soft-deleted. DeleteTime string `json:"deleteTime,omitempty"` - // DisplayName: Human-readable name for this resource. + // DisplayName: Optional. Human-readable name for this workstation + // cluster. DisplayName string `json:"displayName,omitempty"` - // Etag: Checksum computed by the server. May be sent on update and - // delete requests to make sure that the client has an up-to-date value - // before proceeding. + // Etag: Optional. Checksum computed by the server. May be sent on + // update and delete requests to make sure that the client has an + // up-to-date value before proceeding. Etag string `json:"etag,omitempty"` - // Labels: Client-specified labels that are applied to the resource and - // that are also propagated to the underlying Compute Engine resources. + // Labels: Optional. Labels + // (https://cloud.google.com/workstations/docs/label-resources) that are + // applied to the workstation cluster and that are also propagated to + // the underlying Compute Engine resources. Labels map[string]string `json:"labels,omitempty"` - // Name: Full name of this resource. + // Name: Full name of this workstation cluster. Name string `json:"name,omitempty"` // Network: Immutable. Name of the Compute Engine network in which - // instances associated with this cluster will be created. + // instances associated with this workstation cluster will be created. Network string `json:"network,omitempty"` - // PrivateClusterConfig: Configuration for private cluster. + // PrivateClusterConfig: Optional. Configuration for private workstation + // cluster. PrivateClusterConfig *PrivateClusterConfig `json:"privateClusterConfig,omitempty"` - // Reconciling: Output only. Indicates whether this resource is - // currently being updated to match its intended state. + // Reconciling: Output only. Indicates whether this workstation cluster + // is currently being updated to match its intended state. Reconciling bool `json:"reconciling,omitempty"` // Subnetwork: Immutable. Name of the Compute Engine subnetwork in which - // instances associated with this cluster will be created. Must be part - // of the subnetwork specified for this cluster. + // instances associated with this workstation cluster will be created. + // Must be part of the subnetwork specified for this workstation + // cluster. Subnetwork string `json:"subnetwork,omitempty"` // Uid: Output only. A system-assigned unique identifier for this - // resource. + // workstation cluster. Uid string `json:"uid,omitempty"` - // UpdateTime: Output only. Time when this resource was most recently - // updated. + // UpdateTime: Output only. Time when this workstation cluster was most + // recently updated. UpdateTime string `json:"updateTime,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -1889,39 +1932,48 @@ func (s *WorkstationCluster) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// WorkstationConfig: A set of configuration options that describe how a -// workstation runs. Workstation configurations are intended to be -// shared across multiple workstations. +// WorkstationConfig: A workstation configuration resource in the Cloud +// Workstations API. Workstation configurations act as templates for +// workstations. The workstation configuration defines details such as +// the workstation virtual machine (VM) instance type, persistent +// storage, container image defining environment, which IDE or Code +// Editor to use, and more. Administrators and platform teams can also +// use Identity and Access Management (IAM) +// (https://cloud.google.com/iam/docs/overview) rules to grant access to +// teams or to individual developers. type WorkstationConfig struct { - // Annotations: Client-specified annotations. + // Annotations: Optional. Client-specified annotations. Annotations map[string]string `json:"annotations,omitempty"` // Conditions: Output only. Status conditions describing the current // resource state. Conditions []*Status `json:"conditions,omitempty"` - // Container: Container that runs upon startup for each workstation - // using this workstation configuration. + // Container: Optional. Container that runs upon startup for each + // workstation using this workstation configuration. Container *Container `json:"container,omitempty"` - // CreateTime: Output only. Time when this resource was created. + // CreateTime: Output only. Time when this workstation configuration was + // created. CreateTime string `json:"createTime,omitempty"` // Degraded: Output only. Whether this resource is degraded, in which // case it may require user action to restore full functionality. See - // also the `conditions` field. + // also the conditions field. Degraded bool `json:"degraded,omitempty"` - // DeleteTime: Output only. Time when this resource was soft-deleted. + // DeleteTime: Output only. Time when this workstation configuration was + // soft-deleted. DeleteTime string `json:"deleteTime,omitempty"` - // DisplayName: Human-readable name for this resource. + // DisplayName: Optional. Human-readable name for this workstation + // configuration. DisplayName string `json:"displayName,omitempty"` - // EnableAuditAgent: Whether to enable Linux `auditd` logging on the - // workstation. When enabled, a service account must also be specified - // that has `logging.buckets.write` permission on the project. Operating - // system audit logging is distinct from Cloud Audit Logs + // EnableAuditAgent: Optional. Whether to enable Linux `auditd` logging + // on the workstation. When enabled, a service account must also be + // specified that has `logging.buckets.write` permission on the project. + // Operating system audit logging is distinct from Cloud Audit Logs // (https://cloud.google.com/workstations/docs/audit-logging). EnableAuditAgent bool `json:"enableAuditAgent,omitempty"` @@ -1940,67 +1992,69 @@ type WorkstationConfig struct { // after the workstation configuration is created. EncryptionKey *CustomerEncryptionKey `json:"encryptionKey,omitempty"` - // Etag: Checksum computed by the server. May be sent on update and - // delete requests to make sure that the client has an up-to-date value - // before proceeding. + // Etag: Optional. Checksum computed by the server. May be sent on + // update and delete requests to make sure that the client has an + // up-to-date value before proceeding. Etag string `json:"etag,omitempty"` - // Host: Runtime host for the workstation. + // Host: Optional. Runtime host for the workstation. Host *Host `json:"host,omitempty"` - // IdleTimeout: Number of seconds to wait before automatically stopping - // a workstation after it last received user traffic. A value of `0s` - // indicates that Cloud Workstations VMs created with this configuration - // should never time out due to idleness. Provide duration + // IdleTimeout: Optional. Number of seconds to wait before automatically + // stopping a workstation after it last received user traffic. A value + // of "0s" indicates that Cloud Workstations VMs created with this + // configuration should never time out due to idleness. Provide duration // (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#duration) - // terminated by `s` for seconds—for example, `7200s` (2 hours). The - // default is `1200s` (20 minutes). + // terminated by `s` for seconds—for example, "7200s" (2 hours). The + // default is "1200s" (20 minutes). IdleTimeout string `json:"idleTimeout,omitempty"` - // Labels: Client-specified labels that are applied to the resource and - // that are also propagated to the underlying Compute Engine resources. + // Labels: Optional. Labels + // (https://cloud.google.com/workstations/docs/label-resources) that are + // applied to the workstation configuration and that are also propagated + // to the underlying Compute Engine resources. Labels map[string]string `json:"labels,omitempty"` - // Name: Full name of this resource. + // Name: Full name of this workstation configuration. Name string `json:"name,omitempty"` - // PersistentDirectories: Directories to persist across workstation - // sessions. + // PersistentDirectories: Optional. Directories to persist across + // workstation sessions. PersistentDirectories []*PersistentDirectory `json:"persistentDirectories,omitempty"` - // ReadinessChecks: Readiness checks to perform when starting a - // workstation using this workstation configuration. Mark a workstation - // as running only after all specified readiness checks return 200 - // status codes. + // ReadinessChecks: Optional. Readiness checks to perform when starting + // a workstation using this workstation configuration. Mark a + // workstation as running only after all specified readiness checks + // return 200 status codes. ReadinessChecks []*ReadinessCheck `json:"readinessChecks,omitempty"` - // Reconciling: Output only. Indicates whether this resource is - // currently being updated to match its intended state. + // Reconciling: Output only. Indicates whether this workstation + // configuration is currently being updated to match its intended state. Reconciling bool `json:"reconciling,omitempty"` - // RunningTimeout: Number of seconds that a workstation can run until it - // is automatically shut down. We recommend that workstations be shut - // down daily to reduce costs and so that security updates can be - // applied upon restart. The `idleTimeout` and `runningTimeout` - // parameters are independent of each other. Note that the - // `runningTimeout` parameter shuts down VMs after the specified time, + // RunningTimeout: Optional. Number of seconds that a workstation can + // run until it is automatically shut down. We recommend that + // workstations be shut down daily to reduce costs and so that security + // updates can be applied upon restart. The idle_timeout and + // running_timeout fields are independent of each other. Note that the + // running_timeout field shuts down VMs after the specified time, // regardless of whether or not the VMs are idle. Provide duration - // terminated by `s` for seconds—for example, `54000s` (15 hours). - // Defaults to `43200s` (12 hours). A value of `0` indicates that + // terminated by `s` for seconds—for example, "54000s" (15 hours). + // Defaults to "43200s" (12 hours). A value of "0s" indicates that // workstations using this configuration should never time out. If - // `encryption_key` is set, it must be greater than `0` and less than - // `86400s` (24 hours). Warning: A value of `0s` indicates that Cloud - // Workstations VMs created with this configuration have no maximum - // running time. This is strongly discouraged because you incur costs - // and will not pick up security updates. + // encryption_key is set, it must be greater than "0s" and less than + // "86400s" (24 hours). Warning: A value of "0s" indicates that + // Cloud Workstations VMs created with this configuration have no + // maximum running time. This is strongly discouraged because you incur + // costs and will not pick up security updates. RunningTimeout string `json:"runningTimeout,omitempty"` // Uid: Output only. A system-assigned unique identifier for this - // resource. + // workstation configuration. Uid string `json:"uid,omitempty"` - // UpdateTime: Output only. Time when this resource was most recently - // updated. + // UpdateTime: Output only. Time when this workstation configuration was + // most recently updated. UpdateTime string `json:"updateTime,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -2814,7 +2868,7 @@ func (c *ProjectsLocationsWorkstationClustersCreateCall) Do(opts ...googleapi.Ca // "type": "string" // }, // "validateOnly": { - // "description": "If set, validate the request and preview the review, but do not actually apply it.", + // "description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", // "location": "query", // "type": "boolean" // }, @@ -2976,12 +3030,12 @@ func (c *ProjectsLocationsWorkstationClustersDeleteCall) Do(opts ...googleapi.Ca // ], // "parameters": { // "etag": { - // "description": "If set, the request will be rejected if the latest version of the workstation cluster on the server does not have this ETag.", + // "description": "Optional. If set, the request will be rejected if the latest version of the workstation cluster on the server does not have this ETag.", // "location": "query", // "type": "string" // }, // "force": { - // "description": "If set, any workstation configurations and workstations in the workstation cluster are also deleted. Otherwise, the request only works if the workstation cluster has no configurations or workstations.", + // "description": "Optional. If set, any workstation configurations and workstations in the workstation cluster are also deleted. Otherwise, the request only works if the workstation cluster has no configurations or workstations.", // "location": "query", // "type": "boolean" // }, @@ -2993,7 +3047,7 @@ func (c *ProjectsLocationsWorkstationClustersDeleteCall) Do(opts ...googleapi.Ca // "type": "string" // }, // "validateOnly": { - // "description": "If set, validate the request and preview the review, but do not apply it.", + // "description": "Optional. If set, validate the request and preview the review, but do not apply it.", // "location": "query", // "type": "boolean" // } @@ -3297,13 +3351,13 @@ func (c *ProjectsLocationsWorkstationClustersListCall) Do(opts ...googleapi.Call // ], // "parameters": { // "pageSize": { - // "description": "Maximum number of items to return.", + // "description": "Optional. Maximum number of items to return.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "next_page_token value returned from a previous List request, if any.", + // "description": "Optional. next_page_token value returned from a previous List request, if any.", // "location": "query", // "type": "string" // }, @@ -3360,7 +3414,7 @@ type ProjectsLocationsWorkstationClustersPatchCall struct { // Patch: Updates an existing workstation cluster. // -// - name: Full name of this resource. +// - name: Full name of this workstation cluster. func (r *ProjectsLocationsWorkstationClustersService) Patch(name string, workstationcluster *WorkstationCluster) *ProjectsLocationsWorkstationClustersPatchCall { c := &ProjectsLocationsWorkstationClustersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -3492,12 +3546,12 @@ func (c *ProjectsLocationsWorkstationClustersPatchCall) Do(opts ...googleapi.Cal // ], // "parameters": { // "allowMissing": { - // "description": "If set, and the workstation cluster is not found, a new workstation cluster will be created. In this situation, update_mask is ignored.", + // "description": "Optional. If set, and the workstation cluster is not found, a new workstation cluster will be created. In this situation, update_mask is ignored.", // "location": "query", // "type": "boolean" // }, // "name": { - // "description": "Full name of this resource.", + // "description": "Full name of this workstation cluster.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+$", // "required": true, @@ -3510,7 +3564,7 @@ func (c *ProjectsLocationsWorkstationClustersPatchCall) Do(opts ...googleapi.Cal // "type": "string" // }, // "validateOnly": { - // "description": "If set, validate the request and preview the review, but do not actually apply it.", + // "description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", // "location": "query", // "type": "boolean" // } @@ -3673,7 +3727,7 @@ func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsCreateCall) Do(op // "type": "string" // }, // "validateOnly": { - // "description": "If set, validate the request and preview the review, but do not actually apply it.", + // "description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", // "location": "query", // "type": "boolean" // }, @@ -3836,12 +3890,12 @@ func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall) Do(op // ], // "parameters": { // "etag": { - // "description": "If set, the request is rejected if the latest version of the workstation configuration on the server does not have this ETag.", + // "description": "Optional. If set, the request is rejected if the latest version of the workstation configuration on the server does not have this ETag.", // "location": "query", // "type": "string" // }, // "force": { - // "description": "If set, any workstations in the workstation configuration are also deleted. Otherwise, the request works only if the workstation configuration has no workstations.", + // "description": "Optional. If set, any workstations in the workstation configuration are also deleted. Otherwise, the request works only if the workstation configuration has no workstations.", // "location": "query", // "type": "boolean" // }, @@ -3853,7 +3907,7 @@ func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall) Do(op // "type": "string" // }, // "validateOnly": { - // "description": "If set, validate the request and preview the review, but do not actually apply it.", + // "description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", // "location": "query", // "type": "boolean" // } @@ -4333,13 +4387,13 @@ func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListCall) Do(opts // ], // "parameters": { // "pageSize": { - // "description": "Maximum number of items to return.", + // "description": "Optional. Maximum number of items to return.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "next_page_token value returned from a previous List request, if any.", + // "description": "Optional. next_page_token value returned from a previous List request, if any.", // "location": "query", // "type": "string" // }, @@ -4528,13 +4582,13 @@ func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall) D // ], // "parameters": { // "pageSize": { - // "description": "Maximum number of items to return.", + // "description": "Optional. Maximum number of items to return.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "next_page_token value returned from a previous List request, if any.", + // "description": "Optional. next_page_token value returned from a previous List request, if any.", // "location": "query", // "type": "string" // }, @@ -4591,7 +4645,7 @@ type ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall struct { // Patch: Updates an existing workstation configuration. // -// - name: Full name of this resource. +// - name: Full name of this workstation configuration. func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsService) Patch(name string, workstationconfig *WorkstationConfig) *ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall { c := &ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -4724,12 +4778,12 @@ func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall) Do(opt // ], // "parameters": { // "allowMissing": { - // "description": "If set and the workstation configuration is not found, a new workstation configuration will be created. In this situation, update_mask is ignored.", + // "description": "Optional. If set and the workstation configuration is not found, a new workstation configuration will be created. In this situation, update_mask is ignored.", // "location": "query", // "type": "boolean" // }, // "name": { - // "description": "Full name of this resource.", + // "description": "Full name of this workstation configuration.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", // "required": true, @@ -4742,7 +4796,7 @@ func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall) Do(opt // "type": "string" // }, // "validateOnly": { - // "description": "If set, validate the request and preview the review, but do not actually apply it.", + // "description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", // "location": "query", // "type": "boolean" // } @@ -5201,7 +5255,7 @@ func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsCreat // "type": "string" // }, // "validateOnly": { - // "description": "If set, validate the request and preview the review, but do not actually apply it.", + // "description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", // "location": "query", // "type": "boolean" // }, @@ -5355,7 +5409,7 @@ func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsDelet // ], // "parameters": { // "etag": { - // "description": "If set, the request will be rejected if the latest version of the workstation on the server does not have this ETag.", + // "description": "Optional. If set, the request will be rejected if the latest version of the workstation on the server does not have this ETag.", // "location": "query", // "type": "string" // }, @@ -5367,7 +5421,7 @@ func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsDelet // "type": "string" // }, // "validateOnly": { - // "description": "If set, validate the request and preview the review, but do not actually apply it.", + // "description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", // "location": "query", // "type": "boolean" // } @@ -5991,13 +6045,13 @@ func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListC // ], // "parameters": { // "pageSize": { - // "description": "Maximum number of items to return.", + // "description": "Optional. Maximum number of items to return.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "next_page_token value returned from a previous List request, if any.", + // "description": "Optional. next_page_token value returned from a previous List request, if any.", // "location": "query", // "type": "string" // }, @@ -6185,13 +6239,13 @@ func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListU // ], // "parameters": { // "pageSize": { - // "description": "Maximum number of items to return.", + // "description": "Optional. Maximum number of items to return.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "next_page_token value returned from a previous List request, if any.", + // "description": "Optional. next_page_token value returned from a previous List request, if any.", // "location": "query", // "type": "string" // }, @@ -6248,7 +6302,7 @@ type ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall // Patch: Updates an existing workstation. // -// - name: Full name of this resource. +// - name: Full name of this workstation. func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService) Patch(name string, workstation *Workstation) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall { c := &ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -6380,12 +6434,12 @@ func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatch // ], // "parameters": { // "allowMissing": { - // "description": "If set and the workstation configuration is not found, a new workstation configuration is created. In this situation, update_mask is ignored.", + // "description": "Optional. If set and the workstation configuration is not found, a new workstation configuration is created. In this situation, update_mask is ignored.", // "location": "query", // "type": "boolean" // }, // "name": { - // "description": "Full name of this resource.", + // "description": "Full name of this workstation.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", // "required": true, @@ -6398,7 +6452,7 @@ func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatch // "type": "string" // }, // "validateOnly": { - // "description": "If set, validate the request and preview the review, but do not actually apply it.", + // "description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", // "location": "query", // "type": "boolean" // }